Skip to Content
0

Report runs in Crystal Reports 2016 but not through a browser

Jan 14, 2017 at 06:31 PM

35

avatar image

I have created a report that contains man sub-reports. One of the sub reports consistently fails to run and errors out in a web based application.

I have removed and re-imported the sub-report. Changed it's name and re-imported, change the formula name and parameter name and the report still fails. I even recreated the report from scratch using the original formulas and parameters and it fails within the report and as a stand alone.

Here is the formula I use that is generating the error. It does not seem to matter what the formula name is, or the parameter name. As you can see the formula is pulling data from a stored procedure.

if {?DST} = 8

then {Command.CurYRshift_1_8hr}

else {Command.CurYRshift_1_12Hr}

Below is the error code I am receiving:

2017-01-14 18:26:10,176 [DEBUG] XXXX.Stratus.Services.WebAPI.Controllers.ReportController.Generate - CrystalDecisions.CrystalReports.Engine.FormulaException: This field name is not known.
Details: errorKind
Error in File New E911 Calls by Shift 4440_17772_{41FD3A19-D04E-497E-AEE9-A39B5B2C3CD3}.rpt:
Error in formula  Shift_One: 
'if {?DST} = 8 then
'
This field name is not known.
Details: errorKind ---> System.Runtime.InteropServices.COMException: This field name is not known.
Details: errorKind
Error in File New E911 Calls by Shift 4440_17772_{41FD3A19-D04E-497E-AEE9-A39B5B2C3CD3}.rpt:
Error in formula  Shift_One: 
'if {?DST} = 8 then
'
This field name is not known.
Details: errorKind
   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
   --- End of inner exception stack trace ---
   at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
   at PSIMS.Stratus.Services.WebAPI.Controllers.ReportController.Generate(String id, Dictionary`2 inputs)


10 |10000 characters needed characters left characters exceeded

Forgot to post:

Crystal Reports 2016 using sql server 2014 on a windows 10 laptop.

Also if I delete the formula from report it will run. If I add it back it fails.

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers