报错信息如下:
2023/1/5 13:31:47 Fatal
日志类型:Fatal
详情:Microsoft.Reporting.WinForms.LocalProcessingException: 本地报表处理期间出错。 ---> Microsoft.Reporting.DefinitionInvalidException: 报表“”的定义无效。 ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 此报表的定义无效或不受此版本的 Reporting Services 支持。该报表定义可能是使用以前版本的 Reporting Services 创建的,或包含格式不符合 Reporting Services 架构或无效的内容。详细信息:报表定义具有无法升级的无效目标命名空间“http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition”。
在 Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateInvalidReportDefinitionException(Exception e)
在 Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase1(Stream definitionStream, String& description, String& language, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, Boolean& hasExternalImages, Boolean& hasHyperlinks)
在 Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
在 Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, IDataProtection dataProtection, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
在 Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection)
在 Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
--- 内部异常堆栈跟踪的结尾 ---
在 Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
在 Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot)
在 Microsoft.Reporting.LocalService.CompileReport()
在 Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
--- 内部异常堆栈跟踪的结尾 ---
在 Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
在 Microsoft.Reporting.WinForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
在 Microsoft.Reporting.WinForms.LocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, CreateStreamCallback createStream, Warning[]& warnings)
在 Microsoft.Reporting.WinForms.LocalReport.Render(String format, String deviceInfo, CreateStreamCallback createStream, Warning[]& warnings)
在 TCPackPlatform.PrintCommon.Export(LocalReport localReport)
在 TCPackPlatform.PrintCommon.PrintPage(LocalReport localReport, Boolean landscape, Boolean showPrintDialog, Boolean showPreViewDialog)
在 TCPackPlatform.PrintCommon.Print(LocalReport localReport, Boolean landscape, Boolean showPrintDialog, Boolean showPreViewDialog)
在 TCPackPlatform.Print.PrintMethod3.Print(String vin_code)
在 TCPackPlatform.MainForm.tBtnMarkPrint_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 Mes.TouchPC.ControlsEx.TocuhButton.OnClick(EventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hW
你这个升级跨度有点大哦
你这个是不是用rdlc组件了,如果是的话,可以在VS安装Microsoft RDLC Report Designer
rdlc报告修改如下就好了
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
RDLC是个好东西,比水晶报表好用多了
试下:https://www.5axxw.com/questions/content/008pkj
– 秋雨雁南飞 1年前