Reports as PDF?

forum.reportbuilder (2000-2005) & forum.td.reportbuilder (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 15 Jun 2007, 11:31

 Posted by:  Sandro 

hi all

is it possible to save reports to pdf under 4.2?

tia
sandro

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 15 Jun 2007, 14:50

 Posted by:  Jim McNamara 

.pdf is created with a printer driver. I use this one:

http://www.win2pdf.com/

Do a Google on pdf and you will find many options.

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 15 Jun 2007, 15:06

 Posted by:  Sandro 

hi,

thx for the quick reply.

so if i understand right, there isn't a way to save the generated reports as
pdf by using centura functionality, right?

second, what if i have to create those pdf's on server side? i mean without
showing the save-dialog. do i have
a possibility to detect the end of pdf-creation (neede to send it to the
client after completion)

any help is really appreciated

tia
sandro

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 15 Jun 2007, 21:09

 Posted by:  Jim McNamara 

Below

I think it might be in the product road map, but the answer now is no

Save them to a temporary file on the local drive, read it back into the app,
insert it into ad database - that way you don't have to worry about the PC
losing it's network path infor

Make sure that whatever function you are calling returns something. (T/F -
whatever...) then instead of Call fPDF(...) use If fPDF(...) - when the
function returns it is done.

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 19 Jun 2007, 09:36

 Posted by:  Mirko BONANNO 


Actually we saw that functionality with ReportBuilder TWICE (2005 & 2006) at
the DevCon :

Yes, yes I did say TWICE ; I particularly remenber Ana-Paula (hello Ana)
last year making the presentation about this new exciting feature that we
were supposed to use in yellowstone (yes, sometimes you get so stoned that
you look yellow !!!).

So, please, Gupt'ify, give us that feature (if you can ? lol) we do need it
(and BTW no need to present it again at DevCon2007)

Ciao
Mirko

PS Sandro, if I were you I would NOT wait for Gupta future implementation
and would use a Jim's like solution

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 04 Jul 2007, 15:21

 Posted by:  Sandro 

hiho,

even if i would like to, i do not have the time to wait for things which
normally are state-of-the-art
and should be there since years... :-/

well what goal do we have to reach? i try to explain, mabye there are
solutions which i did
not think about yet.

we plan to migrate some of our gupta-apps to c#. now, there are alot of
reports (reportbuilder) which
are partially standard and alot of them are custom reports.

actually the focus is, to keep the reports as they are and NOT to port them
to another
reporting-tool.

what i've tried to do is, to create a possibility to call the report
generation gupta code out from the c#
application by using com. this would work in theory. this i have achieved by
converting the application into a
com server (exe).

BUT, that i cannot do that. this because alot of this functionality is
implemented in formwindows and
dialogs and since they have parents, i cannot call them am standalone
windows. the other possibitlty was to
call the application by using commandline arguments...this is also not
possible.

so, what i am wondering is, if there is a tool which helps converting
reportbuilder reports into other formats, lets
say crystal or activereports, etc.

or did anybody made similar migrations and faced similar problems regarding
centura reports?

any help, tips, hints are really and greatly appreciated.

tia
sandro

NewsgroupServer
Robot
Robot
Posts: 116488
Joined: 24 Feb 2017, 12:00
Location: World wide

Reports as PDF?

Post by NewsgroupServer » 27 Jun 2008, 22:20

 Posted by:  Elio Boezio 

Hi guys,

Not sure if this is the complete answer (and a year later, you've probably found another solution), but I've managed to automate printing documents to PDF using PDFCreator, by manipulating the registry and the default printer as follows:

! Set up path to archives folder
Set sReportArchive = sDocArchivesPath || cDocArchivesInvoices
! Set up filename
Set sFileName = cINV || SalStrRightX( "000000" || SalNumberToStrX( twInvoicePrint.colInvoiceNum, 0 ), 6 ) || ".PDF"
! Save the details of the default printer
Call SalPrtGetDefault( sPrtDeviceDefault, sPrtDriverDefault, sPrtPortDefault )
!
! Using Registry Utilities by Joe Meyer (download "Registry.zip", available from http://sqlweb.vnuk.org/index.htm - thanks for the tip, Tom Heaverlo!)
!
! Instantiated in MDI Window variables section as cBTRegistry: oRegistry
!
If oRegistry.OpenKey( '/Software/PDFCreator/Program/', FALSE )
!
! Set the registry entries for PDFCreator
!
Call oRegistry.WriteString( 'UseAutosave', '1' )
Call oRegistry.WriteString( 'AutosaveDirectory', sReportArchive )
Call oRegistry.WriteString( 'AutosaveFilename', sFileName )
Call oRegistry.CloseKey( )
! Set the default printer to PDFCreator
Call SalPrtSetDefault( 'PDFCreator', 'winspool', 'PDFCreator' )
! Print the report to PDF
Set hWndReport = SalReportPrint( hWndForm, sReportTemplate, sVars, sBinds, 1, RPT_PrintAll, 0, 0, nFlags )
! Reset the default printer back to original settings
Call SalPrtSetDefault( sPrtDeviceDefault, sPrtDriverDefault, sPrtPortDefault )

One probably wouldn't want to do this if you need to print thousands of invoices to individual PDF files (I only need to print a handful at a time, but I need a secure copy); however one could print a whole batch run to a single PDF, I guess).

Hope someone else finds this useful!

Elio

Return to “td.reportbuilder”

Who is online

Users browsing this forum: [Ccbot] and 0 guests