Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Nested Ifs Post Reply Post New Topic
Author Message
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Topic: Nested Ifs
     Posted: 23 Aug 2011 at 6:20am

I am trying to do a nested if statement.  Here it is:

 
if cvrSaveFaceValue = {View_PaymentRpt.Po_FaceValue} then
        (
        if Grp3BalanceDue > 0 then
            Grp3BalanceDue := Grp3BalanceDue - ({View_PaymentRpt.Po_FeeSchedule}-BalanceDue);
        else
            Grp3BalanceDue := BalanceDue;
        )
    else
        (
        cvrSaveFaceValue := {View_PaymentRpt.Po_FaceValue};
        Grp3BalanceDue = Grp3BalanceDue + {@BalDue};
        );
Does anyone know what is wrong with it? 
 
It gives me an error of "The ) is missing." and highlights the first else statement.
 
 
Thanks :)
dkalsow
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 23 Aug 2011 at 8:19am
remove the semi-colon after  ({View_PaymentRpt.Po_FeeSchedule}-BalanceDue)


EDIT

Actually, you may have to remove all the semi-colons until you come to the end.


Edited by FrnhtGLI - 23 Aug 2011 at 8:20am
|< /\ '][' ( )
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 23 Aug 2011 at 8:33am
Grp3BalanceDue := Grp3BalanceDue + {@BalDue};

if cvrSaveFaceValue = {View_PaymentRpt.Po_FaceValue} then
        (
        if Grp3BalanceDue > 0 then
            Grp3BalanceDue := Grp3BalanceDue - ({View_PaymentRpt.Po_FeeSchedule}-BalanceDue);
        else
            Grp3BalanceDue := BalanceDue;
        )
    else
        (
        cvrSaveFaceValue := {View_PaymentRpt.Po_FaceValue};
        Grp3BalanceDue = Grp3BalanceDue + {@BalDue};
        ); -- missing semi-colon may be culprit
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