A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

row number: specifying the group when using "over group"



 
 
Thread Tools Display Modes
  #1  
Old July 31st, 2007, 07:36 PM posted to microsoft.public.access.reports
Coltrane04
external usenet poster
 
Posts: 3
Default row number: specifying the group when using "over group"

I'm having a problem with row numbers in a report with three
groupings. The exact subject matter is a bit arcane, so as an example
I'll use taxi cabs. My question is simple: how do I get the desired
result (listed third below)? In other words, how do I specify the
group when asking for a running sum "Over Group"?

(The hypothetical data assumes as fixed-width font.)

Thank you,
Alec


-------------------- OVER ALL --------------------

Row | Day: Tuesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13567 13580
2 13580 13585

Total: 18

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9721 9740
4 9740 9753

Total: 22

Row | Day: Wednesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
5 13585 13600
6 13600 13611

Total: 26

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
7 9753 9767
8 9767 9774

Total: 19

-------------------- OVER GROUP --------------------

Row | Day: Tuesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13567 13580
2 13580 13585

Total: 18

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
1 9721 9740
2 9740 9753

Total: 22

Row | Day: Wednesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13585 13600
2 13600 13611

Total: 26

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
1 9753 9767
2 9767 9774

Total: 19

-------------------- DESIRED --------------------

Row | Day: Tuesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13567 13580
2 13580 13585

Total: 18

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9721 9740
4 9740 9753

Total: 22

Row | Day: Wednesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13585 13600
2 13600 13611

Total: 26

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9753 9767
4 9767 9774

Total: 19

  #2  
Old August 1st, 2007, 12:12 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default row number: specifying the group when using "over group"

Coltrane04 wrote:

I'm having a problem with row numbers in a report with three
groupings. The exact subject matter is a bit arcane, so as an example
I'll use taxi cabs. My question is simple: how do I get the desired
result (listed third below)? In other words, how do I specify the
group when asking for a running sum "Over Group"?
-------------------- DESIRED --------------------

Row | Day: Tuesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13567 13580
2 13580 13585

Total: 18

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9721 9740
4 9740 9753

Total: 22

Row | Day: Wednesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13585 13600
2 13600 13611

Total: 26

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9753 9767
4 9767 9774

Total: 19



Use two running sum text boxes.

Add another one to the driver group footer section.

Then the detail
--
Marsh
MVP [MS Access]
  #3  
Old August 1st, 2007, 04:26 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default row number: specifying the group when using "over group"

Marshall Barton wrote:

Coltrane04 wrote:

I'm having a problem with row numbers in a report with three
groupings. The exact subject matter is a bit arcane, so as an example
I'll use taxi cabs. My question is simple: how do I get the desired
result (listed third below)? In other words, how do I specify the
group when asking for a running sum "Over Group"?
-------------------- DESIRED --------------------

Row | Day: Tuesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13567 13580
2 13580 13585

Total: 18

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9721 9740
4 9740 9753

Total: 22

Row | Day: Wednesday
------------
Driver: Alice
-------------
Odometer Start | Odometer Stop
---------------------------------
1 13585 13600
2 13600 13611

Total: 26

Driver: Bob
-------------
Odometer Start | Odometer Stop
---------------------------------
3 9753 9767
4 9767 9774

Total: 19



Whoops. Let's try that again.

Use two running sum text boxes.

Assuming the detail section running sum text box is named
txtLine.

Add an unbound text box (named txtGrpZ) to the day group
header section. Add a line of code to the day group header
section's Format event to initialize the text box's value:
txtGrpZ = 0

Now, add a text box (named txtGrpLine) to the driver group
footer section. Set its RunningSum property to Over Group
and its expression to:
=txtLine
Add a line of code to the driver group footer section's
Format event:
txtGrpZ = txtGrpLine

Finally, add another text box to the detail section. Use
the expression:
=txtGrpZ + txtLine

--
Marsh
MVP [MS Access]
  #4  
Old August 4th, 2007, 06:42 PM posted to microsoft.public.access.reports
Coltrane04
external usenet poster
 
Posts: 3
Default row number: specifying the group when using "over group"

What an ugly hack! Given my current frustration level, I'm just happy
that it works. Thank you.

-- Alec


Whoops. Let's try that again.

--
Marsh
MVP [MS Access]


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.