TdxBackendParameterDataType Enum
Enumerates supported value types for report/dashboard parameters.
Declaration
TdxBackendParameterDataType = (
rptString,
rptDateTime,
rptDateOnly,
rptTimeOnly,
rptInt16,
rptInt32,
rptInt64,
rptSingle,
rptDouble,
rptDecimal,
rptBoolean,
rptGuid
);
Members
| Name | Description |
|---|---|
rptString
|
A string value. |
rptDateTime
|
|
rptDateOnly
|
A date/time value that stores only a date (without time part). |
rptTimeOnly
|
|
rptInt16
|
A 16-bit signed integer value. |
rptInt32
|
A 32-bit signed integer value. |
rptInt64
|
A 64-bit signed integer value. |
rptSingle
|
A single-precision floating point value (32-bit). |
rptDouble
|
A double-precision floating point value (64-bit). |
rptDecimal
|
A decimal numeric value. |
rptBoolean
|
A Boolean value. |
rptGuid
|
A Globally Unique Identifier (GUID) value (128-bit). |
Remarks
TdxBackendParameterDataType values define Variant value interpretation for report/dashboard parameters.
Direct TdxBackendParameterDataType Reference
The TdxBackendCustomParameter.DataType property references a TdxBackendParameterDataType value.
Code Examples
The following code snippets use the DataType property to ensure that the expected String type is defined for the orderID parameter and assigns a string value to it.
Note
The DataType property is common to report and dashboard parameters. These examples perform the same type check and value assignment but use component-specific APIs.
Check Report Parameter Type
uses
dxReport.Control, // Declares the TdxReportControl class
dxReport.Parameters, // Declares the TdxReportParameter class
dxBackend.Parameters; // Declares the TdxBackendParameterDataType enum
System.SysUtils; // Declares exception classes
procedure TOrderReportForm.InitReport(const AOrderID: string);
var
AParameter: TdxReportParameter;
begin
// Find the report parameter with the specified name
AParameter := dxReportControl1.Parameters.FindParam('orderID');
// Check if the parameter exists and has the String type
if (AParameter = nil) or (AParameter.DataType <> TdxBackendParameterDataType.rptString) then
raise Exception.Create('Missing the required parameter "orderID" of type "String".');
AParameter.Value := AOrderID;
end;
Check Dashboard Parameter Type
uses
dxDashboard.Control, // Declares the TdxDashboardControl class
dxDashboard.Parameters, // Declares the TdxDashboardParameter class
dxBackend.Parameters; // Declares the TdxBackendParameterDataType enum
System.SysUtils; // Declares exception classes
procedure TDashboardForm.InitDashboard(const AOrderID: string);
var
AParameter: TdxDashboardParameter;
begin
// Find the dashboard parameter with the specified name
AParameter := dxDashboardControl1.Parameters.FindParam('orderID');
// Check if the parameter exists and has the String type
if (AParameter = nil) or (AParameter.DataType <> TdxBackendParameterDataType.rptString) then
raise Exception.Create('Missing the required parameter "orderID" of type "String".');
AParameter.Value := AOrderID;
end;