Dynamic sorting and grouping

J

Jonathan Blitz

Is there any way to choose the sorting and grouping of a report at run time?
We want the user to be able to choose what sorting he wants and we do not
wnat to have to write the report a number of times.

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
M

Marshall Barton

Jonathan said:
Is there any way to choose the sorting and grouping of a report at run time?
We want the user to be able to choose what sorting he wants and we do not
wnat to have to write the report a number of times.

Use the report's Open event to run code to manipulate the
report GroupLevel array:

Me.GroupLevel(0).ControlSource = Forms!someform.txtSort1
Me.GroupLevel(1).ControlSource = Forms!someform.txtSort2

If you have group headers/footers with specific field
calculations, you may need to change those control's
ControlSource as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top