[ReportWorkshop][Demo] Using data from TListView

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 16445
Joined: Sat Aug 27, 2005 10:28 am

[ReportWorkshop][Demo] Using data from TListView

Post by Sergey Tkachenko »

Typically, Report Workshop uses data from databases, and many data provider components are included for different databases.
But reports are not necessary linked to databases.

This demo shows how to get data from TListView:
(4.91 KiB) Downloaded 2085 times
It does not use any database, all data are taken from TListView controls.
It does not use dataprovider components, instead, it uses TRVReportGenerator.OnCreateQueryProcessor event.
In your application, you can use both a data provider component and this event, thus using data both from TListViews and from databases.
This demo uses names of TListView controls as data queries.

Report template (generated in code):
ListView-Report-Template.png (16.21 KiB) Viewed 42062 times
ListView-Report-Result.png (21.73 KiB) Viewed 42062 times
This demo includes RVReportListViewQueryProcessor.pas containing TRVReportListViewQueryProcessor. It allows using data from TListView in reports.
It is very simple, so you can use it as a base for your query processors (for example, getting data from TStringGrid, TStringList, or arrays).
If you need help or additional examples, let me know.
Post Reply