Here is a strange problem I have run into.
My record select formula is as follows, I have dumbed it down for purposes of this error: reportDocument.RecordSelectionFormula = " {@ClientName} = 'Smith' "
If I copy this exact selection statement into Crystal it previews fine, but when run from .NET I get 'This field name is not known'. The problem is occurring at the @ClientName formula field.
@ClientName simply contains: formula = {aw_illust.CL1LNAM}
I can also set it to just a blank string and it still gives 'This field name is not known.' (formula = "")
Here is the strange part, if I bypass the formula and put the formula text straight into .NET everything works fine.
reportDocument.RecordSelectionFormula = " {aw_illust.CL1LNAM} = 'Smith' "
That is the same record selection, except with the '@ClientName' formula replaced with '{aw_illust.CL1LNAM}'. It just happens on this one report, I have many other Crystal reports working with formulas referenced in .NET just fine. Any ideas?