I try to pass to a SSRS report, from the C# code multiple arrays of integer
var rsExec = new ReportExecutionServiceSoapClient(binding, new EndpointAddress(config.ReportExecutionUrl));
ParameterValue[] reportParam = new ParameterValue[] {
new ParameterValue { Name = "pCityId", Value = cityId.ToString() },
new ParameterValue { Name = "pDepartmentIds", Value = string.Join(",", departmentIds) },
new ParameterValue { Name = "pBuildingIds", Value = string.Join(",", buidingIds) }
};
await rsExec.SetExecutionParametersAsync(null, null, reportParam, "en-us");
as the Value type of ParameterValue is "string", it seems I have no choice but passing a CSV as parameter to the report.
Then, in the report I can use data type as integer, and say that I am passing "multiple values", but how to do it from the C# code?
PS. Related to that question
ParameterValue
for each value in thedepartmentIds
collection, all with the same parameter name ("pDepartmentIds"). So, if there was 3 department IDs to send, thereportParam
array should contain 3ParameterValue
objects, all with the name "pDepartmentIds", one for each department ID. Similar forbuildingIds
. – R. Richards