Here is a strange problem I have run into.
My record select formula is as follows:
{aw_illust.ORGID} in [55] and {aw_illust.AGENCY} = 'HCB' and {mod_illustrationDetails.CRTDATE} in #12/1/2009# to #12/31/2009# and ( InStr(UCase({@ClientName}), UCase("Smith")) > 0) and {aw_eCEntUsr.ENDDATE} = {mod_eCEntUsrLastActiveAttachment.LastActiveAttachment} and (isnull({aw_eCEntUsr.DEFAULT}) or {aw_eCEntUsr.DEFAULT} = 'Y' and {mod_illustrationDetails.CRTDATE} in {aw_eCEntUsr.STRDATE} to {aw_eCEntUsr.ENDDATE})
This is being passed in from .NET to Crystal. If I copy this exact 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} & ", " & {aw_illust.CL1FNAM}
Here is the strange part, if I bypass the formula and put the formula text straight into .NET everything works fine.
{aw_illust.ORGID} in [55] and {aw_illust.AGENCY} = 'HCB' and {mod_illustrationDetails.CRTDATE} in #12/1/2009# to #12/31/2009# and ( InStr(UCase({aw_illust.CL1LNAM} & ", " & {aw_illust.CL1FNAM}), UCase("Smith")) > 0) and {aw_eCEntUsr.ENDDATE} = {mod_eCEntUsrLastActiveAttachment.LastActiveAttachment} and (isnull({aw_eCEntUsr.DEFAULT}) or {aw_eCEntUsr.DEFAULT} = 'Y' and {mod_illustrationDetails.CRTDATE} in {aw_eCEntUsr.STRDATE} to {aw_eCEntUsr.ENDDATE})
That is the same record selection, except with '@ClientName' replaced with '{aw_illust.CL1LNAM} & ", " & {aw_illust.CL1FNAM}'. It just happens on this one report, I have many other Crystal reports working with formulas referenced in .NET just fine. Any ideas?
My record select formula is as follows:
{aw_illust.ORGID} in [55] and {aw_illust.AGENCY} = 'HCB' and {mod_illustrationDetails.CRTDATE} in #12/1/2009# to #12/31/2009# and ( InStr(UCase({@ClientName}), UCase("Smith")) > 0) and {aw_eCEntUsr.ENDDATE} = {mod_eCEntUsrLastActiveAttachment.LastActiveAttachment} and (isnull({aw_eCEntUsr.DEFAULT}) or {aw_eCEntUsr.DEFAULT} = 'Y' and {mod_illustrationDetails.CRTDATE} in {aw_eCEntUsr.STRDATE} to {aw_eCEntUsr.ENDDATE})
This is being passed in from .NET to Crystal. If I copy this exact 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} & ", " & {aw_illust.CL1FNAM}
Here is the strange part, if I bypass the formula and put the formula text straight into .NET everything works fine.
{aw_illust.ORGID} in [55] and {aw_illust.AGENCY} = 'HCB' and {mod_illustrationDetails.CRTDATE} in #12/1/2009# to #12/31/2009# and ( InStr(UCase({aw_illust.CL1LNAM} & ", " & {aw_illust.CL1FNAM}), UCase("Smith")) > 0) and {aw_eCEntUsr.ENDDATE} = {mod_eCEntUsrLastActiveAttachment.LastActiveAttachment} and (isnull({aw_eCEntUsr.DEFAULT}) or {aw_eCEntUsr.DEFAULT} = 'Y' and {mod_illustrationDetails.CRTDATE} in {aw_eCEntUsr.STRDATE} to {aw_eCEntUsr.ENDDATE})
That is the same record selection, except with '@ClientName' replaced with '{aw_illust.CL1LNAM} & ", " & {aw_illust.CL1FNAM}'. It just happens on this one report, I have many other Crystal reports working with formulas referenced in .NET just fine. Any ideas?