cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

crystal viewer parameter loses value on navigation

cecilia_schultz
Explorer
0 Kudos
1,571

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,

 

 

 

 

 

View Entire Topic
DonWilliams
Active Contributor
0 Kudos

DonWilliams_0-1729622051987.png