cancel
Showing results for 
Search instead for 
Did you mean: 

AddCurrentValue does not successfully pass value to report.

Former Member
0 Kudos

I am in the process of upgrading our legacy VB6 app, which is used simply to view reports, from Crystal 8.5 to 11.5 sp2. Per all examples I've found, the proper method of setting a parameter value is to use AddCurrentValue for a discrete-valued parameter. However, after updating the dll's to 11.5, the parameter value is not passed.

In Debug, I can see that the value is in the list of current values by pulling the indexed value; however, the report does not seem to actually use this value.

When I run the report in Crystal designer and set the parameter values, everything works fine and data is shown. However, when I run the same RPT through the VB6 app, data is not shown. I can then export to Crystal Reports, do a refresh and set the values, and data is shown.

In another .NET app, I use the methods SetCurrentValue; however, they are not available in VB6, for some reason.

I appreciate any help or insight you can provide.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Any chance someone's got an idea? Is there any further info or clarification needed?

former_member183750
Active Contributor
0 Kudos

Make sure you have the latest SP:

https://smpdl.sap-ag.de/~sapidp/012002523100013876392008E/crxir2win_sp5.exe

As a test don't use code to pass in the parameter. Let the report prompt for it and fill it out. Does that work?

Provide code used.

Ludek

Former Member
0 Kudos

Thank you for your response. I happened across another forum in which the user stated the order now mattered between setting the data source and setting the parameter values.

I previously set the parameter values, then set the data source (which was legacy code), but then I moved the parameter code after the data source code, which worked.

former_member183750
Active Contributor
0 Kudos

Excellent. Happy to hear this works now. And apologies for not answering earlier. The forums are not quite up there as far as priorities are concerned and sometimes I just slip up...

Ludek

Answers (0)