DLG_REPORTS Dialog Component
Purpose
The DLG_REPORTS dialog component selects an administrative report to run. The options are:
Customer List
Customer Summary List
Invoice
Product List
Vendor List
Description
The DLG_REPORTS dialog component dynamically populates the radio button selections from the web_reports table. While the list displays the rpt_name field, the user's selection returns the rpt_id field. Using a table lookup like this makes it possible to add reports to the application later, without having to change the dialog component. The ASWPRINTRPT.A5W page contains the code that runs the selected report.
Containers
Notable Grid Control Property Settings
Control |
Property |
Description |
report |
Control Settings > Control type |
Set to "RadioButton" |
Control Settings > Validation rules |
General > Enable rules set to TRUE. General > Require value set to TRUE. | |
RadioButton Properties > Choices |
Define Choices > List type is set to "Dynamic". Data Source > Data source type is set to "DBF-Table". Data Source > Table name is set to "web_reports". Data Source > Display value is set to "Rpt_Name". Data Source > Stored value is set to "Rpt_Id". |
Notable Component Property Settings
Property |
Description |
Submit/Reset Buttons > Submit button label |
Changed from "Submit" to "Print Report" |
Submit/Reset Buttons > Reset button label |
Changed from "Reset" to "Clear Selectionl" |
Event Code
The Validate event code tests to see if the report control (the radio buttons) is missing a user selection. If so, the script cancels the submit action and displays an error message.
if CurrentForm.Controls.report ="" CurrentForm.Has_Error =.T. CurrentForm.Error_Message = " Select a Report to Print" end if |
See Also
Supported By
Alpha Five Version 7 and Above