Creating Reports with Delphi and ADO - ADO with Rave Reports
(Page 2 of 4 )
There are two easy ways to create reports in Delphi:
This method allows us to build a report through code. This includes creating the formatting of the text, as well as setting the position of the text. It is arguably the best way to create a real world application as it gives the developer a lot of latitude in terms of the way the application functions. To run, or preview, a report that we create, we are going to use a component from the Rave tab called RvSystem.
To use this method, you need to start the Visual Designer application and physically build the layout of the report. It is considerably easier to use this method, because you do not need to code as much and text formatting is automated. To link the report to the application, you need to use a component called RvProject.
In this article we are primarily going to discuss the code-based method since it includes, by no means exclusively, database-related reporting. You can also display simple text on a report without involving a database. To display simple text on a code-generated report you simply write the following in code:
withSender as TBaseReport do
begin
SetFont('Arial', 10);//set the font / font size
GotoXY(1,1);//set the location of the text
Print('Delphiand Code Based Reporting in Rave');//show the //text
end;
which produces this:

Next: Building the application >>
More Delphi-Kylix Articles
More By Jacques Noah