Skip to main content
All docs
V26.1
  • TdxBackendCustomParameter.Name Property

    Returns the unique Report or Dashboard parameter name (identifier).

    Declaration

    property Name: string read;

    Property Value

    Type Description
    string

    The unique identifier.

    Remarks

    Use the Name property to read the unique parameter identifier.

    This property corresponds to the Name field in report / dashboard settings:

    Note

    If the Description property is unspecified, the Name property value is used as the parameter label.

    Code Examples

    The following code snippets display all parameter labels or names (unique identifiers) for parameters with missing labels.

    Note

    The Name property is common to report and dashboard parameters. These examples perform the same operation but use component-specific APIs.

    List Report Parameter Names

    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;
    

    List Dashboard Parameter Names

    uses
      dxDashboard.Control,      // Declares the TdxDashboardControl class
      dxDashboard.Parameters,   // Declares the TdxDashboardParameter class
      dxMessageDialog,          // Declares the TdxMessageDialogForm class
      System.StrUtils;          // Provides advanced string management routines
    
    procedure TForm1.cxButton1Click(Sender: TObject);
    var
      AList: TStringList;
      AParameter: TdxDashboardParameter;
    begin
      // Create a TStringList instance
      AList := TStringList.Create;
      try
        // Iterate through dashboard parameters
        for AParameter in dxDashboardControl1.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 dashboard has no parameters.');
      finally
        AList.Free;
      end;
    end;
    
    See Also