1. Home
  2. /
  3. Docs
  4. /
  5. Articles Report Writer
  6. /
  7. Articles Report Designer ...
  8. /
  9. Common Dialog Controls

Common Dialog Controls

Common Dialog Controls in Articles

Articles includes a set of dialog controls that allow you to collect user input before a report is generated. These controls appear in a dialog form (a special report page) and behave similarly to standard Windows controls.

Dialog controls are useful when you want the user to:

  • Select a date range
  • Choose a customer or product
  • Enter filter values
  • Pick a file or folder
  • Toggle options
  • Provide parameters for SQL queries or business logic

Dialog pages run before the report is prepared, allowing you to pass userโ€‘selected values into datasets, variables, and script logic.


Adding a Dialog Page

To use dialog controls:

  1. Open the Articles report designer
  2. Insert โ†’ Dialog Page
  3. The dialog page appears as a separate tab
  4. You can now place dialog controls on it

When the report runs, the dialog page appears first, allowing the user to enter values.


Common Dialog Controls

Below are the most frequently used dialog controls in Articles, along with their purpose and usage patterns.


Label

A simple text label used to describe other controls.

Typical uses:

  • Field captions
  • Instructions
  • Section headers

Key properties:

  • Caption โ€“ text displayed
  • Font โ€“ appearance

Edit Box

A singleโ€‘line text input field.

Typical uses:

  • Entering IDs, names, or keywords
  • Freeโ€‘form text filters
  • Numeric input (with validation in script)

Key properties:

  • Text โ€“ user input
  • PasswordChar โ€“ mask input if needed

Memo Box

A multiโ€‘line text input area.

Typical uses:

  • Notes
  • Multiโ€‘value filters
  • SQL fragments (advanced scenarios)

CheckBox

A true/false toggle.

Typical uses:

  • โ€œInclude inactive customersโ€
  • โ€œShow totals onlyโ€
  • โ€œEnable advanced optionsโ€

Key properties:

  • Checked โ€“ boolean value

RadioButton / RadioGroup

Allows the user to choose one option from a set.

Typical uses:

  • Sort order
  • Report mode (summary vs. detail)
  • Output type

Key properties:

  • Items โ€“ list of options
  • ItemIndex โ€“ selected option

ComboBox

A dropdown list of selectable values.

Typical uses:

  • Customer list
  • Product categories
  • Status values

Key properties:

  • Items โ€“ list of choices
  • ItemIndex โ€“ selected index
  • Text โ€“ selected text

You can populate items in script:

procedure DialogPageOnShow(Sender: TObject);
begin
  ComboBox1.Items.Add('Active');
  ComboBox1.Items.Add('Inactive');
  ComboBox1.Items.Add('All');
end;

ListBox

A list of items with optional multiโ€‘selection.

Typical uses:

  • Selecting multiple regions
  • Choosing multiple product lines
  • Multiโ€‘select filters

Key properties:

  • Items
  • MultiSelect
  • Selected[]

DateEdit

A date picker control.

Typical uses:

  • Start date / end date
  • Invoice date
  • Transaction period

Key properties:

  • Date โ€“ selected date

TimeEdit

A time picker control.

Typical uses:

  • Timeโ€‘based filtering
  • Scheduling reports

DateRange Control

A combined start/end date selector.

Typical uses:

  • โ€œFrom / Toโ€ date ranges
  • Periodโ€‘based reporting

Key properties:

  • BeginDate
  • EndDate

FileOpenDialog / FileSaveDialog

Allows the user to select a file.

Typical uses:

  • Importing data
  • Selecting an export path
  • Loading external configuration

Key properties:

  • FileName
  • Filter

FolderDialog

Allows the user to select a folder.

Typical uses:

  • Choosing an export directory
  • Selecting a data folder

Button

A clickable button that triggers script logic.

Typical uses:

  • โ€œLoad Dataโ€
  • โ€œValidate Inputโ€
  • โ€œAdvanced Optionsโ€

Key event:

  • OnClick

Example:

procedure Button1OnClick(Sender: TfrxComponent);
begin
  ShowMessage('Button clicked!');
end;

Using Dialog Values in the Report

Values entered in dialog controls can be used in:

  • Report variables
  • SQL queries
  • Script logic
  • Conditional formatting
  • Filtering datasets

Example: Passing a date to a variable

Report.Variables['StartDate'] := DateEdit1.Date;

Example: Using a checkbox to filter data

if CheckBox1.Checked then
  Query.SQL.Add('AND Active = 1');

Dialog Execution Flow

  1. User runs the report
  2. Articles displays the dialog page
  3. User enters values
  4. Script processes input
  5. Report is prepared using the selected parameters

If the user cancels the dialog, the report does not run.


Best Practices

  • Group related controls with labels
  • Validate user input in OnClick or OnBeforePrint
  • Use ComboBoxes instead of freeโ€‘text fields when possible
  • Keep dialog pages simple and focused
  • Use DateRange controls for consistent date filtering