Solved

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

Posted on 2007-03-19
5
3,482 Views
Last Modified: 2012-06-27
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!
0
Comment
Question by:digitalwav
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:jpedef
ID: 18747888
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.
0
 
LVL 1

Author Comment

by:digitalwav
ID: 18747948
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?
0
 
LVL 3

Accepted Solution

by:
jpedef earned 500 total points
ID: 18748074
Modified and corrected example from nevronas site
http://www.nevrona.com/Default.aspx?tabid=180

procedure TForm1.Button1Click(Sender: TObject);
var
  NdrStream: TMemoryStream;
  OutStream: TMemoryStream;
begin
  RVProject1.ProjectFile := 'C:\Project1';
  RVProject1.SelectReport('Report1', true);
  RvProject1.Engine := RvNDRWriter1;
  NdrStream := TMemoryStream.Create;
  OutStream := TMemoryStream.Create;
  try
    RvNDRWriter1.StreamMode := smUser;
    RvNDRWriter1.Stream := NdrStream;
    RVProject1.Execute;
    RvRenderPDF1.OutputStream := OutStream;
    RvRenderPDF1.Render(NdrStream);
    OutStream.SaveToFile('C:\RaveTest.pdf');
  finally
    FreeAndNil(NdrStream);
    FreeAndNil(OutStream);
  end;
end;
0
 
LVL 1

Author Comment

by:digitalwav
ID: 18748115
Perfect, even faster than the other!!
0
 
LVL 1

Author Comment

by:digitalwav
ID: 18748120
Didn't realize Nevrona had an online system, I'll start hunting there for all the other little issues.  Thanks again!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question