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:
- Open the Articles report designer
- Insert โ Dialog Page
- The dialog page appears as a separate tab
- 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 displayedFontโ 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 inputPasswordCharโ 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 optionsItemIndexโ selected option
ComboBox
A dropdown list of selectable values.
Typical uses:
- Customer list
- Product categories
- Status values
Key properties:
Itemsโ list of choicesItemIndexโ selected indexTextโ 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:
ItemsMultiSelectSelected[]
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:
BeginDateEndDate
FileOpenDialog / FileSaveDialog
Allows the user to select a file.
Typical uses:
- Importing data
- Selecting an export path
- Loading external configuration
Key properties:
FileNameFilter
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
- User runs the report
- Articles displays the dialog page
- User enters values
- Script processes input
- 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
OnClickorOnBeforePrint - Use ComboBoxes instead of freeโtext fields when possible
- Keep dialog pages simple and focused
- Use DateRange controls for consistent date filtering