Print Page | Close Window

Formula has wrong results

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=1558
Printed Date: 28 Apr 2024 at 7:38am


Topic: Formula has wrong results
Posted By: remo
Subject: Formula has wrong results
Date Posted: 23 Oct 2007 at 9:08am
am beginner to crystal reports, i ve some doubts wen am using ths...thanx 4 ur supports,,,, hop u people will help me everytime...]

wen i was using sum like ths

({TradeNetMessage.TotCustomDutyAmt} + {TradeNetMessage.TotGST} + {TradeNetMessage.TotAmtPaid} + {TradeNetMessage.TotCustomDutyAmt

itz result was only last records sum, but i need whole records sum , wt can i do 4 dat?



Replies:
Posted By: BrianBischof
Date Posted: 23 Oct 2007 at 9:30am
If you want formulas to accumulate over the full report, then you need to assign it to a global variable. Then you can print the global variable at the end of the report. Here is a sample formula that you can play with:
Global NumberVar Summary;
Summary := Summary + ({TradeNetMessage.TotCustomDutyAmt} + {TradeNetMessage.TotGST} + {TradeNetMessage.TotAmtPaid} + {TradeNetMessage.TotCustomDutyAmt})

To print the summary, create another formula which simply returns the value and put that on the report.
Global NumberVar Summary;
Summary;



-------------
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>


Posted By: remo
Date Posted: 24 Oct 2007 at 3:50pm
Thanks Brian ur SmileSmileformula works now,,,, Thanx once again



Print Page | Close Window