Solved

Running Total based on Specific Order of Group.

Posted on 2014-04-08
4
254 Views
Last Modified: 2014-04-11
GF3 is a specified group with OTHERS being labeled as NON....

in the RH I have

WhilePrintingRecords;
Shared NumberVar NONDISTRICTTAX:=0

in the GF3 I have

WhilePrintingRecords;
Shared NumberVar NONDISTRICTTAX:=
IF GroupName ({@@City}) LIKE 'NON*' THEN Sum ({BV_vwrpt_SalesTax.TaxableValue1}, {@@City})
ELSE 0

in the RF I have

WhilePrintingRecords;
Shared NumberVar NONDISTRICTTAX:=NONDISTRICTTAX;


Why cant I get a grand total of only the Like 'NON*' as indicated above?
0
Comment
Question by:Mikeyman_01
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39987378
You can't use a summary on a summary function.  Also you have WhilePrintingRecords in the formula which forces the evaluation to be after the summaries are calculated.


You should be able to use a formula like and then summarize it.

IF GroupName ({@@City}) LIKE 'NON*' THEN 
    {BV_vwrpt_SalesTax.TaxableValue1}
ELSE
    0

Open in new window


mlmcc
0
 

Author Comment

by:Mikeyman_01
ID: 39987388
Gives me zero's
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39987785
Are you grouping on City?

Try

IF ({@@City}) LIKE 'NON*' THEN
    {BV_vwrpt_SalesTax.TaxableValue1}
ELSE
    0

mlmcc
0
 
LVL 34

Accepted Solution

by:
James0628 earned 500 total points
ID: 39988338
I think the problem is simply that you're not _adding_ to the variable.

 You have

Shared NumberVar NONDISTRICTTAX:=
IF GroupName ({@@City}) LIKE 'NON*' THEN Sum ({BV_vwrpt_SalesTax.TaxableValue1}, {@@City})
ELSE 0


 That will set the variable to the total from each group, so you just end up with the total from the last group.

 If you want to accumulate a total for all of the groups in the report, it should be

Shared NumberVar NONDISTRICTTAX:= NONDISTRICTTAX +
(IF GroupName ({@@City}) LIKE 'NON*' THEN Sum ({BV_vwrpt_SalesTax.TaxableValue1}, {@@City})
ELSE 0)


 And, FWIW, I would change your final formula slightly.  You have

Shared NumberVar NONDISTRICTTAX:=NONDISTRICTTAX;

 That just sets the variable to itself, which doesn't do any harm, but it doesn't do any good either.  You could just use

Shared NumberVar NONDISTRICTTAX


 James
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question