Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If-Else with multiple statements

Status
Not open for further replies.

KhushiRaina

Programmer
Oct 9, 2002
32
IN
Hi ALL,
I need to execute more than one stmt in the if else loop
For Eg:-

numberVar cnt1;
stringVar emps;

if cnt1 < 3 then
emps:=emps + {EMPLOYEE.FIRSTNAME} + &quot;,&quot;;
cnt1 := cnt1 + 1 ;
else
emps:=emps + {EMPLOYEE.FIRSTNAME} ;
With this formula i get error 'remaining text does not appear to be part of formula'
How to incorporate multiple stms in if-else loop.Pls any help is most welcome...looking forward for some solution..

Regds,
Khushi
 
Khushi,

You might want to post this question in the Crystal Reports Formulas Forum.
 
numberVar cnt1;
stringVar emps;

if cnt1 < 3 then
(
emps:=emps + &quot;hello,&quot;;
cnt1 := cnt1 + 1
)
else
(
emps:=&quot;111&quot;;
)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top