SetExecutionParameters and Render error
In my report; have the parameter as ReportMonth. But i am getting error as below. I also tried as @ReportMonth is not working.
Exception occurred during render
System.Web.Services.Protocols.SoapException = {"System.Web.Services.Protocols.SoapException: This report requires a default or user-defined value for the report parameter 'ReportMonth'. To run or subscribe to this report, you must provide a parameter value.
---> Microsoft.ReportingServices.Diagnostics....
Dim params(2) As vmrd054.ParameterValue
Res.Credentials = System.Net.CredentialCache.DefaultCredentials
Res.Url = ReportServer + "ReportExecution2005.asmx?wsdl"
params(0) = New vmrd054.ParameterValue
params(0).Name = "CountryCode"
params(0).Value = "USA"
params(1) = New vmrd054.ParameterValue
params(1).Name = "CountryName"
prams(1).value ="united states"
'is populated based on country code value; this is as drop down list parameter
params(2) = New vmrd054.ParameterValue
params(2).Name = "ReportMonth"
params(2).Value = "2010-11-01"
Dim ReportPath As String = ReportLibrary + ReportDir + ReportName
Res.Timeout = -1
Res.LoadReport(ReportPath, Nothing)
Dim Format As String = "Excel"
Dim devInfo As String = "<DeviceInfo><SimplePageHeaders>False</SimplePageHeaders></DeviceInfo>"
Dim extension As String = Nothing
Dim mimeType As String = Nothing
Dim encoding As String = Nothing
Dim warnings() As vmrd054.Warning = Nothing
Dim stremIds() As String = Nothing
Dim result() As Byte = Nothing
Res.SetExecutionParameters(params, "en-us")
result = Res.Render(Format, devInfo, extension, mimeType, encoding, warnings, stremIds)
May 4th, 2011 3:36am
????
May 5th, 2011 3:16am
Hi David.NG
According to the error message, the report server needs to resolve a value for ReportMonth parameter. I would suggest you check the parameter's properties in the report first. Usually, please check if "Available values" [for ReportMonth parameter]
is set to "None".
In addition, I would suggest you double check:
1. Each report parameter has default value specified in the report
2. The default value is in the set of valid values (if you have a valid values list)
3. The "Allow Blank" and "Allow Null" properties for each parameter allow for what your default is
Also, you can try referencing your report server log file located under you "MIcrosoft SQL Server" installation directory. That will often times have more information to isloate your problem.
Thanks,
Eileen
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2011 9:09am