The requested page is not available for the requested platform. You are viewing the content for Default platform.

How to: Access the Report Parameters Object in Calculated Fields Expressions

  • 2 min to read

This topic describes how you can access data of a report parameters object (inherited from ReportParametersObjectBase and specified using IReportDataV2.ParametersObjectType) in calculated field expressions.


The approach described in this topic is not supported by the Mobile platform.

Override the Parameters Object's ToString method.

public class DemoParameters : ReportParametersObjectBase {
    // ...
    public override string ToString() {
        return City;

As a result, you can refer to the ToString result with the "[Parameters.XafReportParametersObject]" expression, e.g.:

Concat([Full Name],' from ', [Parameters.XafReportParametersObject])

Alternatively, you can create a report script, handle the GetValue event of a certain field and then access a parameter value as demonstrated in the How to: Access the Report Parameters Object in Report Scripts topic.

private void calculatedFieldCity_GetValue(object sender, DevExpress.XtraReports.UI.GetValueEventArgs e) {
    DevExpress.XtraReports.Parameters.Parameter param =
    if (param != null) {
        ReportV2Demo.Module.BusinessObjects.Contact contact = 
        ReportV2Demo.Module.Reports.DemoParameters xafParameter =
        e.Value = contact.FullName + " from " + xafParameter.City;
See Also