Print Page | Close Window

formula problem

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2408
Printed Date: 05 May 2024 at 9:06am


Topic: formula problem
Posted By: seenivasan
Subject: formula problem
Date 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:= mailto:%7b@tZSum - {@tZSum };
if {proc_RptCruise_TMFT;1.GST_O} > 0 then
        strGST:= strGST + mailto:%7b@tOSum - {@tOSum };
if {proc_RptCruise_TMFT;1.GST_J} > 0 then
        strGST:=strGST + mailto:%7b@tJSum - {@tJSum };
if {proc_RptCruise_TMFT;1.GST_V} > 0 then
        strGST:=strGST + mailto:%7b@tVSum - {@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



Replies:
Posted By: hilfy
Date Posted: 22 Feb 2008 at 7:03am

Try this:

if {proc_RptCruise_TMFT;1.GST_Z} > 0 then
        strGST:=
mailto:%7b@tZSum - {@tZSum }
else strGST := strGST;
if {proc_RptCruise_TMFT;1.GST_O} > 0 then
        strGST:= strGST +
mailto:%7b@tOSum - {@tOSum } 
else strGST := strGST;
if {proc_RptCruise_TMFT;1.GST_J} > 0 then
        strGST:=strGST +
mailto:%7b@tJSum - {@tJSum } 
else strGST := strGST;
if {proc_RptCruise_TMFT;1.GST_V} > 0 then
        strGST:=strGST +
mailto:%7b@tVSum - {@tVSum } 
else strGST := strGST;
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window