|
-
Feb 28th, 2007, 05:26 PM
#1
Thread Starter
PowerPoster
Syntax Error in Crystal Report formula???
I'm using CR 10. I have a formula that keeps giving me the following error:
"The remaining text does not appear to be part of the formula"
The error occurs beginning and ending with the highlighted code.
Here is my code:
Code:
if {tblBatchDetail.carrierSCAC} > "" then
if {tblBatchDetail.fein} > "" then
{tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein};
if {tblCarriers.AdventCarrierCD} > "" then
{tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein} & "/" & {tblCarriers.AdventCarrierCD}
else
{tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein} & "/(Unk)"
else
{tblBatchDetail.carrierSCAC} & "/(Unk)"
else
"Unkown"
end if
What exactly am I missing here....a colon, semi-colon after each statement?
-
Feb 28th, 2007, 06:31 PM
#2
Re: Syntax Error in Crystal Report formula???
Use parentheses when you want to run multiple statements within an If branch. There is no End If when using Crystal Syntax.
Code:
if {tblBatchDetail.carrierSCAC} > "" then
if {tblBatchDetail.fein} > "" then
(
{tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein};
if {tblCarriers.AdventCarrierCD} > "" then
{tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein} & "/" & {tblCarriers.AdventCarrierCD}
else
{tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein} & "/(Unk)"
)
else
{tblBatchDetail.carrierSCAC} & "/(Unk)"
else
"Unkown"
-
Mar 1st, 2007, 10:21 AM
#3
Thread Starter
PowerPoster
Re: Syntax Error in Crystal Report formula???
I didn't know that Bruce. Thanks, that worked great!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|