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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to Manipulate the group and sorting in a report?



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2004, 11:40 PM
Jorge Novoa
external usenet poster
 
Posts: n/a
Default How to Manipulate the group and sorting in a report?

Hello everyone!

I'm Using Access XP, with a .MDB file

I want to create some reports, with filters that the user can select the
sorting and grouping in a form.
I mean, suppose a form with the following options to the user:
Group by:
User
Client
Task
Subtotals o primary sort? (checkbox)
Subtotals o secondary sort? (checkbox)



They will be able to select:
1- Group only by one user
2- Group by User AND Client
3- and so on...

In order to get a report like this for the first case:

User Nº1
records
records
...
records
SubTotal of User Nº1:[Subtotal1]

User Nº2
records
records
...
records
SubTotal of User Nº2: [Subtotal2]
Grant Total: [Total]


Or in the second case:

User: User Nº1
Client A
records
records
...
records
Subtotal of Client A

Client B
records
records
...
records
Subtotal of Client B

SubTotal of User Nº1

User: User Nº1
Client A
records
records
...
records
Subtotal of Client A

Client B
records
records
...
records
Subtotal of Client B

Client T
records
records
...
records
Subtotal of Client T

Grant Total: [Total]


I know well this can be done, but I want to setup all these grouping and
sorting with VBA using one or two reports, I don't know if this is possible,
if so please help me.. if not...I'll make as many reports as it takes, and
at least I'd like to know if there's a way to handle values for this report
properties¿?.

Maybe it can be done with one single report and Hide/Show some parts of it.
¿?



Thanx!

Be well guys!

--
________________
Jorge Novoa
F.A. Arias & Muñoz
El Salvador, C.A.



  #2  
Old June 8th, 2004, 06:24 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default How to Manipulate the group and sorting in a report?

You cannot create group levels on the fly (without using design mode), but
you can create as many group levels as you need, and assign their
ControlSource in Report_Open. If you end up needing only one group-level,
set the others to the same field. The assignments are made with:
Me.GroupLevel(i).ControlSource = "SomeField"

Your example involves multiple group levels, with indentation. This will
involved hiding some of the text boxes or even entire sections (group level
and group footer). You may also need to assign the Left property (in twips)
to get the boxes in the desired places, and even assign the ControlSource of
the text boxes themselves to match the group levels. All this has to occur
in Report_Open.

HTH

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jorge Novoa" wrote in message
...
Hello everyone!

I'm Using Access XP, with a .MDB file

I want to create some reports, with filters that the user can select the
sorting and grouping in a form.
I mean, suppose a form with the following options to the user:
Group by:
User
Client
Task
Subtotals o primary sort? (checkbox)
Subtotals o secondary sort? (checkbox)



They will be able to select:
1- Group only by one user
2- Group by User AND Client
3- and so on...

In order to get a report like this for the first case:

User N:1
records
records
...
records
SubTotal of User N:1:[Subtotal1]

User N:2
records
records
...
records
SubTotal of User N:2: [Subtotal2]
Grant Total: [Total]


Or in the second case:

User: User N:1
Client A
records
records
...
records
Subtotal of Client A

Client B
records
records
...
records
Subtotal of Client B

SubTotal of User N:1

User: User N:1
Client A
records
records
...
records
Subtotal of Client A

Client B
records
records
...
records
Subtotal of Client B

Client T
records
records
...
records
Subtotal of Client T

Grant Total: [Total]


I know well this can be done, but I want to setup all these grouping and
sorting with VBA using one or two reports, I don't know if this is

possible,
if so please help me.. if not...I'll make as many reports as it takes, and
at least I'd like to know if there's a way to handle values for this

report
properties??.

Maybe it can be done with one single report and Hide/Show some parts of

it.
??



Thanx!

Be well guys!

--
________________
Jorge Novoa
F.A. Arias & Muqoz
El Salvador, C.A.



  #3  
Old June 9th, 2004, 01:12 AM
Jorge Novoa
external usenet poster
 
Posts: n/a
Default How to Manipulate the group and sorting in a report?

Very usefull information

Thanx a lot!

--
________________
Jorge Novoa
F.A. Arias & Muñoz
El Salvador, C.A.


"Allen Browne" escribió en el mensaje
...
You cannot create group levels on the fly (without using design mode), but
you can create as many group levels as you need, and assign their
ControlSource in Report_Open. If you end up needing only one group-level,
set the others to the same field. The assignments are made with:
Me.GroupLevel(i).ControlSource = "SomeField"

Your example involves multiple group levels, with indentation. This will
involved hiding some of the text boxes or even entire sections (group

level
and group footer). You may also need to assign the Left property (in

twips)
to get the boxes in the desired places, and even assign the ControlSource

of
the text boxes themselves to match the group levels. All this has to

occur
in Report_Open.

HTH

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jorge Novoa" wrote in message
...
Hello everyone!

I'm Using Access XP, with a .MDB file

I want to create some reports, with filters that the user can select the
sorting and grouping in a form.
I mean, suppose a form with the following options to the user:
Group by:
User
Client
Task
Subtotals o primary sort? (checkbox)
Subtotals o secondary sort? (checkbox)



They will be able to select:
1- Group only by one user
2- Group by User AND Client
3- and so on...

In order to get a report like this for the first case:

User N:1
records
records
...
records
SubTotal of User N:1:[Subtotal1]

User N:2
records
records
...
records
SubTotal of User N:2: [Subtotal2]
Grant Total: [Total]


Or in the second case:

User: User N:1
Client A
records
records
...
records
Subtotal of Client A

Client B
records
records
...
records
Subtotal of Client B

SubTotal of User N:1

User: User N:1
Client A
records
records
...
records
Subtotal of Client A

Client B
records
records
...
records
Subtotal of Client B

Client T
records
records
...
records
Subtotal of Client T

Grant Total: [Total]


I know well this can be done, but I want to setup all these grouping and
sorting with VBA using one or two reports, I don't know if this is

possible,
if so please help me.. if not...I'll make as many reports as it takes,

and
at least I'd like to know if there's a way to handle values for this

report
properties??.

Maybe it can be done with one single report and Hide/Show some parts of

it.
??



Thanx!

Be well guys!

--
________________
Jorge Novoa
F.A. Arias & Muqoz
El Salvador, C.A.





 




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 07:16 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.