[DUG] D2007 and Rave and PDF

Graham Marsden graham at wk.planet.gen.nz
Mon Sep 19 19:31:06 NZST 2011


Hi John

D2007 and Rave and PDF

Here is a code snippet that sets up the execution of a Rave report to a PDF file.
Here the filename is obtained from a save dialogue but can be set to any string value.

The lines that are related to the TRvSystem component (RvSystemFile) are marked *

           RvProject.Engine := RvSystemFile;
           with RvSystemFile do
              begin
*             DefaultDest := rdFile;
*             DoNativeOutput := False;
*             RenderObject := RvRenderPDF;
              with SaveDialog do
                 begin
                 FileName := mqReportsAvailable['ReportID'] + '.PDF';
                 InitialDir := fmMain.mqUsers['DataExportAndReportLocation'];
                 Filter := 'Acrobat Reader PDF File (*.PDF)';
                 DefaultExt := 'PDF';
                 end;
              if SaveDialog.Execute then
                 begin
*                OutputFileName := SaveDialog.FileName;
                 RvProject.ExecuteReport(mqReportsAvailable['RaveReportID']);
                 end;
              end;

Hope this helps.

Graham Marsden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110919/c8f8c0ed/attachment.html 


More information about the Delphi mailing list