Author |
Message |
rajlan
Newbie
Joined: 24 Sep 2007
Online Status: Offline
Posts: 13
|
Topic: Total Posted: 24 Sep 2007 at 3:18pm |
I have data in my report like this
Area Color Quantity
CA Red 10
20
30
Total by Red group 60
Blue 05
10
Total by Blue group 15
TX RED 05
15
Total by REd group 20
OR BLUE 10
20
Total by Blue Group 30
Now I want to total Red group at the end of the report (i.e 60 + 20 = 80)
Blue Group Total (10 + 30 = 40)
How can I achieve this in CR XI R2?
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 24 Sep 2007 at 3:57pm |
use a manual running total. Create a formula which says something like
Global NumberVar RedTotal; if {table.Color}='Red' Then RedTotal := RedTotal + {table.Quantity}; Then put this formula somewhere in the Details section and hide it. In the report footer create a formula that simply returns the RedTotal value.
Global NumberVar RedTotal; RedTotal;
|
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>
|
IP Logged |
|
rajlan
Newbie
Joined: 24 Sep 2007
Online Status: Offline
Posts: 13
|
Posted: 24 Sep 2007 at 4:36pm |
Thanks....
I'm a newbie. Where should I create this manual running total
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 24 Sep 2007 at 5:01pm |
Right-click on the Formulas Fields category in the Field Explorer window on the right. Then select New and enter the formula name.
|
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>
|
IP Logged |
|
rajlan
Newbie
Joined: 24 Sep 2007
Online Status: Offline
Posts: 13
|
Posted: 24 Sep 2007 at 5:14pm |
Thank you
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 24 Sep 2007 at 5:30pm |
I also have some chapters from my book online for free. Scroll down past the middle of this page to find out more info about manual running totals: Rnning Totals
|
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>
|
IP Logged |
|
rajlan
Newbie
Joined: 24 Sep 2007
Online Status: Offline
Posts: 13
|
Posted: 24 Sep 2007 at 10:21pm |
I used manual running total for each color(one formula for blue, one for red etc....). I'm getting total of only one color. I want total by each color
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 24 Sep 2007 at 11:05pm |
Can you post your formulas? There is probably something small that you are missing.
|
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>
|
IP Logged |
|
rajlan
Newbie
Joined: 24 Sep 2007
Online Status: Offline
Posts: 13
|
Posted: 25 Sep 2007 at 9:04am |
Global NumberVar BlackActTotal;
if ({ActualsVSEstimate;1.color} = "BLACK") then BlackActTotal:=BlackActTotal+{ActualsVSEstimate;1.actQty}
Global NumberVar BlackEstTotal;
if ({ActualsVSEstimate;1.color} = "BLACK") then BlackEstTotal:=BlackEstTotal+{ActualsVSEstimate;1.estQty}
Global NumberVar BlueActTotal;
if ({ActualsVSEstimate;1.color} = "BLUE") then BlueActTotal:=BlueActTotal+{ActualsVSEstimate;1.actQty}
Global NumberVar BlueEstTotal;
if ({ActualsVSEstimate;1.color} = "BLUE") then BlueEstTotal:=BlueEstTotal+{ActualsVSEstimate;1.estQty}
Global NumberVar RedActTotal;
if ({ActualsVSEstimate;1.color} = "RED") then RedActTotal:=RedActTotal+{ActualsVSEstimate;1.actQty}
Global NumberVar RedEstTotal;
if ({ActualsVSEstimate;1.color} = "RED") then RedEstTotal:=RedEstTotal+{ActualsVSEstimate;1.estQty}
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 25 Sep 2007 at 11:26am |
I don't know about this one. It all looks good. You're putting each formula on the report and they all come back with the same number? Something isn't right. I would display each formula in the Details section so you can see how each one changes as each record is printed. This would help debug it.
|
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>
|
IP Logged |
|
|