Monday, March 19, 2012
How to set the Timeout and Timeoutspecified property?
We are getting a 'Operation Timedout' error when trying to render a report
as pdf. Will setting the Timeout and Timeoutspecified property will help
resolve this issue. Based on some criteria this report can take long time.
Also I cant find how to set the timeout and timeoutspecified property?
Please help
Thanks
RahulI think for a report you can set the timeout in the report
manager.
>--Original Message--
>Hi all
>We are getting a 'Operation Timedout' error when trying
to render a report
>as pdf. Will setting the Timeout and Timeoutspecified
property will help
>resolve this issue. Based on some criteria this report
can take long time.
>Also I cant find how to set the timeout and
timeoutspecified property?
>Please help
>Thanks
>Rahul
>
>.
>
Sunday, February 19, 2012
How to send parameters to report when executing ReportingService.Render
I'm trying to figure out how you send/set the report variables when using the ReportingService.Render method.
I can get the ReportParameters array using GetReportParameters but can't seem to find a way to populate the ParameterValue array that is passed as a variable in the Render method. I've tried creating an ArrayList comprised of ParameterValue objects (non-array), adding them to the ArrayList, and trying to convert that to a ParameterValue array. The example code I found is in VB.NET and looks like this:
reportParametersArray = rs.GetReportParameters(reportPath, Nothing, True, _
reportParameterValuesArrayList.ToArray(GetType(ParameterValue)), Nothing)
I tried to do the same thing in C#:
rpReportParams = rsReports.GetReportParameters(sReportPath, null, true, arrayListParams.ToArray(System.Type.GetType(ParameterValue)), dscCredentials);
The compile error is :
'ReportService.ParameterValue' denotes a 'class' where a 'variable' was expected
Putting quotes around ParameterValue returns the following error:
Argument '4': cannot convert from 'System.Array' to 'ParameterValue[]'
Anyone had success populating report parameters or have a suggestion?
Thanks,
O.
If arrayListParams is an ArrayList that contains ParameterValue objects, try this in C#(ParameterValue[])arrayListParams.ToArray(typeof(ParameterValue))