Answered by:
problem with RDLC after deploying the application

Question
-
Hi,
I have RDLC report with a viewer on the form. It's working great on my development laptop.
but when I deployed the application to another machine (using InstallShield) I am getting the following error.
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> System.ApplicationException: The report definition for report 'C:\Documents and Settings\USER\Desktop\invoice.rdlc' has not been specified ---> System.IO.FileNotFoundException: Could not find file 'C:\Documents and Settings\USER\Desktop\invoice.rdlc'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Microsoft.ReportingServices.StandalonePreviewStore.GetReportDefinition(ReportID reportId) at Microsoft.Reporting.PreviewStore.GetCompiledReport(CatalogItemContextBase context, Boolean rebuild, Byte[]& reportDefinition, ControlSnapshot& snapshot) --- End of inner exception stack trace --- at Microsoft.Reporting.PreviewStore.GetCompiledReport(CatalogItemContextBase context, Boolean rebuild, Byte[]& reportDefinition, ControlSnapshot& snapshot) at Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContextBase itemContext, Boolean rebuild, ControlSnapshot& snapshot) at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession() --- End of inner exception stack trace --- at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession() at Microsoft.Reporting.WinForms.LocalReport.SetParameters(IEnumerable`1 parameters) at cleaning_company_software.frmMain.print_invoice2(Int32 invoice_id) in C:\Users\Jassim\Documents\Visual Studio 2010\Projects\WipePro\WipePro\main_form.cs:line 840 at cleaning_company_software.frmMain.barButtonItem7_ItemClick(Object sender, ItemClickEventArgs e) in C:\Users\Jassim\Documents\Visual Studio 2010\Projects\WipePro\WipePro\main_form.cs:line 2596 at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarItemLink.OnLinkClick() at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- WipePro Assembly Version: 1.0.0.0 Win32 Version: 1.00 CodeBase: file:///C:/Program%20Files/WipePro/WipePro.exe ---------------------------------------- DevExpress.Utils.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.Utils.v11.1.DLL ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- DevExpress.Data.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.Data.v11.1.DLL ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- DevExpress.XtraEditors.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.XtraEditors.v11.1.DLL ---------------------------------------- DevExpress.XtraGrid.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.XtraGrid.v11.1.DLL ---------------------------------------- DevExpress.XtraNavBar.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.XtraNavBar.v11.1.DLL ---------------------------------------- DevExpress.XtraBars.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.XtraBars.v11.1.DLL ---------------------------------------- DevExpress.Printing.v11.1.Core Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.Printing.v11.1.Core.DLL ---------------------------------------- Microsoft.ReportViewer.WinForms Assembly Version: 10.0.0.0 Win32 Version: 10.0.30319.1 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.WinForms/10.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.WinForms.dll ---------------------------------------- DevExpress.XtraPrinting.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.XtraPrinting.v11.1.DLL ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- Microsoft.ReportViewer.Common Assembly Version: 10.0.0.0 Win32 Version: 10.0.30319.1 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.ReportViewer.Common/10.0.0.0__b03f5f7f11d50a3a/Microsoft.ReportViewer.Common.dll ---------------------------------------- DevExpress.XtraTreeList.v11.1 Assembly Version: 11.1.4.0 Win32 Version: 11.1.4.0 CodeBase: file:///C:/Program%20Files/WipePro/DevExpress.XtraTreeList.v11.1.DLL ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- MySql.Data Assembly Version: 6.6.4.0 Win32 Version: 6.6.4.0 CodeBase: file:///C:/Program%20Files/WipePro/MySql.Data.DLL ---------------------------------------- System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll ---------------------------------------- System.EnterpriseServices Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 (RTMRel.030319-0100) CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll ---------------------------------------- System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll ---------------------------------------- PasswordHash.NET Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Program%20Files/WipePro/PasswordHash.NET.DLL ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
Thursday, December 19, 2013 10:48 AM
Answers
-
Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> System.ApplicationException: The report definition for report 'C:\Documents and Settings\USER\Desktop\invoice.rdlc' has not been specified ---> System.IO.FileNotFoundException: Could not find file 'C:\Documents and Settings\USER\Desktop\invoice.rdlc'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
I know nothing about your application but those top 4 lines in the stack trace tell me that there is a read/write issue going on in attempt to access the file, either the file name doesn't exist, or if you are trying to write a new file you are hitting a security issue.
The error message plainly states: Could not find file 'C:\Documents and Settings\USER\Desktop\invoice.rdlc
There are only two possibilities, 1) The file isn't there or 2) It's there but can't be accessed? Maybe a security error?
JP Cowboy Coders Unite!
- Edited by Mr. Javaman II Thursday, December 19, 2013 1:33 PM
- Marked as answer by Herro wongMicrosoft contingent staff Thursday, December 26, 2013 6:23 AM
Thursday, December 19, 2013 1:31 PM