Creating Reports with Delphi and ADO
(Page 1 of 4 )
So far we’ve covered using ADO tables and queries with Delphi. And we have explored how to dynamically run a query at runtime. In this article we are going a stage further and discussing how to create reports from a database.
Download the application source code
here
Introduction
Why would you need a report in your application? Well, the need for reporting is greatly dependent on what kind of application you are developing. If you are developing something like an invoicing application, you would want hard copies for one purpose or other, or you might have a database application and you'd want to make hard copies of whatever information you want. Not only does Delphi enable you to create reports, it also allows you to customize and format them any way you like.
In previous versions Delphi shipped with a group of components called Quick Reports, which enabled developers to create reports for their applications. From Delphi 7 onwards those components have been replaced with Rave Report components. Now, I've been told that you can still install and use Quick Reports, but I have not tried using it. I'm also not sure whether report creation between Rave and Quick Reports has changed. In any case, we are going to use Rave Reports to create reports in our article.
The article will focus on retrieving information from a database and then using that data to create a customized report. I've deliberately kept things simple, so that beginners can easily grasp the concepts involved. I'm using code-based reporting in this article, not the Visual Designer. Please download the database from my previous article, as I will be using it here.
Just a word of thanks to the good people in the Rave Report newsgroups that helped me during my research on this topic.
Next: ADO with Rave Reports >>
More Delphi-Kylix Articles
More By Jacques Noah