on 12-14-2011 6:14 PM
Hello All,
I have a report with 17 parameter fields. They are named "Title0", "Title1", "Title2"... "Title16".
In my code, I have a loop which sets the values from a list of values. I can set the value of my first parameter, but as soon as I set the value of the second parameter, the value of the first parameter is cleared out.
Has anyone seen this before? Is there a workaround?
Here is some sample code
string [] paramValues =SetParameterValues(); // sets the values to be used. Gets 17 strings
ReportDocument myReport = new ReportDocument();
myReport.Load(<my report path>);
for (int i = 0; i < 17; i++)
{
string paramName = "Title" + i.ToString();
myReport.SetParameterValue(paramName, paramValues<i>);
}
Stepping though this code in the debugger, the first time through the loop works as expected. But on the second time through the loop (i=1) the value for myReport parameter [0] is cleared out.
How should I be setting these values?
Thanks,
-tomas
Have a look at the sample app csharp_win_paramengine.zip here:
http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
There are also a few other parameter apps at the above link that may be helpful
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.