QuickReport 3 is a set of Delphi components designed to let you produce database output quickly and easily. It lets you create print previews where the user can check the result of a printout without wasting paper. You can even use QuickReport formatting facilities to print out non-database data, if you need to.
QuickReport 3 is a set of Delphi components designed to let you produce database output quickly and easily. It lets you create print previews where the user can check the result of a printout without wasting paper. You can even use QuickReport formatting facilities to print out non-database data, if you need to.
Build Reports
using
(CQ QuickReport 3
for Borland Delphi
Distributed Worldwide by QBS Software Ltd
Fle: CAMINDOWSITENPIOUeRapet doeContents
What is QuickReport 37,
‘There's more
A first report
The components.
Band components 10
Printable components u
Previews and composite reports 13,
Filters, 15
Chart 16
Creating reports..
TQuickRep in detail 7
‘Working with bands 2
Groups 7
Masteridetail reports 29
More about printable components..
‘Text components
Using expressions
Creating a default custom preview.
Further resources.
2 Build Reports using QuickReport 3What is QuickReport 3?
QuickReport 3 is a set of Delphi components designed to let you
produce database output quickly and easily. As well as allowing you to
fling together printed reports, QuickReport lets you create print
previews where the user can check the result of'a printout without
‘wasting paper, and export data to other file formats, such as plain
ASCII, comma separated values (CSV) and HTML,
QuickReport is itself written in Delphi and knows all about the Delphi
model for handling databases. So you can use it to report on traditional
BDE-based databases such as Paradox and dBase, client datasets used in
‘multi-tier environments, the new Delphi S ADO and Interbase Express
‘components and third party altematives such as Apollo. You can even
use QuickReport formatting facilities to print out non-database data, if
you need to
This manual is designed to get you up to speed quickly with
QuickReport, so that you can start to use it in your own applications at
There's more
‘QuickReport is a fine product — but if you need even more versatility,
‘you might consider upgrading to QuickReport Pro. Naturally, the Pro
version is offers everything in the standard product plus:
+ Three extra export filters:
cel XLS: The XLS filter is compatible with Excel 4 and later, and
provides a simple and robust mechanism for exporting unformatted
data into spreadsheets.
Rich Text RTF: The RTF filter, based on Microsoft’s RTF version
1.5 spec, supports more RTF features than TRichEdit itself.
Windows Metafile WMF: The WMF filter lets you capture report
‘output in a convenient graphical format.
+ Some powerful extra components. Let the user do the work:
TOREditor is an end user report editor that you can ship royalty-free
with your app.
Build Reports using QuickReport 3 3TQuickAbstractRep is a descendant of the TCustomQuickRep base
class that does not use 7Dataset- use it to build your own report
systems.
TORLoopBand prints the number of times set in its PrintCount
property - great for creating blank forms.
TORListWizard wil create an instant report based on the fields of a
table.
* Expert technical support via email
* Full source code. Use the source, Luke! The user can easily modify
the code to localise the language, adopt it to local interface
standards, add new features and so on.
+ More demos with more depth, including examples of how to make
use of all the Pro edition features, and advanced techniques such as,
writing custom funetions for the expression evaluator.
‘You can upgrade to QuickReport Professional by ordering from our web
site, that of our distributor QBS Software Ltd at hitp://www.abss.com or
fiom your local Delphi add-on reseller.
Build Reports using QuickReport 3A first report
The best way to get the hang of the QuickReport library is to see it in
action. So this section explains how to set up a very basic report. With
the Delphi IDE running, follow these steps:
1
2
3
Choose File | New Application.
Drop a TTable component onto the main form.
Use the Object Inspector to set its DatabaseName property to
“DBDemos’, TableName to ‘CUSTOMER DB’ and Active to True.
Drop a TQuickRep component on the main form. Its size and
position don’t matter.
Set its DataSet property to “Table!” This is a key step. The report
object to iterates through all the records in it DataSet, in this case
Table], whenever itis printed or previewed.
If necessary, expand the Bands property in the Object Inspector by
clicking on the + symbol to its left. Set the HasDetail item to True.
You will see the detail band appear inside the report; changing the
property actually creates the DetailBand! object.
Drop a TORDBText component onto the newly created detail band.
Set its DataSet to “Tablel? and DataField to ‘Company’
At this point your form should look something like Figure I below.
Figure 1 - Setting up a basic report
‘To check that you have set up the properties correctly, preview the
report by right-clicking somewhere on the 7QuickRep component and
selecting the Preview item from the popup menu. If you did everything
right you should now see a preview window containing your report, as
shown in Figure 2.
Build Reports using QuickReport 3 5Figure 2 — The preview window
\OBB|n«>n|\SSla
Kauai Cive Shoppe
Unisco
Sight Diver
Cayman Divers World Unlimited
Jom Sawyer Diving Centre
fall has gone well, you now have a report that works at design time. OF
course all may not have gone well. If you are now moumfully gazing at
an entirely blank report, please check that you have completed all the
steps —a likely explanation is that you forgot to set TTablel’s Active
property to True. Similarly, if you are looking at a report with only one
line — ‘Kauai Dive Shoppe’ — the problem is probably that you failed to
connect QuickRep!’s Dataset property to TTable!.
‘One other problem which may bite you is that the buttons on the toolbar
above the report preview area fail to appear. This is nobody’s fault: you
have become a victim of what the manufacturer of your PC’s operating
system is pleased to call, in its technical documents, ‘DLL Hell’
Specifically, your machine's copy of the common control library
(cometr132.dll) is before 4.72, and needs updating
Build Reports using QuickReport 3You can download a later version of cometr132.dll from the Microsoft
website at http:/www.microsoft.com. But since this is one of those files
that invariably turns up in new versions of Internet Explorer and
Windows Service Packs, you may well find it on one of those CDs that
they give away with PC magazines, and save a download. (In fact, itis
unlikely that this bug will bite you the developer. We describe it here so
that you will recognise the problem if one of your users is caught by it)
Now lets make the report work as part of a compiled program. You need
to write code to call TOQuickRep Preview:
1 Drop a button to your form and set its Caption property to ‘Preview’
2 Double click on the button to add an OnClick event. Add a line of
code, so that it looks like this:
procedure TForn!.ButtenlClick (Sender: Tobje
begin
QuickRepl. Preview:
end;
Now run your application and click the Preview button. As before, you
should see the preview window appear. If you want to try printing the
report directly to the default printer, simply change the call to the
Preview method to a call to Print, ie
procedure form! .ButtonlClick (Sender: Tobject) ;
begin
QuickRepi.Prints
end;
At this point I must admit to taking a slightly dirty shortcut. Our test
application a TQuickRep component on its main form and, as you can
see, this looks pretty odd. In real applications you never display a form
containing a TQuickRep component. Instead you use them from other
forms
So what we should really do to finish off, if this little example were
going to be a real application, is:
1 Create another form — it will be called Form2
2. Make the new form into the main form of the project by setting
Project | Options | Main form to Form2
3° Drop a button on Form2
Build Reports using QuickReport 3 74° Write code like this in the button’s event handler
procedure TForn?.ButtenlClick (Sender: Tobje
begin
Form QuickRepl.Pre
end;
5 Compile the project. The compiler will complain that Unit! is not in
Unit2's Uses list, and offer to fix the code. Accept the offer.
‘The application should now compile and run, and looks prettier and
more ‘realistic’. The end user doesn’t get to see any bewildering
TOuickRep components.
But doing this aesthetic potishing doesn’t get us any further with
QuickReport. So T am going to leave out the need to have a second form
from all the examples from this point onwards, and trust you will
remember when making real applications.
Build Reports using QuickReport 3The components
‘The QuickReport components are all contained in the QReport tab of
the Delphi component palette. Here is a whistle stop tour of what they
are and what they do to help you get your bearings.
Figure 3 - TQuickRep and band components,
ToRsingstene ToRBara
areal Tercnigeane
route \ | ToRGroun
Ta
bands
TQuickRep. This is the most important component of them all,
container for all the other printing components. It represents the paper
‘on which your report will be printed. Its Page property lets you set up
the dimensions of the paper you are going to print on, while the Dataset
property specifies a source of data that the report will iterate through
Note that, instead of dropping a TQuickRep component onto an ordinary
form, you can instead add a TQuickReport module to your project:
1 Choose File | New... to display the New Items dialog box.
2 Choose the New tab
3. Select the Report item (middle of the bottom row)
A TQuickReport is a bit like a TDataModule — itis a specialist type of
form, which is never displayed to the user. If you wish you can use
TQuickReport pseudo-forms instead of TOwickRep components on
ordinary forms — there is no difference in their methods, properties and
events, But we recommend, from experience, that you put a TQuickRep
‘component on a form: it’s the more versatile approach, For example,
having the TQuickRep component on a form lets you use the form's
OnCreate event if you want to create additional objects to be used by
the report programmatically.
Build Reports using QuickReport 3 °10
Band components
These are also container components, representing horizontal strips
‘across report. Bands can be associated with a physical position on a
example the top — and also reflect the master/detail
relationships in the database that is being displayed. For example, in the
same way that there might be many sales records for a given customer
record, so a band containing data about an individual sale might appear
‘many times for each occurrence of a band containing customer data
TORSubDetail. This is the detail band in a master/detail relationship
You can also make it the master of another detail band, and so create
multiple levels of subdetails
TORStringsBand. This band provides one mechanism to report on data
without using a 7DaraSet It encapsulates a TStrings container; instead
of retrieving a sequence of records from a database, it retrieves a
sequence of strings from its container.
TORBand. A generic band type, which can act in different roles
according to it BandType property. Usually there is no need to drag a
TORBand onto a report. Instead use the Bands property of TQuickRep,
which creates TORBand objects and sets their band type in one go.
TORChildBand. Use TORChildBand objects when you need to extend
an existing band, For example, suppose you have placed some
TORMemo components in a band, and wish to add, say, a TORLabel,
which should always appear below. Since TORMemo objects can
‘expand themselves according to their contents, it is not suflicient to
arrange the label within the band. Instead add in a TORChildBand
object, and put your label on that. The easiest way to add a child band,
by the way, is to double-click the HasChild property of its parent in the
Object Inspector.
TORGroup. A band that prints whenever an expression changes, usually
a database field, This band is used to group like records together. For
‘example, given a database table containing US addresses, one could sort
them by a State Code field and add a group band with it Expression
property set to the State Code field. When the report is printed, the
contents of the group band will be printed between records belonging to
a given state.
Build Reports using QuickReport 3Printable components
Figure 4 - Printable components
TORDBText TORSysData
ToRLavel | TORRIchText TORDBRichText
\
frei Tas
Sep
ae — = x
TORExpiMemo TERImage
The QuickReport printable components are mostly equivalents of
standard controls that you use on forms. These are the controls, which
actually get printed on the paper. Position them within bands to define
the layout of your report.
TORLabel, Place some static text on the page.
TORDBText. Equivalent of a TDBText control — use it to display the
contents of a linked database field. Unlike ordinary data-aware controls,
‘but in common with all QuickReport controls, TORDBText uses a
DataSet property to specify its source of data. Normal data-aware
controls use a DataSource property, which requires you to supply an
extra TDataSource component to ‘wire’ controls to a dataset.
QuickReport controls have no such requirement.
TORExpr. Use this to display an ‘expression’. Typically you use one of
these when you need to massage the appearance of your data before
printing it out, The best way to think of these is as ad hoc calculated
fields, used only in the report. For example, you might use it to
concatenate the parts of a customer name, held in a customer table as
string fields called “Title”, “Forename” and “Sumame”. To do this
simply set the Expression property of TORExpr to
Title +" "+ Forename +" " + Surname
In real life, you would probably use a more complex expression to cope
with blank fields elegantly, but you get the idea
Build Reports using QuickReport 3 ulR
TORSysData. A control to display ‘system data’, by which we mean
things like the current page number within the report, and the current
date and/or time,
TORMemo. Very much like its standard control cousin the TMemo; use
this to display multiple lines of text. As you would expect, the text to be
printed is held in a TStrings type property called Lines.
TORExprMemo. A composite of TORExprand TORMemo. You can use
this to include {braced} expressions in multi-line blocks. This makes it
an absolute natural for doing addresses, especially since it includes a
boolean property RemoveBlankLines, For example:
Company : {CompanyName}
Address : (Address1
(Address2}
Contact : {Contact + ' ' + Phone number}
TORRichText, Place some rich text (ie multiline text with RTF
formatting) on the page. One use of this component is to print the
contents of a TRichEdit control - simply assign it to TORRichText's
ParentRichEdit property
TORDBRichText. As you'd expect, this is a data-aware version of
TORRichText. Use it to print formatted memos stored in BLOB fields.
TORShape. A cousin of the little-used TShape control from Delphi's
“Additional” palette. Actually the QuickReport version is very useful for
placing ‘furniture’ into report layouts such as dividing lines above totals
and grouping rectangles.
TORImage. Display a picture or logo on a report using this control
Supports the same vector and bitmap image formats as Timage, and can
be loaded at design time using the Picture property.
TORDBImage. A data-aware image control for displaying images stored
in BLOB fields in the database.
Build Reports using QuickReport 3Previews and composite reports
Figure 5-Filters and miscellaneous components
TORTexFiter TORCSvFilter
TORPreview TORHTMLFilter
monsemeasiereton \ / TARChart
4
‘ters
TORCompositeReport. Sometimes you need to group together separate
reports into a single print run, For example, maybe you need to print out
all the new customers obtained in the last week, together with a
summary of all orders in the last week and also a list of stock that needs
reordering. As far as your customer is concemed these things belong
together and should be printed together. But from the database point of
view you will want to use three separate 7QuickRep components to do
the job.
‘The way to handle this situation is to use a TORCompositeReport
‘component. Drop one on the form where you want to kick off the
printing, First you need to define a handler for its OndddReports event,
which calls the TORCompositeReport.Add method to add all the
TQuickRep components you need to print. Suppose the reports you want
to print are held on forms called RepNewCust, RepOrderSummary and
RepStockReorder, and in each case the TQuickRep component on the
form is called ‘Report’ (see the section ‘TQuickRep in detail’ below for
why you might do this). Then your OnAddReports event handler should
look like this
Build Reports using QuickReport 3 34
procedure Porm! -Ok
Sender: TObj
begin
ORCompositeReport
(QRCompositeReport -Reports Add (RepOrders y-Report) +
QRCompositeReport 1 -Repozts Add (RepStockReorder. Report)
end;
(Ifyou don’t mind using the with statement in your code, you can tidy
up this fragment considerably by wrapping it up in
with QRCompositeReporti Reports do
begin
ond;
and knocking out the ugly repetitive QRCompositeReport Reports from
the middle three lines.)
Now you can call ORCompositeReport].Printto print out all three
reports in a single batch, and ORCompositeReportl. Preview to preview
them together. There are also TORCompositeReport component
properties that let you set up paper sizes and set an overall ttle for the
‘composite report ~ basically everything you need to handle the output
from the multiple reports in one place.
TORPreview. To preview a report before itis printed for real, all you
need do is call TQuickRep.Preview and a standard preview window will
appear. There are times, however, when you want to have more control
over the exact appearance of the preview.
‘The TORPreview control lets you do this. Drop it on one of your own
forms and, after you have added a line of code to the
TQuickRep.OnPreview event, the control will act as a frame for the
previewed report, If you are more ambitious, or you want to change the
preview of a composite report, you can register your own preview form
as the default. See the section ‘Error! Reference source not found.”
later on for details
Build Reports using QuickReport 3Filters
‘Sometimes, instead of printing or displaying it directly, you need to
‘export data from your database to another format. QuickReport comes
complete with three filter components that let you do this quickly and
casily for their respective formats. Simply drop the export filter onto the
same form as the report, and the file format appears in the drop-down
list of the Save To file dialog in the preview. Registration is automatic,
and you don’t need to code a thing! (Don’t worry - you can export a
report programmatically too if you wish ~ see below.)
Note that not all printable components are exported by filters.
Specifically, only the contents of the following text-producing
‘components appear in exported data: TORLabel, TORDBText,
TORExpr, TORMemo, TORSysdata and TORExprMemo.
TORTextFilter. “Text” format: exports the contents of the report in plain
ASCII, using spaces to separate fields.
TORCSVFilter. CSV format: exports the report as ‘Comma Separated
Variables’. As well as using a comma to separate fields, this filter places
“double quotes” around them, which allows you to have commas within
the fields themselves. This format is easily imported into spreadsheets
such as Microsoft Excel. By the way, the component has a Separator
property that specifies the character used to separate the fields. By
default this value is set to *,” comma, but it can be changed to match
‘your requirements,
TORHTMLFilter. HTML format: exports the report to a HyperText
‘Markup Language file, as used in web browsers, some emailers, help
systems and many other places.
It is also possible to call filters explicitly from code. This fragment uses
the HTML filter.
quickrep! Export ToPilter (
IDORHTMLDOCUn cre:
To use the Text or CSV filters in this way, use the same ExportToFilter
call but instantiate a TORAsciiExportFilter ot
TORCommaSeparatedFilter object as appropriate.
Build Reports using QuickReport 3 1sChart
TORChart is a version of TChart adapted to work with QuickReport
This allows you to add complex charts to your reports - the combination
is very powerful indeed. TORChart is used in the same way as the
ordinary TChart control — double click it to bring up its extensive
property editor. For details of how to accomplish tasks such as setting
up series and adjusting the look of a chart, please see the TeeChart
documentation.
Version incompatibility
Because of dependency issues beyond our control, certain versions of
TeeChart are incompatible with newer versions of QuickReport, and the
TORChart control and the whole of TeeChart can be unloaded when
you upgrade QuickReport. For example, at time of writing the Delphi 3
version of QuickReport 3 (or higher) will not work with TeeChart,
because the version of TeeChart that is shipped with Delphi 3 is coded
to depend on the QuickReport 2 package. A workaround is to download
the (free) TeeChart 4 evaluation version from the TeeMach site at
hitp://www.teemach.com/
This issue extends to the Decision Cube components found in
Client/Sever and Enterprise Editions of Delphi — these depend on
‘TeeChart, and get unloaded when it does. At present, there is no way to
use the Delphi 3 Decision Cube with both QuickReport 3 and TeeChart.
‘We do apologise for this unsatisfactory situation. Since it is caused by
design decisions made by other parties in code we cannot access, so that
wwe are not able to fix matters autonomously. If'you run into trouble
when upgrading QuickReport, please check our website
http:!www.qusoft.no/ and TeeMach’s for the latest information,
Build Reports using QuickReport 3Creating reports
The first step when creating a QuickReport is to create a form to store
your TQuickRep component. We refer to this form as a ‘report form’
since it’s just a container for a report component and is not shown to the
‘end user at runtime. It's a good idea to adopt a naming convention for
such reports so that they are easily identifiable in the project manager
and in directory listings. For example, you could prefix all report form
names with ‘rep’ or ‘rp’ to make them stand out. You might want to use
a similar scheme with form and data module unit names.
TQuickRep in detail
The next step is to drop a TOuickRep component onto the form. Another
useful convention you may like to adopt: by naming all TQuickRep
components ‘Report’, you can reference them as
repCustomerListing. Report, repSalesListing. Report and so on.
Units and Zoom properties
When dropping the TQuickRep component on a form you will se a grid
to act as a guide for positioning components. The grid is shown in the
current QuickReport units, Select the currently active unit by changing
the TQuickRep. Units property in the property inspector. The grid will be
updated when you change this property
Figure 6 - Adjusting the Units property to ater grid spacing
Company n> Company nan
With Units set to ‘MM’, the grid displays at 10mm intervals; if it is set
to ‘Inches’ then the grid displays at 1" intervals. Using the grid you can
produce very accurate report layouts, positioning and sizing
QuickReport components to 0.01" or 0.01mm.
Build Reports using QuickReport 3 uv18
Usually your sereen is too small to display an entire TQuickRep
component, since it sizes itself based on the actual paper size selected.
To get a clearer picture of the whole report, change the Zoom property
to 50% or less. Changing the zoom causes the TOuickRep component
and all the printable controls it contains to be redrawn at once to the
requested scale. This feature can also be used to enlarge important
details for accurate positioning and sizing
Paper size and margins
‘You can set up page layout accurately by expanding the Page property
of the TQuickRep component. Double click on the + sign to the left of
Page’ in the Object Inspector to expand the sub properties. You will
now see all the settings controlling the page layout.
Figure 7 - Page sub properties
El
QuickRept: TouckRe >]
Prpetes [Even]
BoticnMang
Colunns
Colunnpaci0,000n
Leftrain 0.284in
Lengh 116330,
riertation | poPortrat
PapaSize Ad
RighMaign O23fin |
Puls Tne
TopMagn 034m
Widh /826Gn >|
[all shown vA
‘The values given are in the currently selected Units, in this case inches.
‘The margin settings can be seen as blue dotted lines on the TQuickRep
‘component. All bands are sized to fit inside the margins
‘The sub properties are described in Table 1 below:
Build Reports using QuickReport 3Property
BottomMargin
Columns
Columnspace
LefiMargin
Length
Orientation
Papersize
RightMargin
Ruler
TopMargin
Wath
Table 1 - Sub properties of Page
“TypeWahes
Extended
Integer
Extended
Extended
Extended
TPrinterOrientation =
(poPortait, paLandscape)
TORPaperSize
(Default, Letter, LetterSmall,
Tabloid. Ledger, Legal.
Statement, Executive, A3, Ad,
AASmall, AS, B4, BS, Folio,
(Quarto, qr10X14, qr X17,
Note, Env9, Envl0, Envll,
Enyl2, Envl4, Sheet, DSheet,
ESheet, Custom)
Extended
Boolean
Extended
Extended
Units property determines
interpretation.
[Nummber of columns when
printing multicolumn detail
bands.
Space inserted between each
ccoluma in a multi column
report. Units property
determines interpretation.
Units property determines
interpretation,
Read-only, unless PaperSize
is Set to Custom. Units
property determines
interpretation.
‘Those are all the default paper
sizes supported by Windows,
Touse another paper size, set
this property to Custom and
sel Length and Width
appropriately but see also
note below.
Units property determines
imerpretation.
Enables display of grid.
Units propery determines
interpretation.
Units property determines
interpretation
Build Reports using QuickReport 3 19Not all printer drivers support setting custom paper sizes through the
Custom setting of Papersize. In these cases you must select ‘Custom
paper size’ in the printer driver's own dialog (accessed from the
Windows Control Panel) and define the paper's dimensions there. Set
this custom paper size to be the default paper size for that printer and
finally set the TQuickRep. Page. PaperSize property to Default. Your
custom size will now be picked up at runtime.
Alternatively, and pethaps more robustly, use the next largest standard
paper size, and set the margins to keep the printing within the custom
area.
Selecting a font
‘As you would expect, you can set the default font for your report in the
TQuickRep.Font property. Double click on the property to get the
standard Delphi font dialog.
The fonts listed are the Windows system fonts, True Type fonts and any
PostScript fonts (if Adobe TypeManager is installed). You can use any
combination of fonts in your reports but we advise the use of TrueType
‘or PostScript fonts if you intend to allow the user to preview the report.
The system fonts do not scale very well in preview.
Some dot matrix printers print much faster if you select a font already
build into the printer hardware, called a ‘printer font’. Such fonts are not,
listed by the font dialog, but ean be set programmatical
repCustomeriisting.Report.Font.Name +
‘The readability of your report depends very much on your font
selection. You should consider this carefully when selecting fonts.
Using many different fonts, colours and styles in a report can easily
make it look cluttered and difficult to read,
Build Reports using QuickReport 3Title and Description
‘The TQuickRep component has Title and Description string properties
to identify and describe the report, These are provided for your
convenience, so you can make report selection a data-driven procedure.
For example, you might have generate a menu that lists all your reports
by title and shows the description when the user selects a report. An
‘example of this can be seen in the QuickReport example project.
The Title property can be printed on the report itself using a
TORSysData component.
Functions
The Functions property of a TQuickRep allows you to set up constants
and functions that can be used by QuickReport expressions contained in
any TORExpr, TORExprMemo and TORGroup components that you
drop on the report. Double-click the property the *...” button in the
object inspector to bring up the special property editor:
Figure 8 - Functions property editor
SN ET
ai | Eo | be |
Use this dialog, and the expression builder that underlies it, to define
constants that you expect to require in multiple expressions. For
example, you can see that in Figure 8 above I have defined, with a
regrettable lack of originality, the constant PI as 3.14159265358979.
‘The other functions you see, PAGENUMBER, COLUMNNUMBER and
REPORTTITLE, are automatically predefined.
Build Reports using QuickReport 3 22
Working with bands
QuickReport is a handed report generator. If you are unfamiliar with
banded report generators you can think of them as small paper
templates, which are arranged horizontally on a page and filled with
data. Different templates are copied into different parts of the
pagelreport. The printable components, TORLabel, TORDBTextand so
‘on, are designed to be placed on these bands. Placing these components
directly on the report is not supported.
‘The easiest way to add bands is via the TOuickRep.Bands property in
the Property Inspector. Click the “+” sign to the left of the word ‘Bands’
to expand the list of common bands:
Figure 9 - Bands sub properties
4
uckFeat: TouckRep
Propo | Events|
(Bande (TOuitFesB onde =
HosCohunbeade
Hosdotl
HasPagefooter
HosPageteode
HosSummn,
Hostile
Curcr
[All shown,
‘The Object Inspector shows if a given band type exists in the report or
not, and you can add or delete a band simply by changing the relevant
property. Bands created this way get names that describe their function:
DetailBand!, PageHeaderBand! and so on. The BandType property of
each band is also set automatically
Build Reports using QuickReport 3You can also add bands by selecting the TORBand component on the
‘component palette and dropping it on the report. Note that if you do it
this way you must take care to set the BandType property to the desired
band type, and you should also give the band a descriptive name. The
Bands property of the container TQuickRep will update itself to reflect
bands added to the report this way.
While it is possible to add a band manually and set its BandTType to
rbSubDetail or rbGroupHeader, this is not recommended. These band
‘types are intended for use only with TORSubDetail and TORGroup
components. Using them elsewhere may cause unexpected and
‘undesirable effects when the report is printed.
Here are the simple band types you can add to a report:
‘Table 2- Simple band types
Band type Purpose
Page Header ‘The frst band usually printed on all pages. Whether
itis printed on the frst page printing is governed by
the report's Options FirstPageHeader property. The
Python Programming Reference Guide: A Comprehensive Guide for Beginners to Master the Basics of Python Programming Language with Practical Coding & Learning Tips
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More
Python Programming Reference Guide: A Comprehensive Guide for Beginners to Master the Basics of Python Programming Language with Practical Coding & Learning Tips
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More