Reports as PDF?

forum.reportbuilder (2000-2005) & (2005-2010)

Reports as PDF?

Post by Sandro » 15 Jun 2007, 11:31

 Posted by:  Sandro 

hi all

is it possible to save reports to pdf under 4.2?


Jim McNamara

Reports as PDF?

Post by Jim McNamara » 15 Jun 2007, 14:50

 Posted by:  Jim McNamara 

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

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


Reports as PDF?

Post by Sandro » 15 Jun 2007, 15:06

 Posted by:  Sandro 


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


Jim McNamara

Reports as PDF?

Post by Jim McNamara » 15 Jun 2007, 21:09

 Posted by:  Jim McNamara 


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.

Posts: 978
Joined: 04 Apr 2017, 08:56
Location: Geneva

Reports as PDF?

Post by Mirko » 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)


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


Reports as PDF?

Post by Sandro » 04 Jul 2007, 15:21

 Posted by:  Sandro 


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

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

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.


Elio Boezio

Reports as PDF?

Post by Elio Boezio » 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 "", available from - 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!


Return to “td.reportbuilder”

Who is online

Users browsing this forum: [Ccbot] and 0 guests