Passing Parameter Into Report Filter Not Working
The way I understand it, I can pass the value of the filter from my C# program, via a parameter, into the filter of the FastReport report.
I have a parameter, called paramCriteriaExpression, in my report.
In my filter for the report Data band, I have "[paramCriteriaExpression]" (without the quotes, thought).
In my C# program, I have the line
string strCriteriaExpression = "[Members.Gender] == \"M\"";
webReport.Report.SetParameterValue("paramCriteriaExpression", strCriteriaExpression);
The report runs and shows me all records for both males and females.
If I put
[Members.Gender] = "M"
in the report, in the paramCriteriaExpression parameter, in its Expression property, and then run the report preview, it uses the parameter correctly, filters the report and shows me just the Male member records.
Why does it work directly in the report in the parameter, but if I run the report from my C# program, passing the same value into the parameter, it doesn't work?
Am I missing something?
I have a parameter, called paramCriteriaExpression, in my report.
In my filter for the report Data band, I have "[paramCriteriaExpression]" (without the quotes, thought).
In my C# program, I have the line
string strCriteriaExpression = "[Members.Gender] == \"M\"";
webReport.Report.SetParameterValue("paramCriteriaExpression", strCriteriaExpression);
The report runs and shows me all records for both males and females.
If I put
[Members.Gender] = "M"
in the report, in the paramCriteriaExpression parameter, in its Expression property, and then run the report preview, it uses the parameter correctly, filters the report and shows me just the Male member records.
Why does it work directly in the report in the parameter, but if I run the report from my C# program, passing the same value into the parameter, it doesn't work?
Am I missing something?