Skip to content

Components and Properties

Every Component in the Form Designer has a number of Properties, including the Report, Bands, Sub-Reports, Regions and other visual elements. You can use Properties to determine the look and feel as well as the behaviour of Components. This topic covers the most commonly used Properties in the Form Designer.

Report

To view the Report Properties, click the icon in the top left where the rulers meet.

  • DataPipeline - The Detail Band will be repeated once for every record in the Data Pipeline linked to this Property.
  • NoDataBehaviors - These Properties determine what is displayed when the primary Data Pipeline has no records. The preferred setting is ndBlankReport = True, with the other NoDataBehaviors Properties = False.
  • Printer Setup - When documents need to be output to specific printers, these Properties can be used to automatically select and configure a printer. Typically these settings need to be made onsite.
  • Units - utMillimeters is the preferred setting. When creating templates that are printed on continuous forms, the height of the form should be set using utInches, however.

Bands

The layout on a Template is determined by Bands, each with their own properties and behaviours:

  • Title - This is printed once at the beginning of the document, and can also be used as a Cover Page.
  • Header - This is printed at the top of each page.
  • Detail - This is printed once for every record in the list.
  • Footer - This is printed at the bottom of each page.
  • Summary - This is printed at the end of the document, after the Detail Band ends.
  • PrintHeight - This sets whether a Band is Static (Fixed height) or Dynamic (Height changes according to content).
  • Height - This sets the Height of the Band in the Units of the Report. Only applicable to Static Bands.
  • PrintOnFirstPage/PrintOnLastPage - This is applicable to Headers and Footers.
  • BottomOffset - This creates a space below the Band in the Units of the Report - ie. if Report is in mm, a BottomOffset = 3 will create a 3mm space.
  • NewPage - This is applicable to Title and Summary Bands - when checked a new page will be created for the Band. eg. a Cover Page for a Report.
  • Background1/Background2 - This is applicable to Detail Bands and used to create different backgrounds for alternate records. Use Report > PrintSetup > Margins to prevent the Backgrounds from printing to the edge of the Report.
  • PrintCount - This is applicable to the Detail Band. Set PrintCount = 1 to limit the Report to one detail record per page.

Label / DBText

Used to display text, numbers and dates in a single line. Commonly used properties include:

  • BlankWhenZero - This is applicable to numeric fields only - zero values are not displayed.
  • Transparent - Only the text is displayed - useful when placing on top of an Image
  • Anchor - This is used to anchor a component to the Top or Bottom of Dynamic Bands.
  • AutoSize - The size is set automatically according to the content (not recommended).
  • Ellipsis - When checked, an '...' is drawn where the text is truncated.
  • ReprintOnOverFlow - This will cause the Label/DBText to be reprinted if the Region or Band in which it is contained is split over a page break.
  • TextAlignment - This sets the horizontal alignment of the text.
  • VerticalAlignment - This sets the vertical alignment of the text.
  • DisplayFormat - Used to format Numerical and Date Fields - right-click component for shortcut to DisplayFormat selector. eg. Currency = R#,0.00; Date = mm/dd/yy; Count = 0 Items.

Avoid using Autosize = True;

(DB)Memo/(DB)RichText

These components are used to display text in multiple lines. The Memo component is used to display plain text and the RichText component is used to display rich text. Commonly used properties include:

  • BottomOffset - This creates a space below the Band in the Units of the Report - ie. if Report is in mm, BottomOffset = 3 will create a 3mm space below the Memo.
  • ShiftRelativeTo - This is used to determine the Top (starting point) of the component based on how much a preceding component stretches. The preceding component is selected in this property.
  • StretchWithParent - The height will increase according to how the Parent (Band or Region) stretches.
  • Stretch - This determines whether the component will stretch to display all the content or remain at a static height.

Image / DBImage

Used to display images on a report. Following are some of the commonly used properties.

  • Picture - This is used to link an image to the non-data aware component.
  • GraphicType - AutoDetect should work fine in most instances. For best results use .jpg or .png images that are no larger than 150dpi (59ppc) at final size.
  • Stretch - This determines whether the component will stretch to display all the content or remain at a static height.
  • MaintainAspectRatio - Keep this property checked to ensure the image is not distorted when the Picture size does not match the Image component's size.

Avoid setting the Transparent property = True - this might cause unexpected results when exporting the template to PDF; Avoid using Autosize = True; Always set Report>PDF Settings>Scale Images = False;

Lines

Lines can be added to a Report to separate and group components and to create grids. Useful properties include:

  • Position - Top, Bottom, Left and Right.
  • Pen - This sets the Style (Solid, Dashes, Dots), Color, etc.
  • Style - Single or Double.
  • Weight - Ideally set between 0.2 and 0.5mm - try to keep the weight consistent throughout the report.

The Alignment, Distribution and Size tools are very useful when creating tables with Lines. The height and width of a Line does not affect how it will be displayed - the height and width must be set to the minimum that enables easy selection of the line.

DBCalc

This is used to create a summary of values displayed in the Detail Band. The type of summary is set using DBCalcType. Options include: Sum, Max, Min, Average, Count.

When a DBCalc is used to display a summary ahead of the Detail Band, the LookAhead property needs to be checked and the Report>PassSetting must be set to psTwoPasses.

System Variable

System variables are mostly used to show page numbers and the time and date a document was created. The most important properties are:

VarType

  • vtPageSetDesc - This creates a combination of page number and page count eg. Page 1 of 3
  • vtPrintDateTime - This prints the date and time the document was created or printed.

SubReport

A SubReport is used to nest reports or to group multiple Reports into one Report. All the properties used for a Report (see above) also apply to a SubReport. And in addition, the following properties are commonly used:

  • PrintBehavior:
    • pbChild - This is used when the SubReport is placed in the Detail Band of a Report to create a sub-detail list linked to the base DataPipeline. In pbChild mode mode the Header and Footer Bands on the SubReport are not visible.
    • pbSection - This is used to create a new independent Sub-Report. A pbSection SubReport should be placed in the Title, Detail or Summary Bands.
  • ParentWidth - When checked, the width of the SubReport is equal to the Report width. Uncheck this setting to set the SubReport to a different width.
  • ParentPrinterSetup - Uncheck this setting when the SubReport must print to a different printer.
  • KeepTogether - This will prevent the contents in the SubReport to be split over multiple pages. Care must be taken to ensure that the contents of the SubReport won't ever exceed a full page.
  • BottomOffset - This creates a space below the SubReport in the Units of the Report - ie. if Report is in mm,  BottomOffset = 3 will create a 3mm space below the SubReport.
  • ShiftRelativeTo - This is used to determine the Top (starting point) of the component based on how much a preceding component stretches. The preceding component is selected in this property.
  • StretchWithParent - The height will increase according to how the Parent (Band or Region) stretches.

When the SubReport PrintBehavior property is set to pbChild, the Visible Property on the SubReport Header and Footer Bands is unchecked. If the PrintBehavior property is changed to pbSection, the Header and Footer Visible properties need to be manually checked.

Region

A Region is used to group a number of components so that they move together in response to changes in other dynamic components. They are also useful for managing the behaviour of components when a Report runs into multiple pages. Commonly used properties include:

  • Border - By default a Region has a black border. To clear the border, set Pen > Style = psClear.
  • KeepTogether - This will prevent the contents in the Region to be split over multiple pages. Care must be taken to ensure that the contents of the Region won't ever exceed a full page.
  • BottomOffset - Creates a space below the Region in the Units of the Report - ie. if Report is in mm,  BottomOffset = 3 will create a 3mm space below the Region.
  • ReprintOnOverFlow - This will cause the contents of the Region to be reprinted if the Region is split over a page break.
  • ShiftRelativeTo - Used to determine the Top (starting point) of the component based on how much a preceding component stretches. The preceding component is selected in this property.
  • StretchWithParent - The height will increase according to how the Parent Band stretches.

Check the Report Tree to ensure components are nested in a Region and not just overlapping the Region.