[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: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[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:
ListViewReport.zip
(4.91 KiB) Downloaded 4886 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
ListView-Report-Template.png (16.21 KiB) Viewed 77313 times
Result:
ListView-Report-Result.png
ListView-Report-Result.png (21.73 KiB) Viewed 77313 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