Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: else if Post Reply Post New Topic
Author Message
rptxyz
Newbie
Newbie


Joined: 24 Nov 2007
Online Status: Offline
Posts: 27
Quote rptxyz Replybullet Topic: else if
     Posted: 09 Apr 2008 at 9:58pm

crystal report 9:

how the if, else if work?.

if (...) then 
 for ....
 (
 ...
 );
else if (...) then
 ...;

is this correct?. why do i get boolean error in the "else if" statement?.

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Apr 2008 at 10:42pm
You can't put a semi-colon at the end of the "then" block. That terminates the entire If-then statement and it thinks that the "else if" is starting a brand new statement. Put the semicolon after the end of the Else block.

I have three chapters dedicated to showing how to write formulas and I give you lots of sample code to see how it all works. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum