Skip to Content
0
Former Member
Jan 04, 2013 at 02:25 AM

Need to pass multiple values in a parameter to a webservice method from Crystal 2011

26 Views

Hi,

We are working in Crystal Reports 2011 (and also 2008) and we have a need to pass multiple values in a single parameter to a webservice method.

I have searched the web for results and I cannot find a suitable answer. Here is what I tried:

This is a c# .Net webservice. If I set the method parameter to a string type, when the following parameter is passed, here is what I get:

Pass in: stringA&stringB&stringC

In the webmethod: the value is: stringA

I've tried changing the method parameter to a string array (string[]). Same result.

If you view this parameter from within the Crystal Report, the parameter is shown as a Static, with Allow Custom Values = true, and Allow Multiple values = false (and greyed out).

Since this parameter is created when the datasource is selected, I'm not sure how to get the results needed.

Also, just as a test, I changed the data to: stringA+stringB+stringC, and this was passed to the webservice.

Another attempt was to do something like the following: {?parameters.AgingByProgramReport.strOperatingGroup.string} = Replace ({?parameters.AgingByProgramReport.strOperatingGroup},'&', '+')

Not sure if this is even possible or would work prior to passing the data to the webservice, but I couldn't figure out the syntax or how to make this happen prior to the webservice call.

Has anyone been able to figure out how to make this work ? This is important to a number of reports that will be built this way and this is one of the key outstanding questions. If we could pass the string or string array, that would do the trick.

Thanks for the help.

Rick