Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report - Turn Grouping On And Off?

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have a report that has 2 groupings and 2 sortings. I want to use a form to dictate whether the top grouping (GroupHeader(0)) is on or not. I have it partially working, where it doesn't show the group or it's 1 textbox control. But the 2nd grouping still seems to group it's data by the first grouping that isn't showing. Can someone please help me understand what I am doing wrong?


This is my onopen of the report - I pass the openargs with a 1 or 0 based on a form checkbox.
Code:
If Me.OpenArgs = 1 Then
    Me.GroupLevel(0).ControlSource = "Field4"
    Me.GroupLevel(0).SortOrder = True
    Me.Section(5).Visible = True
    Me.txtGroupException.Visible = True
    Me.txtGroupException.ControlSource = IIf(Len([Field1]) > 0, [Field1] & ": ", "") & IIf(Len([Field2]) > 0, [Field2] & " - ", "") & IIf(Len([Field3]) > 0, [Field3], "") & " - (" & [Field4] & ")"
Else
    Me.Section(5).Visible = False
    Me.GroupHeader0.Visible = False
    Me.txtGroupException.Visible = False
    Me.txtGroupException.ControlSource = ""
End If

Thanks!

misscrf

It is never too late to become what you could have been ~ George Eliot
 
ahhhh. Does this make sense, though? That you would have a report menu for criteria to pass to a report, including having the report grouped or not?

I will try this and see how it goes.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
I guess lol. NM. Now I'm debugging the criteria and getting a weird error. I'll post it in another thread.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top