Page 1 of 1
ParameterValue problems
Posted: Sun Jun 23, 2013 2:00 pm
by fuhrj
I have written a process in C# to automatically run a report. The report contains a SQl parameter, which I tried setting like this:
Code: Select all
report.Dictionary.DataSources[0].Parameters["@locationID"].ParameterValue = "1";
report.Render(false);
However, I get an error saying that @locationID was not set.
The report will run if I set it like this:
Why does it not work when explicitly setting the parameter value as in the first example?
Re: ParameterValue problems
Posted: Mon Jun 24, 2013 8:02 am
by HighAley
Hello.
Please, try to use next code:
Code: Select all
report.Dictionary.DataSources[0].Parameters["@locationID"].Value = "1";
report.Render(false);
Thank you.
Re: ParameterValue problems
Posted: Mon Jun 24, 2013 2:35 pm
by fuhrj
Hi, I tried using Value in place of ParameterValue and got the same result.
Re: ParameterValue problems
Posted: Tue Jun 25, 2013 11:47 am
by Alex K.
Hello,
Can you please send us your report with test data for analysis.
Thank you.
Re: ParameterValue problems
Posted: Tue Jun 25, 2013 3:05 pm
by fuhrj
Report attached. You can probably just use any database because it doesn't get past the point of actually pulling any data.
Re: ParameterValue problems
Posted: Wed Jun 26, 2013 1:23 pm
by Alex K.
Hello,
We couldn't reproduce this bug on our data.
Can you please check the last prerelease build and let us know about the result.
Thank you.
Re: ParameterValue problems
Posted: Mon Jul 01, 2013 1:19 pm
by Alex K.
Hello.
Please, try to use next code:
Code: Select all
report.Dictionary.DataSources["DataSourceName"].Parameters["ParameterName"].Value = yourvalue;