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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide group sections

Status
Not open for further replies.

robert12

Programmer
Jan 22, 2002
7
CA
Is there a way to hide group sections based on a parameter defined by the user ?
For example, suppose that a report is grouped by
Country
Region
Town
--details

Based on the parameter, the reports will show only the totals by country or the totals by country and region etc...

Is there an elegant way to do this ?
 
Yep - There's an example in one of the ERD sample reports that come with the IDE. Look at some of the grouping reports.
 
Based on parameter, if you set the key of group Region to that of Country, then you can 'hide' the Region group.

For example, override the Start method of Region group section as follows (assuming you have already specified the Key property of the two groups).

Sub Start()
if Parameter = 1 then ' condition
KeyColumnName = "CountryCode" ' the key of Country group
else
' keep the key assigned
end if
Super::Start()
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top