sorting mess...

zozew

Registered User.
Local time
Today, 19:26
Joined
Nov 18, 2010
Messages
199
I have a field (squad) in a report that i want to group on and show a total for each group..the squad value is an integer from 1 to about 100

Now to the mess...i want to group the field on three values or rather three groups of values..

squad = 2
squad = 3
squad = all but 2 and 3

its the last one i cant get to work, im trying out some expressions but no luck, i have added a foot for the group squad and there i added a count(*)

Any idea on the syntax of the expression to get the last one to group correctly?
 
In the report's source query, create a calculated field and group on it:

IIf(Squad=2 Or Squad=3, Squad, 99)
 
You need to base your report on a query with a sorting number and do grouping in your report on that number.
Something like:
SortNo: IIf([squad] =2;1; IIf([squad] =3;2;3))
Depending of from where you're in the would, you must change the ; to ,
SortNo: IIf([squad] =2,1, IIf([squad] =3,2,3))
 
In the report's source query, create a calculated field and group on it:

IIf(Squad=2 Or Squad=3, Squad, 99)

I understand the process making a new column with the values 2, 3 and all other squads becoming 99 and the query works great doing just that.

But....when grouping it in the report I get subtotals for the number 2 and 99 and a subtotal footer missing for the number 3...very peculiar...still testing...
 

Attachments

  • missing.jpg
    missing.jpg
    83.4 KB · Views: 115
Sometimes its just ridiculous... it was the reports alternate row color and the fact that my text was white it looked like it was not showing hahaah

sorted now! thx guys
 

Users who are viewing this thread

Back
Top Bottom