RAD Studio
ContentsIndex
PreviousUpNext
Getting Started with Rave Reports

You can use Rave Reports in VCL applications to generate reports from database and non-database data.

To add a simple report to an existing database application

  1. Open a database application in Delphi.
  2. From the Rave category of the Tool palette, add the TRvDataSetConnection component to a form in the application.
  3. In the Object Inspector, set the DataSet property to a dataset component that is already defined in your application.
  4. Use the Rave Visual Designer:
  5. From the Rave category of the Tool palette, add the Rave project component, TRvProject, to the form.
  6. In the Object Inspector, set the ProjectFile property to the report project file (MyRave.rav) that you created in step 8 in using the Rave Visual Designer.
  7. From the Standard category of the Tool palette, add the TButton component.
  8. In the Object Inspector, click the Events tab and double-click the OnClick event.
  9. Write an event handler that uses the ExecuteReport method to execute the Rave project component.

To design your report and create a report project file (.rav file) using the Rave Visual Designer

  1. Choose ToolsRave Designer to launch the Rave Visual Designer.
  2. Choose FileNew Data Object to display the Data Connections dialog box, and in the Data Object Type list, select Direct Data View and click Next.
  3. In the Active Data Connections list, select RVDataSetConnection1 and click Finish. In the Project Tree on the left side of the Rave Visual Designer window, expand the Data View Dictionary node, then expand the newly created DataView1 node. Your application data fields are displayed under the DataView1 node.
  4. Choose ToolsReport WizardsSimple Table to display the Simple Table wizard, and select DataView1 and click Next.
  5. Select two or three fields that you want to display in the report and click Next.
  6. Follow the prompts on the subsequent wizard pages to set the order of the fields, margins, heading text, and fonts to be used in the report.
  7. On the final wizard page, click Generate to complete the wizard and display the report in the Page Designer.
  8. Choose FileSave as to display the Save As dialog box. Navigate to the directory in which your Delphi application is located and save the Rave project file as MyRave.rav.
  9. Minimize the Rave Visual Designer window and return to Delphi.
For a more information on using the Rave Visual Designer, use the Help menu or see the Rave Reports documentation listed in Getting more information.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!