Solved

Generating Files in Rave Reports Without the Setup Dialog Box ?

Posted on 2004-10-26
782 Views
Last Modified: 2008-01-09
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.
0
Question by:jpmonja
    3 Comments
     
    LVL 3

    Accepted Solution

    by:
    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
     

    Author Comment

    by:jpmonja
    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
     
    LVL 14

    Assisted Solution

    by:DragonSlayer
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    Suggested Solutions

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    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…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now