Previous Topic

Next Topic

Expression Components

Expression components are used to display the results of MaxBasic expressions. They can be used to display single data fields on reports, or can be used to display results of an expression that results in a string of characters. Expressions are the most commonly used component.

See also Report Designer Component Properties for properties common to all components, such as position and size.

Expression components have the following properties:

Alignment

Set options to align the component:

  • taLeftJustify - The text is left justified within the component.
  • taCenter - The text is centred within the component.
  • taRightJustify - The text is right justified within the component.

AlignWithMargins

When True, the component will align with the page margins.

Angle

The angle to display the text on. For example, setting the Angle to 90 will display the Caption vertically.

AutoHeight

When True, the height of the component will be automatically adjusted to fit the text.

Border Properties (BorderBottom, BorderLeft, BorderRight, BorderTop)

You can place borders around text components. This is useful for drawing boxes around components or separating components from each other with lines.

  • rbNone - No border is printed.
  • rbSingle - Print a single solid line border.
  • rbDouble - Print a double solid line border.
  • rbDashed - Print a single dashed line border.

BorderColor

The component border colour. Click Open Color Dialog (F2) to select the colour. See Color Property.

BrushColor

The component background colour. The Transparent property must be set to False for the BrushColor to be visible.

Click Open Color Dialog (F2) to select the colour. See Color Property.

DrillDownCode

A unique identifier for the Primary Index on the DrillDownTable e.g. a CustomerCode for ARCUST or a DocumentID for INHead.

Provides clickable field functionality for report previewed to screen.

DrillDownTable

An Accredo or TD Custom table name e.g. ARCUST for an expression displaying CustomerCode or CustomerName.

ExportColumn

When exporting the report, the column that will contain this component text.

ExportColumnWidth

When exporting the report, the width of the column for this component.

ExportRow

When exporting the report, the Export Row is used if the Band is exporting multiple lines.

Expression

The full text of the MaxBasic expression which is evaluated when the report is printed. To enter an expression, you can:

  • Type the expression directly in the Property Editor.
  • Type the expression in the Code Editor at the bottom of the Report Designer window, - OR -
  • Click CodeEdit Open Code Editor (F2) from the Expression property of Property Editor to enter the expression in the Code Editor.
  • Double-click the expression component to open the Code Editor.

If an expression's value is numeric (including any Foreign Exchange, Amount, Price, or Percent), the component is not AutoWidth, and not WordWrap, and the formatted text does not fit into the component width, all characters except decimal and thousand separators are replaced with ? and the resulting string is truncated according to the component alignment. This ensures that where numbers cannot display correctly, they can obviously be identified as ????????.??.

Font

Determines the font of the printed output. Click Open Font Dialog (F2) to select the font, style, size and characteristics. You can change the font by clicking the appropriate buttons on the toolbar. If you change the font, the ParentFont property (see below) will be set to false. The font properties - Name, Size, Colour, Bold, Underline, Italic and Strikeout can be accessed from MaxBasic code during a report. The font can be changed while a report is running to identify certain types of data.

FontColor

The text colour. Click Open Color Dialog (F2) to select the colour. See Color Property.

Format

The format for the result of the expression.

ParentCustomHint

When True, uses the Custom Hint of the parent Band.

ParentFont

When True, uses the Font of the parent Band. Setting this property to True means you can change the font of a band (or the entire report) and have all components on that band (or the report) change to the same font.

VerticalAlignment

Set options to align the text within the component vertically:

  • avTop - The text is aligned with the top of the component.
  • avBottom - The text is aligned with bottom of the component.
  • avCenter - The texts is centered within the component.

AutoHeight must be False for this property to have an effect, so the component is a fixed height and text is aligned vertically within it.

WordWrap

When True, if the text in the component exceeds the width of the component, the text will wrap to new lines on word boundaries.

When False, if the text in the component exceeds the width of the component, the component width will be extended to fit the text.

See Also

Report Designer Components

Book Contents

Book Index