Skip to main content
All docs
V26.1
  • TdxBackendParameterValue Class

    A parameter value.

    Declaration

    TdxBackendParameterValue = class(
        TCollectionItem
    )

    Remarks

    Each parameter is stored as a Variant value accessible through the Value property.

    You can use the parent parameter’s DataType property to switch between supported parameter value types (that is, Variant value interpretation options). Different data types use different editor types in the Parameters panel in the UI.

    Direct TdxBackendParameterValue Class Reference

    The following public API members reference a TdxBackendParameterValue object:

    TdxBackendParameterValues.Add
    Creates a new parameter value and adds it to the collection.
    TdxBackendParameterValues.Items
    Provides indexed access to all parameter values stored in the collection.

    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;
    

    Inheritance

    TObject
    TPersistent
    TCollectionItem
    TdxBackendParameterValue
    See Also