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 order question

Status
Not open for further replies.

BigC72

MIS
Oct 15, 2004
69
0
0
US
I am using CR XI to query a DB2 database and have a rather extensive report that is utilized by different personnel within the company who's needs vary depending on what they do....I have built reports that allow the end user to specify the primary or first level grouping on a report but is there a way to allow them through the use of a parameter to determine the entire grouping order of the report? In better terms maybe I have groups 1,2,3,4,5 and I would like the end user to be able to order them however they choose 4,2,3,1,5 or 3,5,4,1,2 something along those lines......
 
Assuming that you mean that they will vary per group, as opposed to selecting differetn sets as ni your example, you would need parameters designating each groups choice, and then base the group formauls based no the choices.

A shame you didn't bother to post your current formula, I'm not sure why you felt that unimportant.

So the 1st group formula might contain:

if {?group1 choice} = "City" then
{table.city}
else
if {?group1 choice} = "State" then
{table.state}
else
if {?group1 choice} = "Zip" then
picture({table.zip},"000000000000"//assumed a string
else
if {?group1 choice} = "Create Date" then
totext({table.createdate},"yyyyMMdd")

Note that I covered 4 scenarios, and 3 different data elements allowing for the proper sortation of each.

-k
 
Didn't think about it frankly...but here it is....it works fine but all it allows the end user to determine or choose is what the top(first) level group will be not to actually set the entire grouping order:

if {?Grouping Order} = "Procedure Code" then {TRANSACTIONS.PROCEDURE_CODE} else

if {?Grouping Order} = "Physician" then {@doc_name} else

if {?Grouping Order} = "Modifier" then {TRANSACTIONS.PROCEDURE_MOD1} else

if {?Grouping Order} = "Place of Service" then {@pos} else

if {?Grouping Order} = "Bill Type" then {@insur_names}

What I would like to be able to facilitate is to allow the user to say first group by Procedure Code, then Place of Service, then Modifier, then Bill Type and lastly Physician....
 
Create 5 grouping parameters, or set up one parameter which has some limited sets of allowed sortation already defined.

My first post demonstrates using 5 parameters, I just didn't write out all 5 group formulas, create the additional ones accordingly if you wish to go that route.

Otehrwise create 1 parameter which shows the sets of combinations allowed for, and code each group formula accordingly as well.

-k
 
Your formula works fine for group 1. As synapsevampire pointed out, you now need to create a similar formula (and parameter) for the remaining groups.

MrBill
 
Sounds good K....I'll put it together that way and give it a go....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top