Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 (rsItemNotFound) not found error.

Author  Topic 

danyeung
Posting Yak Master

102 Posts

Posted - 2008-07-21 : 19:32:25
I just deployed a new report to SQL Server 2005 Report Server. There were 3 reports before this deployment. The new report was deployed successfully. I could go to http://sql2005/Reports and run the report. But when I ran it in from Visual Studio, I kept getting this error:

Server Error in '/nsISPortal' Application.
--------------------------------------------------------------------------------

The item '/nsPortalReports/rptFinanceAssociation.rdl' cannot be found. (rsItemNotFound)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Reporting.WebForms.ReportServerException: The item '/nsPortalReports/rptFinanceAssociation.rdl' cannot be found. (rsItemNotFound)

Source Error:


Line 201: Me.ReportViewer1.ServerReport.SetParameters(param)
Line 202:


Source File: D:\Sourcesafe_2005\Projects\nsISPortal\Pages_Dev\DWM\frmFinanceReport.aspx.vb Line: 201

Stack Trace:


[ReportServerException: The item '/nsPortalReports/rptFinanceAssociation.rdl' cannot be found. (rsItemNotFound)]
Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo() +509
Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters) +187
Pages_Dev_DWM_frmFinanceReport.btnPreview_Click(Object sender, EventArgs e) in D:\Sourcesafe_2005\Projects\nsISPortal\Pages_Dev\DWM\frmFinanceReport.aspx.vb:201
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


The code is as following. I used the code for all other reports and worked.

Me.ReportViewer1.Visible = True
Me.ReportViewer1.Reset()

Dim strPath As String = fGetReportPath()
Me.ReportViewer1.ServerReport.ReportServerCredentials = New _
clsReportServerCredential System.Configuration.ConfigurationManager.AppSettings("strReportViewUser"), _
System.Configuration.ConfigurationManager.AppSettings("strReportViewPassword"))

Me.ReportViewer1.ServerReport.ReportServerUrl = New Uri(strPath)
Me.ReportViewer1.ServerReport.ReportPath = "/nsPortalReports/rptFinanceAssociation.rdl" Dim param(1) As Microsoft.Reporting.WebForms.ReportParameter
param(0) = New Microsoft.Reporting.WebForms.ReportParameter("RunBy", RunBy)

Me.ReportViewer1.ServerReport.SetParameters(param)
Me.ReportViewer1.ServerReport.Refresh()

What did I miss? Thanks.
DanYeung

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-07-21 : 21:30:02
See http://www.codeproject.com/KB/reporting-services/ReportViewer2005.aspx
Note the "Remote" setting. This may be your problem.
Go to Top of Page

danyeung
Posting Yak Master

102 Posts

Posted - 2008-07-22 : 11:11:55
I figured it out and would like to share. I compared line by line with other report and found it. Instead of
Me.ReportViewer1.ServerReport.ReportPath = "/nsPortalReports/rptFinanceAssociation.rdl"
I changed it to
Me.ReportViewer1.ServerReport.ReportPath = "/nsPortalReports/rptFinanceAssociation".
and it works.

DanYeung

Go to Top of Page
   

- Advertisement -