Step 1: Add a Dialog Page
- Open your report in the Articles Designer
- Click Report → New Dialog Page (or right-click in the Report Tree → Add Page → Dialog Page)
- A blank form designer appears
Step 2: Configure Dialog Properties
Select the dialog page and set properties:
Name: DialogPage1
- The internal identifier for this dialog page
- Used when referencing the dialog in code or scripts
- Should be descriptive (e.g., “DialogCustomerReport”, “DialogDateRange”)
Caption: “Report Parameters”
- The text displayed in the dialog’s title bar
- What users see at the top of the window
- Should clearly describe the dialog’s purpose (e.g., “Select Report Criteria”, “Filter Options”)
BorderStyle: bsDialog
- Controls the window border and behavior
bsDialogcreates a fixed-size dialog that cannot be resized by the user- Other options:
bsSizeable(allows resizing),bsNone(no border) - Recommended: Use
bsDialogfor parameter dialogs to maintain consistent layout
Position: poScreenCenter
- Where the dialog appears when shown
poScreenCenterdisplays the dialog in the center of the user’s screen- Other options:
poDesktopCenter,poMainFormCenter,poOwnerFormCenter - Recommended: Use
poScreenCenterfor best user experience
Width: 450
- Dialog width in pixels
- Should be wide enough to accommodate all controls without crowding
- Typical range: 400-600 pixels for parameter dialogs
Height: 300
- Dialog height in pixels
- Should provide enough vertical space for controls and buttons
- Typical range: 250-400 pixels for parameter dialogs
- Remember to leave room for OK/Cancel buttons at the bottom
Step 3: Add Controls
From the Dialogs toolbar, drag controls onto the dialog:
Labels
- Display static text to identify other controls
- Used for field names, instructions, and headings
- Example: “Select Customer:”, “Date Range:”, “Options:”
Edit boxes
- Allow users to type text or numbers
- Use for free-form input like names, amounts, or search terms
- Should be validated before use
ComboBoxes
- Dropdown lists with predefined choices
- Use for static options like “Active/Inactive”, “All/Some/None”
- Simpler than DBLookupComboBox but limited to hardcoded values
DBLookupComboBoxes
- Dropdown lists populated from database tables
- Display one field (ListField) but return another (KeyField)
- Use for dynamic data like customer lists, product categories, etc.
- Most powerful but requires proper configuration
DateEdits
- Calendar controls for selecting dates
- Provide built-in date picker for user convenience
- Use for date ranges, cutoff dates, filtering by date
Buttons
- Trigger actions when clicked
- Always include OK and Cancel buttons
- OK button should have
ModalResult = mrOkandDefault = True - Cancel button should have
ModalResult = mrCancelandCancel = True
CheckBoxes
- Boolean (true/false) options
- Use for toggles like “Include Inactive Records”, “Show Details”, “Print Summary”
- Return checked state as boolean value