Our application processes reports with the following sequence of steps:
Load report (by temp copy) from disk
Attach DataTable to the main report and possibly attach other DataTables to subreports.
Set RecordSelectionFormula = "" or "{ado.Faxed} = False"
Set RecordSelectionFormula = ""
Set RecordSelectionFormula = "{ado.Faxed} = True"
ExportToDisk
Set RecordSelectionFormul = ""
"ado" is the alias for the table in the report. The report is designed against stored procedures. At run-time, the stored procedures are executed independently to populate the DataTable objects that are attached to the report.
Users will generate a batch of invoices, purchase orders etc., with an option to include/exclude the "faxed" documents. After that, the application will export the "faxed" documents.
Under CRVS2010 SP2, this was working just fine. Some of our users have started updating to SP4, and the export to disk function fails with this error:
This field name is not known.
Details: errorKind
Error in File rptSOROrderAckPrint {0A0EBC2E-533B-495D-B7E3-665FBA670BEE}.rpt:
Error in formula Record_Selection:
'{ado.Faxed} = True'
This field name is not known.
Details: errorKind
I can roll back the customer to SP2, and our application code works. However, there are other bugs in SP2 that are also untenable, which is why the customer upgraded to SP4 in the first place.
Has anybody else run into this problem? If so, what workarounds have you applied to avoid the issue. I am considering refactoring my code to do each piece "fresh". That is, we'll reload the report and attach the data again for the export option. This will add considerably to the processing time because the "Load" operation is slow, so I am open to other suggestions.