FastReport.NET v2021 打印预览报表出错NullReferenceException / RestoreEncodedText,踩坑!
作者:C/S框架网|www.csframewo  发布日期:2023/03/15 21:44:27
  FastReport.NET v2021 打印预览报表出错NullReferenceException / RestoreEncodedText,踩坑!

FastReport.NET v2021 打印预览报表出错:
System.NullReferenceException:“未将对象引用设置到对象的实例。Void RestoreEncodedText()方法。

   at FastReport.RichTextParser.RTF_Parser.RestoreEncodedText()
   at FastReport.RichTextParser.RTF_Parser.ParseByte(Char ch)
   at FastReport.RichTextParser.RTF_DocumentParser.Load(Stream stream)
   at FastReport.RichObject.GenerateExpressionList()
   at FastReport.RichObject.CalculateExpressions()
   at FastReport.RichObject.GetData()
   at FastReport.BandBase.GetData()
   at FastReport.Engine.ReportEngine.PrepareBand(BandBase band, Boolean getData)
   at FastReport.Engine.ReportEngine.ShowBandToPreparedPages(BandBase band, Boolean getData)
   at FastReport.Engine.ReportEngine.ShowBand(BandBase band, Boolean getData)
   at FastReport.Engine.ReportEngine.ShowBand(BandBase band)
   at FastReport.Engine.ReportEngine.StartFirstPage()
   at FastReport.Engine.ReportEngine.RunReportPage(ReportPage page)
   at FastReport.Engine.ReportEngine.RunReportPages()
   at FastReport.Engine.ReportEngine.RunReportPages(ReportPage page)
   at FastReport.Engine.ReportEngine.Run(Boolean runDialogs, Boolean append, Boolean resetDataState, ReportPage page)
   at FastReport.Report.Prepare(Boolean append)
   at FastReport.Report.Show(Boolean modal, IWin32Window owner)
   at CSFrameworkV6.DemoReport.FastReportDemo.frmReportUser.DoPreview() in E:\Jonny's Project\CSFramework.V6.0 (旗舰版)\CSFrameworkV6.ClientFoundation\CSFrameworkV6.Report\FastReportDemo\frmReportUser.cs:line 41



贴图图片-微信截图_20230315213733
贴图图片-微信截图_20230315213915





解决方案

1. 把报表里面的RichObject 改为 TextObject
2. 是旧版本的frx文件,把报表里面的RichObject删除,重新添加RichObject即可




C/S框架网|原创精神.创造价值.打造精品


扫一扫加作者微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务
上一篇 下一篇