Link to home
Start Free TrialLog in
Avatar of digitalwav
digitalwavFlag for United States of America

asked on

Delphi 7 and included RAVE 5.0, getting report directly to PDF

I've read several solutions here about this but none work.  Read carefully!

I've read all the documentation available for RAVE.  No help.

I want to send my existing RAVE report directly to PDF.  I can do this manually by running the report, telling it to save to a file and picking PDF.  This works great EXCEPT I need to do this all programatically; as in no user intervention.  

The PDF converter is included with RAVE as a component you drop on your form. I've got that so I DON'T NEED EXTERNAL PDF CONVERSION SOFTWARE!

I need to know how to automate what is included with Delphi 7 and RAVE 5 to make this happen!

Thanks!
Avatar of jpedef
jpedef
Flag of Finland image

Following code creates pdf-file.

  RVProject1.ProjectFile := 'C:\Project1';
  RvSystem1.SystemSetups := RvSystem1.SystemSetups - [ssAllowSetup];
  RvSystem1.SystemOptions := RvSystem1.SystemOptions - [soShowStatus];
  RvSystem1.RenderObject := RvRenderPDF1;
  RvSystem1.DefaultDest := rdFile;
  RVProject1.ExecuteReport('Report1');
  RvRenderPDF1.PrintRender(RvSystem1.Stream, 'C:\RaveTest.pdf');

You can also generate report to ndr-file by using TRvNdrWriter component and then rendering this file with TRvRenderPdf component.
Avatar of digitalwav

ASKER

Perfect except for one thing...it kicked out a hard copy on the printer too...How do I get it to not print?

BTW- how did you figure all that out? Is this documented somewhere?
ASKER CERTIFIED SOLUTION
Avatar of jpedef
jpedef
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect, even faster than the other!!
Didn't realize Nevrona had an online system, I'll start hunting there for all the other little issues.  Thanks again!