on 2024 Oct 16 10:07 PM
Using "SAP Crystal Reports runtime engine for .NET Framework (64-bit)" version 13.0.31.4010,
and the corresponding component for VS: "SAP Crystal Reports, version for Microsoft Visual Studio" version 13.0.31.4010.
The CR viewer is CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
My report has several string type parameters. One of these parameters (called p_stu_cnt) is passed to the report. This param is displayed in the 2nd page header of the report.
When the report is rendered, it shows its value fine (e.g. "100"), but when I navigate (say, go to the next page), the parameter loses its value in the report (shows "0").
Not surprisingly, if I export, say to PDF, the lost value appears int he exported output.
I found an article https://community.sap.com/t5/technology-q-a/navigation-in-crystal-viewer-with-parameters/qaq-p/10016... that suggested setting the ReuseParameterValuesOnRefresh property of the viewer to true (it was false by default). I have done this, but no luck resolving the issue.
The value of this parameter is passed from a string variable, which is prior set to the given dataset's table row count, i.e.
string mQualifyingStudentCount = dtResults.Rows.Count;
then later passed on to the report parameter like so:
string p_stu_cnt = mQualifyingStudentCount.ToString();
report.SetParameterValue("p_stu_cnt", p_stu_cnt);
The strange thing is that if I just hardcode of my variable and pass it on to the report param, then the value is not lost! i.e:
string p_stu_cnt = '123";
report.SetParameterValue("p_stu_cnt", p_stu_cnt);
Is this a bug??!!
I appreciate your help,
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.