Add custom code parameters to a report
- Last UpdatedApr 24, 2025
- 2 minute read
You are able to include custom code on reports in order to make them more complex. The following example illustrates how to add a custom code parameter to the report that is connected to RealTime.
To add a custom code parameter
-
In Microsoft Visual Studio, select the report that you want to add a custom code parameter to.

-
Right-click on the report and select Report Properties.
The Report Properties dialog box appears.

-
In the Report Properties dialog box:
-
Select the Code tab.
-
In the Custom code field, enter the custom code function.
-
Select OK.
-
-
In the Report Data pane, right-click your dataset and select Dataset Properties.

The Dataset Properties dialog box appears.

-
Select Use a dataset embedded in my report.
Extra field options will appear in the dialog box.

-
Select OK.
The Expression dialog box appears.

-
In the Expression dialog box:
-
Enter the expression in the Set expression for: Query,CommandText field.
-
Select OK.
The Expression dialog box closes.
-
-
Navigate to the Report Data pane > Datasets.
-
Right-click your dataset and select Dataset Properties.
The Dataset Properties dialog box appears.

-
In the Query field, enter the text for your query call.
-
Select OK.
-
Select the Preview tab of your report.

-
Manipulate your report data using the new custom code parameter you created.