Grouping data

  • Thread starter Thread starter Alex H
  • Start date Start date
A

Alex H

Hi Hope someone can help

I have selected data for a report which includes two fields - 'Created By'
and 'Service Type'. Sometimes we will want the data grouped by 'Created By'
and with the detail containing the 'Service Type', and at other times we
will want the data grouped by 'Service Type' and the detail containing the
'Created By' field.

Is it possible to do this with a single report, or will I have to created
two reports.

Thanks

Alex
 
If you know nothing about VBA code, it will be easier to use 2 reports.

It is possible to set the ControlSource of the GroupLevel in the Open event
of the report, as described in this article:
Sorting Records in a Report at run-time
at:
http://allenbrowne.com/ser-33.html
Depending on your layout, you may need to set the ControlSource of the text
boxes in Report_Open as well, to get the data to appear in the right places.
 
Allan

Thanks for your response, and using Case I think i have almost got it
sussed. CXan i just ask you another question?

I have created a group which has the name GroupHeader0 .

In the example it refers to GroupLevel(0). Should I be replacing GroupLevel
with GroupHeader, becuase if I have:

Case 1
Me.GroupLevel(0).ControlSource = "Service Type"
Case 2
Me.GroupLevel(0).ControlSource = "Created By"

I get an error message saying can find the field GroupLevel and if I switch
it around, i get an error message saying can find field GroupHeader

Thanks for your help

Alex
 
Allen

of course I am being very thick - it must be Friday All sorted now - I was
on the wrong railway track. Meeded to add a control
of course

Thanks for all your help

Alex
 
Back
Top