When I call ExportToDisk(). In some machine do well. But in window server 2012 R2 throw the exception.
Exceptoion
This field name is not known. Error in File C:\Windows\TEMP\RPTH010_Report01 {C0D0E863-1741-4917-A455-B23347EA4FD6}.rpt: Error in formula <填單日期>. 'numberVar RocDateNumber := {RPTH010_Report01.D01_APLDATE};' This field name is not known.
This field name is not known. Error in File C:\Windows\TEMP\RPTH010_Report01 {C0D0E863-1741-4917-A455-B23347EA4FD6}.rpt: Error in formula <填單日期>. 'numberVar RocDateNumber := {RPTH010_Report01.D01_APLDATE};' This field name is not known.
Stack trace
CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName) JcsWebSolution.Report.CRDocument.SaveToDisk() mOffice.Models.Report.ASSET.RPTH010_Report01.PrintReport() mOffice.Models.Report.ReportBase.PrintProcess()
My system
After that I test a new report which have 3 records without formula. I find that the report can export, but does not show records. So I guess the main reason is that SetDataSource() doesn't work in my machine(windows 2012 R2).
I try to add the code to Web.config. But It still does not show records. Does anyone know about this problem?
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
Hi Tony,
CR 10.5 (CR for VS 2008) is not compatible / tested supported with Win 2012. It is also not compatible with VS 2013.
Upgrade CR to CR for VS 2013 (13.0).
http://scn.sap.com/docs/DOC-7824
Thanks,
Bhushan
Hi Tony
Please do follow Bhushan's advice. And(!), do make sure you uninstall CR 10.5 as CRVS and CR 10.5 do not play nice on the same dev computer. Runtime computers are fine.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Add a comment