Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

troubleshooting an SSRS report..help!!

$
0
0
One SSRS report out of 10 is timing out upon launch within an application whereas in report manager and report services it manually runs fine. I am seeing the following in the code where the Launch Report method is called and I think this is where the problem is exactly.. in C# under here.

Code:

protected string LaunchReport(string strReport, string strOutFile, string strReportFormat, string strOutfileExtension, string[][] arrParams)
        {
     
            ReportingService objRS = new ReportingService();
            objRS.Credentials = System.Net.CredentialCache.DefaultCredentials;
            objRS.Timeout = 600000;
                      try
            {
                byte[] ResultStream;
                string[] StreamIdentifiers;
                string OptionalParam = null;
                //MVB That's the path actually.  Add Path and FileName separately.

                ParameterValue[] optionalParams = null;
                Warning[] optionalWarnings = null;

                ParameterValue[] rptParms = new ParameterValue[8];
                //ParameterValue[] rptParms = new ParameterValue[4];
                for (int i = 0; i < arrParams.Length; i++)
                {
                    rptParms[i] = new ParameterValue();
                    rptParms[i].Name = arrParams[i][0];
                    rptParms[i].Value = arrParams[i][1];
                }

                int fundID = Convert.ToInt32(dictProcessParameters["FundID"]);
                string rptPathAndName;
                if (fundID > 10000)
                {
                    rptPathAndName = ConfigurationManager.AppSettings["appRecon_SSRS_ReportsPath_new"].ToString() + strReport;
                }
                else
                {
                    rptPathAndName = ConfigurationManager.AppSettings["appRecon_SSRS_ReportsPath"].ToString() + strReport;
                }

                try
                {
                    ResultStream = objRS.Render(
                        //"/Fund Services Custom Reporting/ReconReports/" + strReport,                        // Report Path
                        //"/" + strReport,                                                                                // Report Path
                        rptPathAndName,                                                                                // Report Path
                        strReportFormat,                                                                        // format
                        null,                                                                                                        // historyid
                        null, //strDeviceInfo,                                                                // device info
                        rptParms,                                                                                        // parameters
                        null,                                                                                                        // credentials
                        null,                                                                                                        // show/hide toggle
                        out OptionalParam,                                                // encoding
                        out OptionalParam,                                                // mime type
                        out optionalParams,                                                // report history parameters
                        out optionalWarnings,                                        // warnings
                        out StreamIdentifiers                                        // stream IDs
                    );
                }
                catch (SoapException ex)
                {             
                    webpage.WebUIMessages.Add(new Status("LaunchReport Method ResultStream: " + ex.Message));
                    webpage.RadGrid1.Rebind();
                    return "Error: " + ex.Message;
                }

Now the setting ogf the rs.timeout to equal 600,000 seconds is an awfully long time for a report to run to completion with dataset query and all the result s of which to be displayed on the report. On a whim I reduced the interval to 8000 and I received an incompleted recordset of the data on the report. Can someone tell me if I am on the right track hrere ? Would I have to check the rsreportserver.config file and aling the timeout settings to be in sync ? But wouldn't that affect all reports if I did that ? I went into the report's execution properties and changed the setting to no timeout in report execution and that has not made a difference overall except to give me the partial results of the records... anyone please help ?

Viewing all articles
Browse latest Browse all 42225

Trending Articles