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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

two seperate grouped fields summed exact same amount?

Status
Not open for further replies.

larz34

Technical User
Jul 14, 2011
3
US
So I'm doing a annual budget report, and with the subreport section I setup I grouped all of the fields based on individual account types in the account_type_c field.

Example:

Account_type_c
within this field is identifiers such as
1
2
3
4
etc...

each of these numbers represent an account type.
So what I did was write a formula for each of these.

Example:

{local}
if account_type_c = 1 then 1
else 0
{regional}
if account_type_c = 2 then 1
else 0

and so on....

Then I have an amount field to sum the amount to the account types:

Formula example:
sum ({amount_filed}, {regional})

I repeat the above formula for both fields. I then drop in the group footer to see the data for both fields, and below is an example of what I get!

{regional sum}
1
2
3
4
5
6

{local sum}
1
2
3
4
5
6

Why is the data not being segregated based on the individual grouping I'm doing? It doesn't make any sense. if I say any field is = to whatever individual piece of data that is in any given field, shouldn't it only give me the results from the data I asked for in the formula?
 
You need individual formula for each account type, like this:

//{@type1}:
if account_type_c = 1 then 1


Then you can right click on each formula and insert a sum at the regional level and then again at the local level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top