TdxCustomReportControl.Parameters Property
Provides access to the report parameters collection.
Declaration
property Parameters: TdxReportParameters read;
Property Value
| Type | Description |
|---|---|
| TdxReportParameters | A report parameter collection. |
Remarks
The collection accessible through the Parameters property is populated and updated automatically from the current report template definition.
Note
The Parameters property provides access to a read-only report parameter collection. If the list of parameters changes within the report template definition, the collection is updated automatically the next time you access it in code.
Available Options
You can use the ParamByName property to access a stored parameter by name. In addition, you can use the Parameters.Items property to access all parameters stored in the collection.
Refer to the TdxReportParameters class description for detailed information on all available options.
Code Example: List Report Parameters
uses
dxReport.Control, // Declares the TdxReportControl class
dxReport.Parameters, // Declares the TdxReportParameter class
dxMessageDialog, // Declares the TdxMessageDialogForm class
System.StrUtils; // Provides advanced string management routines
procedure TForm1.cxButton1Click(Sender: TObject);
var
AList: TStringList;
AParameter: TdxReportParameter;
begin
// Create a TStringList instance
AList := TStringList.Create;
try
// Iterate through report parameters
for AParameter in dxReportControl1.Parameters do
AList.Add(Format('- %s', [
// Use the parameter Name if Description is missing
IfThen(AParameter.Description <> '', AParameter.Description, AParameter.Name)
]));
// Display the parameter list or a notification message if the list is empty
if AList.Count > 0 then
dxShowMessage(AList.Text)
else
dxShowMessage('The report has no parameters.');
finally
AList.Free;
end;
end;
See Also