Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Error with cascading parameters

Author  Topic 

janani_c
Starting Member

1 Post

Posted - 2010-02-26 : 02:24:57
Hi,

I built a java client that loads and executes reports using web services API of SSRS 2008 (The web services code was generated using Axis 1.4). This works correctly with reports that have simple parameters.

However I am running into issues when I try to render a report that has cascading parameters. I have a report with 2 parameters, a date and employee number. The employee number field is query based and depends on the value of the date field. I use the getReportParameters method provided by ReportService2005 endpoint and populate the employee numbers field with valid values for a given date. However when I set the execution parameters and render the report, I get a rsReportParameterValueNotSet error from the render method. I am passing in parameter values for both the date and employee number fields to the setExecutionParameters method. Has anyone ever run into this? Is there something I need to do differently to handle cascading parameters? I have looked through the ReportExecutionService API and I did not find any specification on how to handle cascading parameters.

Here's my code that is setting the execution parameters and rendering the report:

String format = "HTML4.0";
String devInfo = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>";
ByteArrayHolder result = new ByteArrayHolder();
StringHolder extension = new StringHolder();
StringHolder mimeType = new StringHolder();
StringHolder encoding = new StringHolder();
ArrayOfWarningHolder warnings = new ArrayOfWarningHolder();
ArrayOfStringHolder streamIDs = new ArrayOfStringHolder();

ReportExecutionServiceSoap execSoap = getReportServiceSoap();

//setting the execution ID
setExecutionHeaders(request, reportName, execSoap);


ParameterValue[] listOfParams = new ParameterValue[2];
int i = 0;

for(int i=0; i<2; i++)
{
String paramName = paramName[i];
String paramValue = request.getParameter(paramName);
ParameterValue param = new ParameterValue();

param.setLabel(paramName);
param.setName(paramName);
param.setValue(paramValue);
listOfParams[i] = param;
}


if(listOfParams.length > 0){
execSoap.setExecutionParameters(listOfParams, "en-us");
ExecutionInfo executionInfo = execSoap.getExecutionInfo();

}

execSoap.render(format, devInfo, result, extension, mimeType, encoding, warnings, streamIDs);

Any help would be greatly appreciated.

Thanks
   

- Advertisement -