Istari
Istari

Reputation: 3973

Report - Running Count within a Group

I have an Access 2007 report which is grouped by RoomType_ID

I need to do a running count on each line within the Group so that I end up with something like:

RoomType_ID 1 1 Mr and Mrs Smith 2 Mr and Mrs Jones 3 Mr and Mrs Smythe

RoomType_ID 2 1 Mr Foo 2 Mrs Bar

etc...

How can I go about getting this?

Upvotes: 0

Views: 5237

Answers (2)

Albert D. Kallal
Albert D. Kallal

Reputation: 48999

Just place a text box in the details section of the report, make the data source of the text box simply:

=(1)

On the data tab of the above text box, set the running sum = “over all”

So, you have For one line of detail in the report:

[=(1)] [Couples Name] [Phone Number] ..etc

And, I would call the text box "textCount"

And, if you want at the “end” of the report, you can show a final count by placing the above text name in another text box in the reports FOOTER. eg: [textCount]

Set the running sum to no.

Upvotes: 2

Birger
Birger

Reputation: 4353

If probably use (detail) sections in your report (for the grouping). You can make a global integer for the running total value and have it reset every time the 'on layout' or 'on print' event of the header section fires.

Upvotes: 0

Related Questions