Rave Reports 5.0

Posted on by admin

Introduction to Rave Reports - Part I: Code Based Reports Delphi 7 has included Rave Reports as the default reporting solution, replacing Quick Reports. Since they work in very different paradigms, many people were confused by the new environment. This is intended as an introduction for people who haven't worked with Rave yet, and would like to start. Delphi 7 ships with Rave Reports 5.0.8.

Rave Reports 5.0

If you haven't already, download the from the, since it fixes some important problems. You can develop reports with Rave using two different ways: Code Based or with the Visual Designer. This document describes how to work with the code based engine. Part II will describe the Visual Designer. Code Based Reports With Code Based, you write reports using plain Delphi code. That provides a very flexible way displaying any kind of data, allowing any kind of complex layouts.

To write a code based report, just drop a TRvSystem component on the form and write the report on the OnPrint event handler. Sender is the report you are creating, and can be typecasted to TBaseReport.

Rave Reports 5.05.0

It contains all the methods you need to output information to that particular report. Simple Code Base Report Here's a simple report using the code based mechanism: procedure TFormMain.RvSystemPrint(Sender: TObject); begin with Sender as TBaseReport do begin SetFont( 'Arial', 15); GotoXY(1,1); Print( 'Welcome to Code Based Reporting in Rave'); end; end; To execute this report, call RvSystem.Execute method.

Rave Reports 5.0 Download

So, what does that simple code do? First, it calls SetFont to select the font and size of the text that will be printed from that point on. Then it positions the cursor on the coordinates (1,1).

Rave Reports 5.0

These coordinates are expressed using the units set in the SystemPrinter.Units property of the RvSystem object, and it defaults to Inches. You can set it to unUser and set a number relative to Inches in the SystemPrinter.UnitsFactor property. For example, if UnitsFactor was set to 0.5 then 1 unit would correspond to half an inch. Finally, the code calls the Print method to output the text. Here's the output: Tabular Code Based Report Here's another example. It displays a list of the folders in the root of the current drive, along with a recursive count of number of files and folder, and total size of the files included in each folder.