HomeFree Stuff

Our RAVE render component makes it easy to create metafiles or bitmap files from reports or report snapshots (NDR).

To use this component place place it on your form (or create it using code). Depending on the setting of "Format" different file formats will be created. If the property HoldFiles is true the created graphics will be stored in the array 'Pages'. No files will be written if you select an empty OutputFileName, otherwise the files will be written at once using a name generated using the property AutoNameformat.

You can specify an event handler for the event AfterRenderPage and set the property Format to wpNothing to ignore that page. You can also read out the Picture property of the component and assign the page to a TImage object or save it to a database or file.



   
This example shows an open dialog to render a NDR file to JPEG images

procedure TForm1.RenderNDRToJPEG(Sender: TObject);
var
   OpenDialog: TOpenDialog;
   RvRenderGraphic: TRvRenderGraphic;
   FileStream: TFileStream;
begin
   OpenDialog := TOpenDialog.Create(Self);
   RvRenderGraphic := TRvRenderGraphic.Create(Self);
   try
        OpenDialog.Filter := 'NDF Files|*.NDR';
        RvRenderGraphic.Format := wpJPEG;
        if OpenDialog.Execute then
        begin
          FileStream := TFileStream.Create(OpenDialog.FileName, fmOpenRead);
          try
            // We simply pass OpenDialog.FileName -
            //  the component will choose the propper extension!
            RvRenderGraphic.PrintRender(FileStream, OpenDialog.FileName);
          finally
            FileStream.Free;
          end;
        end;
   finally
        OpenDialog.Free;
        RvRenderGraphic.Free;
   end;
end;

LICENSE

You may use this unit in your application without charge and distribute it in binary form.
You may use the unit with your component but the copyright note must be left intact.
You may not extract parts of this unit and use it in your component unless you also copy the copyright note to the beginning of your unit.

The software distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.

DOWNLOAD
wp_rave_01.zip