Softilium: goode ideas, real tools Home | Download | Order | Contact me |

Description of report objects

Home > Software-Promoter > Software-Promoter docs > Reports designer > Description of report objects

"Text" object

This object represents framed rectangle with multiline text inside it. You can set frame type, color and width; all font attributes, text align and rotation.

In the memo of "Text" object you can place multiline text with variables, data fields or expressions. You can also attach this object to the DB memo field. This is examples of using variables, datafields and expressions:

Length, cm: [Length]

Length, cm: [Table1."Length_cm"]

Length, cm: [[Length_in_inches] * 2.54]

Length, cm: [Table1."Length_in" * 2.54]

Object's editor allows you to edit memo contents, insert variables and DB fields into edited text, edit script contents, and set output format for used variables or DB fields. You can use Insert key to insert variable, Ctrl+Enter key to close editor and Ctrl+F key to choose format for used variables.

Format editor allows to set formatting for variables, used in the memo of "Text" object. You can bring up this editor in memo editor by "Format" button, or in context menu of "Text" object. Variable can be showed as text string (with no formatting), as numeric value, as date, time or boolean value. For each formatting category you can choose one of several formatting strings (for example, you can set number of digits in fraction part of numeric value, choose long or short date format etc.). You also can set custom format string for each category (for example, #,##0.000 for numeric value). Formatting strings in this case is equal to Delphi formatting strings (is described in Delphi online help system, "Formatting strings" topic). Boolean values can be formatted by False_string;True_string string.

This format is implemented to each variable in the memo of "Text" object. If variable cannot be formatted, it showed as text.

If you using several variables in one object, but you want different format for each variable, you can use in-place formatting by "#" tag. Just put this tag and format string inside variable brackets:

[Variable #format], where format is one of following values:

  • x.x or Nx.x or Nyyyyy - numeric formatting. x.x - length of number/number of digits in fraction part; yyyyy - string like #,##0.00 (described in Delphi online help system, "Formatting strings" topic). If x.x or yyyyy string contains ".", ",", "-" characters, last this character will be used as decimal separator.
  • Dxxxxx, Txxxxx - date and time. xxxxx - string like dd.mm.yy.
  • Bxxxxx;yyyyy - boolean formatting. If value is False, xxxxx string will be shown, otherwise yyyyy string will be shown.

There is some examples of using "#" tag:

[Table1."N1" #9.2] [Table1."N2" #N9-2] [Table1."N3" #N#,##0.00] - numeric formatting

[Table1."Date1" #Ddd.mm.yyyy] [Table1."Time" #Thh:mm:ss] - date/time formatting

[Table1."Bool1" #BFalse;True] [Table1."Bool2" #BNo;Yes] - boolean formatting

You can not use format tag in variables editor.

In context menu of "Text" object you can set the following options:

  • "Stretched" - object has variable height depending of actual number of text strings in it. You should also turn on this option in object's parent band. When this band printed, it calculates maximal height of objects with Stretched option and stretch itself.
  • "Word wrap" - long strings is wrapped onto several lines of text.
  • "Autosize" - before drawing, object calculate its actual height and width and stretch itself.

"Band" object

FastReport is banded report generator, like other report generators. All its band is listed below.

Name Functionality

Report title Prints once at the begin of report

Report summary Prints once at the end of report

Page header Prints at the top of each page

Page footer Prints at the bottom of each page

Master header Prints at the begin of master list

Master data Data rows of master list

Master footer Prints at the end of master list

Detail header Prints at the begin of detail list

Detail data Data rows of detail list

Detail footer Prints at the end of detail list

Subdetail header Prints at the begin of subdetail list

Subdetail data Data rows of subdetail list

Subdetail footer Prints at the end of subdetail list

Overlay Prints on each page as background

Column header Prints at the top of each column

Column footer Prints at the bottom of each column

Group header Prints at the begin of each group

Group footer Prints at the end of each group

Cross header

Cross data

Cross footer These bands is intended for creating cross-tab reports

 

There is several band editors (for data-band, group header, and cross-data bands).

Data-band editor allows you to choose available dataset for the band or assign "virtual" dataset to it. When assigning virtual dataset, you should set number of records in it. When building report, band with virtual dataset will be printed as many times as many records in this dataset.

Group header editor allows you to set grouping condition based on the fields of DB table, or on any expression.

In context menu of "Band" object you can set the following options (depending of band type):

  • "Stretched" - band can stretch its height depending on height of its child objects.
  • "Breaked" - band can break its content onto a several pages or columns.
  • "Start new page" - when band is printed, report engine starts new page. When data-band has this option, new page starts after printing all child bands of this band.
  • "On first page" - band prints on first page (page header & page footer only).
  • "On last page" - band prints on last page (page footer only).
  • "Repeat on subsequent pages" - prints band on each new page. This option is available for Master header, Detail header, Subdetail header, Group header, Cross header bands.

"Picture" object

This object is intended for inserting pictures in your report. You can use BMP/WMF/ICO (and JPG, if available) graphic files. Object's editor allows you to choose file with picture and clear picture contents. You can also use pictures from BLOb field of DB table. To do this, put reference to this field into memo of object, for example: [Table1."GraphicField"]. Memo editor can be showed by pressing Ctrl+Enter key on "Picture" object or by Object inspector.

You can set the following options in context menu of object:

  • "Stretched" - picture is stretched to fill object's rectangle.
  • "Keep aspect ratio" - when stretched, picture keep its aspect ratio.
  • "Center" - picture will be printed at the center of object's rectangle.

"SubReport" object

"SubReport" object is intended for inserting nested reports in your report. This object is linked to another page of report. When building report, linked page draws on place of this object.

Subreport objects can be placed side-by-side. If you want place subreport objects one-under-other, spread it on separate data-bands. There is some limitation of using subreports:

  • Don't use columns in subreports.
  • Don't use ReportTitle, ReportSummary, PageHeader, PageFooter, ColumnXXX bands.
  • Don't use breaked bands.
  • Don't use groups.

"Line" object

"Line" object is intended for inserting horizontal or vertical lines in your report. You can set width and color of line. There is comfortable tools for drawing lines in designer.

"CheckBox" object

"CheckBox" object has a frame with check inside it. Check showed if logical condition placed in the memo is True. Logical condition may be any valid FR expression.

Note: for using this object in run-time, you should use TfrCheckBoxObject component from FR components palette. If opened report contains non-plugged components, you'll get an error message.

"RichText" object

"RichText" object is intended for inserting Rich Text Format (RTF) files in your report. It supports RTF 1.2. You can insert variables in text. Object's editor allows you to edit object's contents, load it from RTF files, insert variables into edited text. You can also use pictures from BLOb field of DB table. To do this, put reference to this field into memo of object, for example: [Table1."RichField"]. Memo editor can be showed by pressing Ctrl+Enter key on "RichText" object or by Object inspector.

If text out of object's bounds, extras strings will not printed.

Note: for using this object in run-time, you should use TfrRichObject component from FR components palette. If opened report contains non-plugged components, you'll get an error message.

"OLE" object

"OLE" object is intended for dealing with various OLE objects. Object's editor allows you to insert new OLE object or to modify existing object. You can also use OLE objects from BLOb field of DB table. To do this, put reference to this field into memo of object, for example: [Table1."OLEField"]. Memo editor can be showed by pressing Ctrl+Enter key on "RichText" object or by Object inspector.

"Stretched" option in context menu of object allows to show correctly data from Excel grid in some cases.

Note: for using this object in run-time, you should use TfrOLEObject component from FR components palette. If opened report contains non-plugged components, you'll get an error message.

"Chart" object

"Chart" object is intended for manipulating with various charts in your report. You can use 6 different chart types: lines, points, horizontal and vertical bars, areas and pie charts.

For link chart to the data fields, you should set names of two "Text" objects, which contents will be used as chart's value and legend string for each value. When building report, contents of these objects will be accumulated in the memo of chart object.

If "Text" object which used as chart's value contains formatted value (for example, "10 000.00" or "$100.00"), FR attempts to expand numeric value from this string. It skips all non-digit symbols at the begin and end of string, then skips all symbols - digit separators (usually "spaces"). If you set more advanced formatting (for example, "10000km2"), you can't using these objects as chart values. You should create non-visible object with same contents, but with no formatting, and use this object as chart value. You can hide object by Objects inspector (set Visible property of object to 0).

You can use two kind of charts: single and multiple. Multiple charts shows several charts on one coordinate grid. When used single charts, memo of chart object contains the following strings:

Header1;Header2;Header3

Value1;Value2;Value3

When used multiple charts, memo of chart object contains the following strings:

Header1;Header2;Header3

Value1.1;Value2.1 (first chart)

Value2.1;Value2.2;Value2.3 (second chart)

Value3.1;Value3.2;Value3.3;Value3.4;Value3.5 (third chart)

In this case, you'll get three charts: first with two points, second with three points and third with five points.

You can also build chart by editing its memo. Just put appropriate values into memo of object.

"Chart" object allows you to create "Top-10" charts. This chart represents several biggest values and summary of other values not included in chart. To do this, set number of top values on "Data" tab of chart editor and set legend name for non-included values ("Others" word is usual used).

This component is available in Delphi 3 and above. If you want use it in Delphi 2, you should install TeeChart component first, then correct FR.INC file and recompile FR library.

Note: for using this object in run-time, you should use TfrChartObject component from FR components palette. If opened report contains non-plugged components, you'll get an error message.

"Shape" object

Shape object is intended for inserting some shapes (rectangle, rounded rectangle, ellipse, triangle) in your report.

Note: for using this object in run-time, you should use TfrShapeObject component from FR component palette. If opened report contains non-plugged components, you'll get an error message.

"Barcode" object

Designed for insertion of bar codes in the report. You can use 2 of 5 interleaved, Code39, Code39 Extended, Code128A,B, Code93, Code93 Extended, MSI, PostNet, Codebar, EAN8, EAN13 bar codes.

Note: for using this object in run-time, you should use TfrBarcodeObject component from FR component palette. If opened report contains non-plugged components, you'll get an error message.


Prev Next
=== Documentation is provided by Word2Help ===

Copyright © 2000-2005, Nick Mokhnatov, Independent software developer. Terms of use. Privacy statement.
Updated on Sun, February 11, 2007