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?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.