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

Counting a change in a field

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
I want to put a small table in the footer of my report that perfoms a cout on a field.
It will be like the subtotal count function in Excel, when at each change in the field occurs it coutns on that occurance.
lets say field one can have 3 values: a, b and c
the table should contain the count of each.

does anyone know how I can do this?
 
There are 2 ways you could do this.

The first (and easiest) would be to create a Cross tab.

The second would be to create 3 formulas (for example) :

If {table.field} = "a" then 1 else 0

If {table.field} = "b" then 1 else 0

If {table.field} = "c" then 1 else 0

Place these fields on the report, right click, insert, summary SUM. This will give you 3 conditional counts.

Hope this helps...


Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
No problem. Glad to be of service. [smile]

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top