Solved

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

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best Firemonkey component pack 1 105
Delphi - replicating a form 8 74
Comparing dates in Delphi. Greater than/ Less than 3 154
Delphi Yen format 3 35
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

772 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