Well, here's the "Your First Report" topic from the QuickReport
help file. It covers the basic connections and such:
=====================================================
QuickReport is a banded report generator. Your reports are
built up of sections (bands) with text and graphics components
on them. These bands are replicated according to your data to
create the final report. A simple report might include these
components placed on a form:
* Dataset (TTable, TIBDataSet, TIBQuery, etc.)
* QuickReport component connected to the dataset
* Detail band on the report component
* Printable text (TQRDBText) on the detail band
Follow these steps to create the report:
1. Start a new project
2. Drop a TTable (or other TDataset descendant)
component on the form. Select the DBDemos alias
as DatabaseName, Customer as TableName
(substitute your database and table names here)
and set Active to True
3. Drop a TQuickRep component on the main form and set
the DataSet property to Table1 (or what ever your
DataSet component name is)
4. Expand the Bands property
5. Set HasDetail to True. This will add a detail band
to the report
6. Drop a TQRDBText component on the detail band, set
DataSet to Table1 and DataField to Company
(Again, substitute your DataSet, Query or Table
name and field name here...)
These are all the components you need to create a basic report.
To preview the report you can right click somewhere on the
TQuickRep component and select Preview from the popup menu. If
you did everything right you should now see a preview window
with your report.
So now you have a report working at design time but you want
it to work at runtime too. Follow these steps activate the
report at runtime:
1. Add a button to your main form and set the Caption
to Preview
2. Double click on the button to add a OnClick event
and add the following line of code:
QuickRep1.Preview;
3. Run your application and click the Preview button
to see the report. To print the report directly you
call the Print method instead of Preview.
You have created a simple list type report. In the following
chapters we will go through many steps in creating all types
of reports.
===================================================
That's the basic routine for hooking up a QuickReport.
-Terry
Post by George TrojanHi,
I've been using the TIBCursor to easily display my information into my
TAdvStringGrids. For the purposes of the QuickReport I can use the
TIBQuery, but I seem to be running into the same problems. If I use the
TIBQuery do I also need the TIBDataSource. I'm trying to assign the
TIBDataSource to the DataSet property in the Object Inspector but it isn't
available, even though the TIBDataSource is Enabled. Sorry I'm clearly
missing something very obvious but how do I link the TIBQuery to the
QuickReport?
Cheers
Post by TerryCI am accessing my Firebird 1.5 database using the ibCore
components - IB_Session, IB_Connection, IB_Transaction and
IB_Cursor (from package ibo40cdt_c5). From what I have read
my understanding is to acess the data for the report I need
to have it in a dataset for example a BDE TTable.
Any special reason you're using a TIBCursor instead of a
TIBQuery?
If you use one of those instead, it's just a matter of setting
your TQuickReport->Dataset property to the TIBQuery. Usually,
I'll create one of them specifically to feed my report.
Could someone please give a C++ example of how I can get my
data that is in my IB_Cursor into a TTable component or
another dataset component that could be connected to the
QReport.
Again, why a TIBCursor?
-Terry