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

Change Group based on Parameter

Status
Not open for further replies.

sboyle1

Programmer
Dec 11, 2000
10
US
I'm hitting the wall on this one.

I have an Inventory report which is grouped by inventory item and site (Groups on the following formula: {InvItem}&{Site} )

The boss wants a parameter that will prompt for how the report will be grouped. They want to group by items at an individual site (which the report is doing now), or by items at a group of sites (i.e., show me inventory totals for the Southern Region, made up of sites 100, 200, 300). In this example, "Southern Region" isn't anywhere in the database, but I can always build a lookup table.

Anyone have any suggestions for doing something like this?

Thanks
Sean
 
I would create the grouping data in another table (or existing site table) and add it to the report.

Now you can conditionally suppress this section based on the parameter input (right click section->format section->X-2 next to suppression and place in a formula such as:

{?GroupByRegion} = "No"

I'd also set this parm to be preset and not allow users to modify or add values, just select from 2 choices, yes or no.

You could also just build up a group within Crystal based an a big stewpud looking Formula, but it would only generate a Group for those that matched the criteria.

The formula would be something like:

If {MyTable.MySite} in ["Site1", "Site2", Site3"] then
1
else if
{MyTable.MySite} in ["Sit41", "Site4"] then
2
etc...

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top