The value of parameter 'Parameters' is not valid. Check the documentation for information about valid values.
In one module of the application I'm currently working on, I am using Microsoft
SQL Server 2000 Reporting Services not only for reporting purposes by creating
reports but also for creating subscriptions of specific reports and sending
these reports via email to subscribers when the scheduled time has arrived.
In recent days where I was updating the subsciption code for an updated report.
I had removed some of the report parameters of the reporting services report .rdl
file. And I've deployed the updated reporting services report rdl source to the
report server. Of course I was careful enough to remove the code blocks where I
create and set the parameters of the report for the Reporting Services web
service call. But when I ran the application, I got the following error message
when I debug the .net application.
The value of parameter 'Parameters' is not valid. Check the documentation for
information about valid values.
Later I realized that the size of the parameters array is set to a wrong number
to update the size of the parameters array with the correct number of parameters.
The original report had 7 parameters so in the subscription code I had the
following Reports.ParameterValue array definition.
Dim parameters(6) As Reports.ParameterValue
After I removed two of the report parameters and deployed the report to the
report server, I was successfull to run the below code without any error.
Dim parameters(4) As Reports.ParameterValue ' zero based index
Dim paramId As New Reports.ParameterValue
paramId .Name = "Id"
paramId .Value = Id
parameters(0) = paramId
Dim paramCultureCode As New Reports.ParameterValue
paramCultureCode.Name = "CultureCode"
paramCultureCode.Value = CultureCode
parameters(1) = paramCultureCode
Dim paramSqlServerName As New Reports.ParameterValue
paramSqlServerName.Name = "SqlServerName"
paramSqlServerName.Value = SqlServerName
parameters(2) = paramSqlServerName
Dim paramCatalogName As New Reports.ParameterValue
paramCatalogName.Name = "CatalogName"
paramCatalogName.Value = CatalogName
parameters(3) = paramCatalogName
Dim paramApplicationPath As New Reports.ParameterValue
paramApplicationPath.Name = "ApplicationPath"
paramApplicationPath.Value = ApplicationPath
parameters(4) = paramApplicationPath
|