ReportViewer Works in Dev, Crashes in Prod
-
Wednesday, November 09, 2005 5:00 PMHow does the precompiling the rdlcs work in asp.net 2.0 ? The reports all work in dev env when we do a 'copy site to remote'. They don't work when deployed in a precompiled mode.. What am I missing ? The reportviewer redist has been run on the target box
Here are the the exception that was thrown..
Any thoughts ? I see one line in the rdlcs when they are deployed
'This is a marker file generated by the precompilation tool, and should not be deleted!'
What happens to them and why ?
Thanks
Microsoft.Reporting.WebForms.LocalProcessingException Message An error occurred during local report processing. Target Void CompileReport() Stack at Microsoft.Reporting.WebForms.LocalReport.CompileReport() at Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters) at Hunt.EPIC.Web.signalQualityBySPUPage.ExportReport() at Hunt.EPIC.Web.signalQualityBySPUPage.ProcessGETUrlParameters() at Hunt.EPIC.Web.BaseSimpleReport.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Exception Details Type Microsoft.Reporting.DefinitionInvalidException Message The definition of the report 'Main Report' is invalid. Target Microsoft.ReportingServices.ReportProcessing.PublishingResult CompileReport(Microsoft.ReportingServices.Diagnostics.CatalogItemContext, Byte[], Boolean, Microsoft.ReportingServices.Library.ReportSnapshotBase ByRef) Stack at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot) at Microsoft.Reporting.StandalonePreviewStore.StoredReport.CompileReport() at Microsoft.Reporting.StandalonePreviewStore.StoredReport.get_Snapshot() at Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot) at Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild) at Microsoft.Reporting.WebForms.LocalReport.CompileReport() Exception Details Type Microsoft.ReportingServices.ReportProcessing.ReportProcessingException Message The report definition is not valid. Details: Data at the root level is invalid. Line 1, position 1. Target Void Phase1(Microsoft.ReportingServices.Diagnostics.CatalogItemContext, Byte[], CreateReportChunk, CheckSharedDataSource, System.String ByRef, System.String ByRef, Microsoft.ReportingServices.DataExtensions.DataSourceInfoCollection ByRef, Microsoft.ReportingServices.ReportProcessing.UserLocationFlags ByRef, Boolean ByRef, Boolean ByRef) Stack at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.Phase1(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, String& description, String& language, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, Boolean& hasExternalImages, Boolean& hasHyperlinks) at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileReport(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions) at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)
All Replies
-
Wednesday, November 09, 2005 5:53 PM
If there is only one line in the RDLC file then the error message (The definition of the report 'Main Report' is invalid.) is correct. Replace the RDLC file.
-
Wednesday, November 09, 2005 6:57 PMThank you guys. I knew that was the problem but what I don't understand is how I ended up in that state.
Thanks -
Tuesday, June 20, 2006 2:25 PM
What do you mean Replace the RDLC..Create a new one or just replace the rdlc file...
I am getting this error ..
- An error occurred during local report processing.
- The definition of the report 'Main Report' is invalid.
- An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\WINNT\TEMP\shivebkf.0.vb' could not be found’.
- The definition of the report 'Main Report' is invalid.
- An error occurred during local report processing.
-
Tuesday, April 17, 2007 8:43 PMEssentially this is what I have found...if anyone has a solution I'd love to hear it.
I need to publish my website using 'Use fixed naming and single page assemblies.'
The rdlc files are published with only the following line 'This is a marker file generated by the precompilation tool, and should not be deleted!' just like all my aspx pages.
In code I use the LocalReport object...load the DataSources, then render... somewhere here I get a System.Exception.Message: 'An error occurred during local report processing. The definition of the report 'Main Report' is invalid.' At first I thought the ReportViewer runtime wasn't installed but after further inspection it is...plus reports work on other published sites using the 'Allow this precompiled site to be updatable' option toggled.
The only fix I've managed to come up with is to replace the rdlc files uploaded to the web server during the publish with the ones from my development folder (ie. ones that contain the xml).
Is this a bug? Its kind of a pain for a deployment protocol. -
Tuesday, April 24, 2007 7:32 PM
I've got the same problem but in the context of a WinForm application. I placed a report viewer control on a form and added one report as an embedded resource to the project. On running the app on the development machine everthings works fine. But when porting it to another machine I get the exception as described above. The ProcessingMode property is set to Local. But anyway I receive this exception saying:
Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information.
Well, I guess the report viewer (or one of its components) simulates a report server locally in this case.
The central question here is why is it only crashing on a non-dev machine and where is the report server log in this case?
I really hope you can help me. In additon I paste the complete stack trace here:
Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information.
at Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.ProtectData(Byte[] data, Int32 dwFlags)
at Microsoft.ReportingServices.DataExtensions.DataSourceInfo..ctor(String originalName, String extension, String connectionString, Boolean originalConnectStringExpressionBased, Boolean integratedSecurity, String prompt)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.ReadDataSource(DataSourceNameValidator dataSourceNames, PublishingContext context)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.ReadDataSources(PublishingContext context)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.ReadReport()
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.Phase1(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, String& description, String& language, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileReport(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions)
at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)
--- End of inner exception stack trace ---
at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)
at Microsoft.Reporting.StandalonePreviewStore.StoredReport.CompileReport()
at Microsoft.Reporting.StandalonePreviewStore.StoredReport.get_Snapshot()
at Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot)
at Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild)
at Microsoft.Reporting.WinForms.LocalReport.CompileReport()
--- End of inner exception stack trace ---
at DefectLogging.Statistic.FrmStatistics.reportViewer1_ReportError(Object sender, ReportErrorEventArgs e) in G:\My Documents\Starz - Arbeit\Fehleranalyse\Projekt\Source\trunk\DefectLogging\Statistic\FrmStatistics.cs:line 83
at Microsoft.Reporting.WinForms.ReportViewer.OnError(Exception e)
at Microsoft.Reporting.WinForms.ReportViewer.UpdateUIState(Exception e)
at Microsoft.Reporting.WinForms.ReportViewer.RefreshReport(Int32 targetPage)
at Microsoft.Reporting.WinForms.ReportViewer.RefreshReport()
at DefectLogging.Statistic.FrmStatistics.btnGoReports_Click(Object sender, EventArgs e) in G:\My Documents\Starz - Arbeit\Fehleranalyse\Projekt\Source\trunk\DefectLogging\Statistic\FrmStatistics.cs:line 78
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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) -
Saturday, April 28, 2007 10:05 AM
Having investigated the problem and having read a lot about this and related problems with the report viewer control, I realized that I could have kindof by-passed the deployment process by just deploying the libraries that are copied into the bin-directory. To be able to use the report viewer control on a machine, it must have been deployed "correctly" (of course
). Having read the MSDN article about deploying the report viewer control (http://forums.microsoft.com/MSDN/AddPost.aspx?PostID=1515757&SiteID=1) and after having done it like that the exception disappeared and everthing worked as it should! Since the control(s) have not been installed on the remote machine it is not able to work even if all dll's are copied into the bin-directory. That also applies to ASP.NET applications!It would have been nice if the exception said something about this - therefore, it was quite confusing.
-
Saturday, June 09, 2007 11:08 AMJust download and install the Microsoft Report Viewer Redistributable 2005 from http://www.microsoft.com/downloads/thankyou.aspx?familyId=8a166cac-758d-45c8-b637-dd7726e61367&displayLang=en will make your report viewer control works on deployed machine.
-
Tuesday, August 28, 2007 8:11 AM
hi,
i am getting this error when i deploy my application on the remote web server:
The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel , Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. --- End of inner exception stack trace --- at Microsoft.Reporting.WebForms.LocalReport.CompileReport() at Microsoft.Reporting.WebForms.LocalReport.GetParameters()
could you please help...
thanx in advance

