Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: formula problem Post Reply Post New Topic
Author Message
seenivasan
Newbie
Newbie


Joined: 04 Feb 2008
Online Status: Offline
Posts: 3
Quote seenivasan Replybullet Topic: formula problem
    Posted: 21 Feb 2008 at 11:39pm
 
Hi.
Below is the contents of a formula.
 
Local StringVar strGST;
strGST := "";

if {proc_RptCruise_TMFT;1.GST_Z} > 0 then
        strGST:= {@tZSum};
if {proc_RptCruise_TMFT;1.GST_O} > 0 then
        strGST:= strGST + {@tOSum};
if {proc_RptCruise_TMFT;1.GST_J} > 0 then
        strGST:=strGST + {@tJSum};
if {proc_RptCruise_TMFT;1.GST_V} > 0 then
        strGST:=strGST + {@tVSum};

 
Now the problem is if any of the if condition proves to be false then the formula is showing empty.
 
For ex : if 1, if 2 fails , if 3 return true and if 4 fails then the content assigned from if 3 also vanishes from strGST.
 
How to overcome this problem  Shocked
 
Thanks
 
Seenivasan
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 22 Feb 2008 at 7:03am

Try this:

if {proc_RptCruise_TMFT;1.GST_Z} > 0 then
        strGST:=
{@tZSum}
else strGST := strGST;
if {proc_RptCruise_TMFT;1.GST_O} > 0 then
        strGST:= strGST +
{@tOSum} 
else strGST := strGST;
if {proc_RptCruise_TMFT;1.GST_J} > 0 then
        strGST:=strGST +
{@tJSum} 
else strGST := strGST;
if {proc_RptCruise_TMFT;1.GST_V} > 0 then
        strGST:=strGST +
{@tVSum} 
else strGST := strGST;
-Dell
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.