#1 2012-02-07 18:26:09

rodrigofarias77
Member
Registered: 2012-02-07
Posts: 6

ReportPrinter Pro to PDF

Hello gents,

I am trying to generate a PDF based on a ReportPro's TCanvas. How can I use a custom canvas in TPdfDocumentGDI? Would you recommend another approach?

Thanks,

Rod

Offline

#2 2012-02-07 19:29:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: ReportPrinter Pro to PDF

Save your report into a TMetaFile, then "play" this metafile content into a SynPDF canvas.
This works very well.

Offline

#3 2012-02-08 01:37:26

rodrigofarias77
Member
Registered: 2012-02-07
Posts: 6

Re: ReportPrinter Pro to PDF

Thanks for replying!

ab wrote:

Save your report into a TMetaFile

I did some research, but I am not sure yet how to save it as a TMetaFile... As far as I understood, it is possible to convert a TMetaFile into a canvas with TMetafileCanvas. But I guess we want the other way around, since I can get a TCanvas from ReportPro.

ab wrote:

then "play" this metafile content into a SynPDF canvas

I suppose you are talking about using TPdfDocument.Canvas.RenderMetaFile here.

Thanks again,

Rod

Offline

#4 2012-02-08 06:50:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: ReportPrinter Pro to PDF

The TCanvas from ReportPro is to draw on the report.

Which product do you call ReportPro?
Is it QuickReport?
Someone already asked this question: http://synopse.info/forum/viewtopic.php?id=138
You'll find here some code about how to render the report into pdf.

Offline

#5 2012-02-08 14:48:33

rodrigofarias77
Member
Registered: 2012-02-07
Posts: 6

Re: ReportPrinter Pro to PDF

ab wrote:

Which product do you call ReportPro? Is it QuickReport?

No, it is the predecessor of Rave Reports:

http://www.nevrona.com/products/index.html

ab wrote:

Someone already asked this question: [...] You'll find here some code about how to render the report into pdf.

I learned the Pdf.Canvas.RenderMetaFile trick there, but could not find yet the equivalent to QuickRep.QRPrinter.GetPage (which returns a TMetaFile) in ReportPro.

Thanks,

Rod

Offline

#6 2012-02-08 15:58:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: ReportPrinter Pro to PDF

I do not know ReportPro at all, sorry...

Perhaps could you ask Nevrona for support?

Offline

#7 2012-02-08 16:54:07

rodrigofarias77
Member
Registered: 2012-02-07
Posts: 6

Re: ReportPrinter Pro to PDF

Oh no problem. You gave me all the important steps after I get a TMetaFile out of ReportPro.

Thanks a lot,

Rod

Offline

#8 2014-06-05 08:59:37

Ali
Member
Registered: 2014-06-04
Posts: 3

Re: ReportPrinter Pro to PDF

rodrigofarias77 wrote:

Oh no problem. You gave me all the important steps after I get a TMetaFile out of ReportPro.

Thanks a lot,

Rod

How can i get a Metafile from Rave´s Report ?

Offline

Board footer

Powered by FluxBB