Report Parameters
Whenever reports require access to variables directly from the application's code then the use of the ParameterDictionary is needed. ParameterDictionary objects will hold a dictionary of named parameters to be used from within your defined report (your DPLX file). The ParameterDictionary object is created and parameters are added to it. The ParameterDicionary then needs to be passed into the Run method of the DocumentLayout object. This is exemplified in the code below:
ParameterDictionary parameters = new ParameterDictionary();
parameters.Add("parameterName", param_value );
DocumentLayout reportDocument = new DocumentLayout("Report.dplx");
Document document = reportDocument.Run( parameters );
Dim MyParameters As ParameterDictionary = New ParameterDictionary()
MyParameters.Add("parameterName", param_value)
Dim reportDocument As DocumentLayout = New DocumentLayout("Report.dplx")
Dim MyDocument As Document = reportDocument.Run(parameters)
The parameters passed into the Reports Run method would then be used from within the DPLX file wherever the following is found:
Parameters["paramName"]
For example, the parameters could be used from within a query as follows:
SELECT * FROM Orders WHERE OrderID = #Parameters["OrderID"]#
In the case of a stored procedure the report parameter could be assigned to a stored procedure's parameter as shown below in Figure 1.

Figure 1 - Query Editor Window for Stored Procedures
A parameter from the ParameterDictionary could also be referenced from within a RecordArea or RecordBox by setting the value of the RecordAreas Text property or RecordBox's Field property as follows:
Value = #Parameters["firstName"]#