Hi:
I am trying to convert a complex immediate If statement (IIf) that was successfully generated in Access 2000 to a comparative one in a Crystal Reports 8.5 formula.
Here is the syntax in as it is in Access 2000, an IIf statement:
=IIf(IsNull([Revd_Coord]),""," Received on:" & Format([Revd_Coord],"Medium Date")) & IIf(IsNull([Sent_to]),""," Sent to:" & [Sent_to]) & IIf(IsNull([Date_Sent_for_Coord]),""," Sent On:" & Format([Date_Sent_for_Coord],"Medium Date")) & IIf(IsNull([Suspense_for_Coord]),""," Suspense:" & Format([Suspense_for_Coord],"Medium Date")) & IIf(IsNull([Coord_Complete]),""," Complete:" & Format([Coord_Complete],"Medium Date")),""))
This statement is for a field called Coordination on a report.
The result looks like the following example for those fields that are not null for a specific record:
Coordination: Suspense:15-Jun-99 Complete: 15-Jun-99
I attempted to do the same thing in a Crystal Reports 8.5 formula called Coordination.
In CR, my syntax looks like:
IF IsNull({qryAgreement.Revd_Coord}) then
" "
Else
"Received On: " + ToText(CDate({qryAgreement.Revd_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Sent_to}) then
" "
Else
"Sent To: "+ ToText(CDate({qryAgreement.Sent_to}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Date_Sent_for_Coord}) then
" "
Else
"Sent On: "+ ToText(CDate({qryAgreement.Date_Sent_for_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Suspense_for_Coord}) then
" "
Else
"Suspense: "+ ToText(CDate({qryAgreement.Suspense_for_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Coord_Complete}) then
" "
Else
"Complete: "+ ToText(CDate({qryAgreement.Coord_Complete}),"dd-MMM-yy")
The 'qryAgreement' refers to a view used to generate the report.
When I ran just the first few lines of the formula, it ran correctly with the following syntax:
IF IsNull({qryAgreement.Revd_Coord}) then
" "
Else
"Received On: " + ToText(CDate({qryAgreement.Revd_Coord}),"dd-MMM-yy")
If the Revd_Coord field was not null, the data appeared on the report like:
Received On: 15-Jun-99
But when I added the rest of the syntax like:
IF IsNull({qryAgreement.Revd_Coord}) then
" "
Else
"Received On: " + ToText(CDate({qryAgreement.Revd_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Sent_to}) then
" "
Else
"Sent To: "+ ToText(CDate({qryAgreement.Sent_to}),"dd-MMM-yy") and ...
I tried to save the formula in CR, and I received the following error message:
A boolean is required here.
I take it that I must have some error in my syntax.
Can anyone help to figure out what I'm doing incorrectly in CR?
Any help is most greatly appreciated.
Thanks,
Cheryl3D
I am trying to convert a complex immediate If statement (IIf) that was successfully generated in Access 2000 to a comparative one in a Crystal Reports 8.5 formula.
Here is the syntax in as it is in Access 2000, an IIf statement:
=IIf(IsNull([Revd_Coord]),""," Received on:" & Format([Revd_Coord],"Medium Date")) & IIf(IsNull([Sent_to]),""," Sent to:" & [Sent_to]) & IIf(IsNull([Date_Sent_for_Coord]),""," Sent On:" & Format([Date_Sent_for_Coord],"Medium Date")) & IIf(IsNull([Suspense_for_Coord]),""," Suspense:" & Format([Suspense_for_Coord],"Medium Date")) & IIf(IsNull([Coord_Complete]),""," Complete:" & Format([Coord_Complete],"Medium Date")),""))
This statement is for a field called Coordination on a report.
The result looks like the following example for those fields that are not null for a specific record:
Coordination: Suspense:15-Jun-99 Complete: 15-Jun-99
I attempted to do the same thing in a Crystal Reports 8.5 formula called Coordination.
In CR, my syntax looks like:
IF IsNull({qryAgreement.Revd_Coord}) then
" "
Else
"Received On: " + ToText(CDate({qryAgreement.Revd_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Sent_to}) then
" "
Else
"Sent To: "+ ToText(CDate({qryAgreement.Sent_to}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Date_Sent_for_Coord}) then
" "
Else
"Sent On: "+ ToText(CDate({qryAgreement.Date_Sent_for_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Suspense_for_Coord}) then
" "
Else
"Suspense: "+ ToText(CDate({qryAgreement.Suspense_for_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Coord_Complete}) then
" "
Else
"Complete: "+ ToText(CDate({qryAgreement.Coord_Complete}),"dd-MMM-yy")
The 'qryAgreement' refers to a view used to generate the report.
When I ran just the first few lines of the formula, it ran correctly with the following syntax:
IF IsNull({qryAgreement.Revd_Coord}) then
" "
Else
"Received On: " + ToText(CDate({qryAgreement.Revd_Coord}),"dd-MMM-yy")
If the Revd_Coord field was not null, the data appeared on the report like:
Received On: 15-Jun-99
But when I added the rest of the syntax like:
IF IsNull({qryAgreement.Revd_Coord}) then
" "
Else
"Received On: " + ToText(CDate({qryAgreement.Revd_Coord}),"dd-MMM-yy") and
IF IsNull({qryAgreement.Sent_to}) then
" "
Else
"Sent To: "+ ToText(CDate({qryAgreement.Sent_to}),"dd-MMM-yy") and ...
I tried to save the formula in CR, and I received the following error message:
A boolean is required here.
I take it that I must have some error in my syntax.
Can anyone help to figure out what I'm doing incorrectly in CR?
Any help is most greatly appreciated.
Thanks,
Cheryl3D