Solved

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

Posted on 2007-03-19
5
3,443 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run video youtube webbrowse 10 74
how can i search if string exist in array ? 3 70
Delphi: sending SMS on android platform 1 70
Way to create an iPhone app for my customers 8 49
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

697 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