Report generation

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hello,

I created a simple report. However, the users now want to be able to
control in which way the data gets sorted which project get included.... I
originally was trying to create several report one for each requirement and
control which one is visible depending on the selections made on a form.
However, I now am wondering if there wouldn't be a smatter approach such as
creating a report on the fly using VBA. I was wondering what the Pros would
recommend? Any good starting sample db I could be referred to?!

Thanks,

Daniel
 
Daniel said:
I created a simple report. However, the users now want to be able to
control in which way the data gets sorted which project get included.... I
originally was trying to create several report one for each requirement and
control which one is visible depending on the selections made on a form.
However, I now am wondering if there wouldn't be a smatter approach such as
creating a report on the fly using VBA. I was wondering what the Pros would
recommend? Any good starting sample db I could be referred to?!


You're right to look for a way to get away from multiple
versions of the same report. But, constructing reports at
runtime is very definitely not the way to go. Instead, use
code in the report's Open event to change the report's
properties according to the user specified sort field.

Since a report's sorting is specified in the report's design
using hte Sorting and Grouping window (View menu), that's
what needs to be modifed:

Me.GroupLevel(x).ControlSource = Forms!theform.txtsortfield

Check Help for GroupLevel for details and other properties
you can set.
 
Back
Top