Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-03-19
5
Medium Priority
?
3,587 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

618 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