Reputation: 21
I am trying to create reports using DevExpress Reporting with .NET Core WEB API.
I want another report to be opened when I click on the UserId values in the table in my report. I did this with the parameter and I can show the UserId value clicked in the other report in the label on the screen, but I cannot get this value in the code (in the Report1.cs file).
For example, when I try to get the value in the constructor of the report as below, the parameter comes but the value appears as an empty string. (Even though I can show the value in the report).
var value = this.Parameters["UserId"];
Upvotes: 0
Views: 27
Reputation: 21
I was able to access the parameter with the following code.
protected override void InitializeParameters(IEnumerable<Parameter> parameters)
{
var collectmanCodeParameter = parameters.FirstOrDefault(p => p.Name == "CollectmanCode");
if (collectmanCodeParameter != null) _collectmanCode = collectmanCodeParameter.Value.ToString();
base.InitializeParameters(parameters);
}
Upvotes: 0