I am currently working on an Webservice to retrieve a pdf Document from an Crystal Report. As lonmg as there are no parameter Values in the Report, the service works fine. As soon as I use parameters in a Query the Reports can't be shown anymore and I retrieve an error like 'missing parameter values'. But there is only one Parameter and I am pretty sure that I set the value of that parameter... Here is the Code where I change/ add the value:
// param is a string like 'parametername:value'
string index = param.Split(':')[0];
string value = param.Split(':')[1];
// repDoc is the current Report
repDoc.ParameterFields[index].CurrentValues.Clear();
repDoc.ParameterFields[index].CurrentValues.AddValue(value);
// now i create the PDF as an HTTPresponse
repDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, response, false, "Report");
I really have no idea why it doesnt work...