Author |
Message |
srklg1
Newbie
Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
|
Topic: Formula Field Summing Posted: 19 Nov 2007 at 10:29am |
Good afternoon,
I have a question for the group.
The following formula field multiplies a $ figure times a %.
IF {@CONV - SlsPrsn ID} = 5481 then {@MC $} * 1 else
IF {@CONV - SlsPrsn ID} = 2940 then {@MC $} * 1 else
IF {@CONV - SlsPrsn ID} = 5484 then {@MC $} * .30 else IF {@CONV - SlsPrsn ID} = 5480 then {@MC $} * .15 else
IF {@CONV - SlsPrsn ID} = 5483 then {@MC $} * .30 else IF {@CONV - SlsPrsn ID} = 5479 then {@MC $} * .15 else
IF {@CONV - SlsPrsn ID} = 5485 then {@MC $} * .30 else IF {@CONV - SlsPrsn ID} = 5478 then {@MC $} * .15
CR does not sum the fields and I can't insert summaries.
Any ideas on how to get around this?
THanks,
|
srklg1
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 19 Nov 2007 at 10:51am |
Have you tried a manual running total?
|
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 |
|
srklg1
Newbie
Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
|
Posted: 19 Nov 2007 at 11:28am |
Not sure how to do that. Is there documentation on that function somewhere?
|
srklg1
|
IP Logged |
|
Lugh
Senior Member
Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
|
Posted: 20 Nov 2007 at 6:45am |
Here is a simple overview of the concept. You'll be looking at method #2. Tek-tips has a number of decent FAQs. Like this one, they tend to be a little sparse. But, they'll often get you going in the right direction.
|
IP Logged |
|
H0P5
Newbie
Joined: 20 Jun 2007
Online Status: Offline
Posts: 14
|
Posted: 21 Nov 2007 at 4:39am |
Hello Mate
Did you get any luck with your drama?
I am having exactly the same problem. My formula calculates what I am looking for, allows me to use it as a group summary, but won't allow me to select it as a report summary.
|
H0P5
|
IP Logged |
|
srklg1
Newbie
Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
|
Posted: 21 Nov 2007 at 10:31am |
Dude,
No luck yet, and I tried the Crosstab solution that was suggested but the sums came out TOO LARGE. I'm trying to figure out the manual running total . . .
Will let you know what I come up with!
Thanks for checkin' in!
SRK
|
srklg1
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 21 Nov 2007 at 11:00am |
Crosstabs are no good for this question. The link that Lugh mentioned is a good summary of running totals. What specific problems did you run into when you tried that?
|
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 |
|
srklg1
Newbie
Joined: 10 Sep 2007
Location: United States
Online Status: Offline
Posts: 22
|
Posted: 21 Nov 2007 at 11:37am |
The formula field I would like to have a running total on does not come up in the list on the Create Running Total Field. Is there another place to add the field? It's on the report.
Thanks!
|
srklg1
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 21 Nov 2007 at 1:55pm |
Yes, CR can't do running totals on certain formulas depending upon what it is calculating and what types of functions it uses. That's why you have to use a manual running total. If you look at the link that Lugh posted, you can use that code to create a global variable which sums the value of your formula for every field. Then in the report footer you can print the value of this global variable to get the formula's running total.
|
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 |
|
|