Friday, February 01, 2008

An article for you on delphi3000.com

Andi Purwito sent you this message at 2/1/2008 4:54:08 AM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've found an interesting delphi-related article on delphi3000.com:

http://www.delphi3000.com/article.asp?id=483

<b>Creating Reports at runtime</b>

You can create reports at runtime using the QRCreateList function. The
following code shows you how.

QRCreateList(aReport, Self, qryCountry, 'Country Report', FieldList);

aReport is the name of the report.
qryCountry - Table name 'Country Report' - Report title FieldList -Llist
of
dataset fields to include on the report. If the list is nil or contains 0
items, all of the fields will be used.

The code to create a report at runtime is as follows:

{ default the list to nil }
FieldList := nil;

{
Make sure the new report object is set to nil, otherwise the
QRCreateList
function will not create it and you will get an access violation.
}
aReport := nil;

{
Make the call to create the report. This will create the report with a
Column
Header band and a Detail band. You can customize the report to include
group
band, summary band, etc. before calling preview or print.
}
QRCreateList(aReport, Self, qryCountry, 'Country Report', FieldList);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

=============================
> Your delphi3000.com - Team
> delphi3000@bluestep.com
=============================

0 Comments: