Dynamic Grouping

  • Thread starter Thread starter PIMA
  • Start date Start date
P

PIMA

I have a report with a fixed layout which should accept
different grouping on same recordsource depending on the
user's choice: sometimes it can be groupeb by article,
sometimes by customer, sometimes even by article and
cusrtomer. Therefore I need Just 1 report with a fixed
number of groups to be changed any time.
I tried to submit a function returning a [string], but
with no success, and it is not possible to have a function
returning a Dao.Field because it raises an error.
As it should be a runtime version, I can not use the
CreateGroupLevel method as it requires to have the report
in design mode.
Does anyone know how to fix it up?
Thanx
Matteo
 
PIMA said:
I have a report with a fixed layout which should accept
different grouping on same recordsource depending on the
user's choice: sometimes it can be groupeb by article,
sometimes by customer, sometimes even by article and
cusrtomer. Therefore I need Just 1 report with a fixed
number of groups to be changed any time.
I tried to submit a function returning a [string], but
with no success, and it is not possible to have a function
returning a Dao.Field because it raises an error.
As it should be a runtime version, I can not use the
CreateGroupLevel method as it requires to have the report
in design mode.


You can precreate the (potential) group level and modify
them at run time.

I don't know how you're specifying what field(s) the report
is supposed to group on for a specific run, but if it's a
text (or combo) box on a form, the code in the report's Open
event would be along these lines:

Me.GroupLevel(0).ControlSource = Forms!theform.thetextbox
 
Back
Top