Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula In Grouping Area 2

Status
Not open for further replies.

zenzabar

Technical User
Jan 24, 2007
24
US
I'm using Crystal XI and having difficulty creating a formula total. I've probably made this more complicated than it needs to be but because of all of the different codes, thought it was the way to build this one.I'm attempting to add up for each provider on each page their total dollar amount of charges per pay period. Please throw me a bone! Thanks. Is there someone willing to take a look at my file via email and look at the formula first hand?

 
Post your formula but normally

In the group header, initialize your shared variable

shared numbervar totamount := 0;

In the Detail Section, enter your formula

shared numbervar totamount;

totamount := totamount + {table.field};

In your group footer, display the amount

shafred numbervar totamount;

totamount;


-lw
 
Crystal XI

Here's the start of my formula -
if GroupName ({vwBatchPrintChgs.Procedure_Code}) = ["90806FP"] then Count ({vwBatchPrintChgs.Procedure_Code}, {vwBatchPrintChgs.Procedure_Code})*50.00

My problem (my preceived problem) is that I have up to 5 codes to add to the @Total amount with different dollar amounts assigned to them. So, I may have five 90806FP at $50, four 90801FP at $38, Three BRAPPTFP at $19 and so on. These are grouped and counted via their rates. Thanks for your help!!
 
You could use the the following formula on your group headers

select GroupName ({vwBatchPrintChgs.Procedure_Code})

Case "908065P":
Count ({vwBatchPrintChgs.Procedure_Code}, {vwBatchPrintChgs.Procedure_Code})*50.00

case "90801FP":
Count ({vwBatchPrintChgs.Procedure_Code}, {vwBatchPrintChgs.Procedure_Code})*38.00

Case "BRAPPTFP":
Count ({vwBatchPrintChgs.Procedure_Code}, {vwBatchPrintChgs.Procedure_Code})*19.00

and so forth....

-lw
 
Set up a formula like this to establish the charges:

select {vwBatchPrintChgs.Procedure_Code}
case "90806FP" : 50
case "90807XY" : 75
case "90808ZA" : 25
default : 0

Insert a group on provider and a second group on pay period. Then insert a sum on the above formula at the pay period level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top