Generating Files in Rave Reports Without the Setup Dialog Box ?

Hi, i need to send via email a report generated in Rave Reports. The only method that occurs to me to do it is generating the report to a file that can be in a HTML Format ( Using the RvRenderHTML ) and after that send it via Outlook.
   My problem is that i don't know how to manage the Rave Dialog Box Without displaying it. I really need the whole operation to be "user independent", this is, i do not need that the user "uses"the dialog box. Can I ?

   If you have another ideas, they are welcome.
jpmonjaAsked:
Who is Participating?
 
jpedefConnect With a Mentor Commented:
At least following code works!

1. Place TRvSystem, TRvProject and TRvRenderHTML on form and set RvProjects engine to RvSystem1.
2. Remove ssAllowSetup from RvSystem1.SystemSetups and add soUseFiler to RvSystem1.SystemOptions.
3. Set RvSystem1.DefaultDest to rdFile

procedure ExecuteReport;
begin
  RvSystem1.OutputFileName := 'C:\Reports\TestReport.html';
  RvSystem1.Execute;
end;
0
 
jpmonjaAuthor Commented:
Hi jpedef, thx for your Answer. Indeed it generates a file without displaying the setup dialog box. Now my problem is that the resulting file ( "TestReport.html" ) does not have hmtl format. I think it generates the file in NDR format. Do you have any ideas how to change this. ?
0
 
DragonSlayerConnect With a Mentor Commented:
Ok, to convert an NDR to HTML:

procedure TForm1.Button1Click(Sender: TObject);

var
  NDRStream: TMemoryStream;

begin
  NDRStream := TMemoryStream.Create;
  try
    NDRStream.LoadFromFile('test.ndr');
    RvRenderHTML1.PrintRender(NDRStream, 'test.html');
  finally
    NDRStream.Free;
  end; { tryf }
  ShowMessage('NDR Converted');
end;

or, if you want to directly render as HTML:

RvSystem1.RenderObject :=RvRenderHTML1;
RvSystem1.OutputFileName :='c:\RptFiles\Test.html';
RvProject1.Execute;


That should do the trick (might have some syntax error? Haven't used Rave for a couple of months, now typing from memory)
0
All Courses

From novice to tech pro — start learning today.