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

Grouping Like Data Multiple Times

Status
Not open for further replies.

SSSFisgard

Technical User
Nov 7, 2006
27
0
0
Is it possible for me to group data multiple times in one report without going to the sub-report option?

Example: I have data on the locations and cities of property around the world. Management would like groupings of country, then another for city, but they want them independent and not grouped inside each other.
 
Sounds like a Cross Tab is what you need. They are perfect for displaying the same record set grouped by different fields.

Set up 1 to show the data grouped by Country, another grouped by City etc.

Cheers
Pete.
 
You can only parse through the data once, so groups by their nature will be nested, both in normal and crosstab reports.

You only have two options one being the subrport route or if your SQL skills up up to it create a commannd that Unions the data multiple times.

be someting like

Select 'Country' as Type, whatever other fileds you want
from yourtable
union all
Select 'City' as Type, whatever other fields you want
from yourtable

Each query must have some number of columns have each column same data type

You can then report of the command and use type as your group

A comand you can also use command parameters in same way as report parameters, NB you can not use report parameters in a command

Ian
 
OOps thought process too narrow.

Multiple Cross tabs in Report footer or header would probably work

Sorry Pete for casting aspersions on your suggestion.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top