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!

Combining Groups in CR 8.5 1

Status
Not open for further replies.

simmolinho

Technical User
Dec 16, 2003
25
GB
Hi there,

In my group header I have a formula field. Is it possible to combine 2 of the results under one group header. eg if I have 10 results under group 'a' and 5 under group 'b' can I combine them to make group 'c' with 15 records??

Thanks for your time.
 
Could you give me a little more information on your situation? I have an idea, but I need a little more insight to be sure.

Matt
 
If, for example, group "a","b", and "x" are all instances of one group, e.g., cities, you could create an outer group which clusters instances of the inner group into a higher order category, e.g. state. If you wanted group "a" and group "b" to be one group, and group "x" to be another, then create a formula:

If {table.city} in ["a","b"] then "Massachusetts" else if {table.city} = "x" then "Vermont" else //etc.

Group on this formula to get a display like:
Number of Records
Massachusetts 15
a 5
b 10
Vermont 7
x 7

-LB
 
Thankyou both for the responses.

That sounds like a good idea so i'll give it a go.
I'm assume i'll need to create an extra group section 1 level up and suppress the original group values to get this to appear correctly?

Please let me know if i've got the wrong end of the stick!!

Thanks again
 
Go to report->change group expert and use the "up" direction key to move the new group based on the formula to the top position. Then check your display. I'm not clear on what you want it to be. You could suppress the Group 2 (e.g., cities) header and footer and display the details, but if you don't need that group at all, just delete it so that the details sort correctly. Or you could decide to display both groups and the details, if you want to look at the data at different levels.

-LB
 
Thanks Again for your help.

When I do this I'm still getting 2 groups called the same thing rather than a single group with all the records consolidated underneath.

APologies if i'm not making it very clear.
 
Please provide your formula and a sample of your results.

-LB
 
Thanks Ibass,

My initial grouping is carried out on an Asignee field that could be populated with a name OR be NULL or just blank.

To avoid having a Group header of " " I created a formula for the grouping....

If isnull({Assignee}) or if {Assignee} = "" then "Not Assigned" else {Assignee}

The Results of this is that I get 2 groups called "Not Assigned" (1 for the Null values and 1 for the blank values) ie...

Not Assigned
01234 Example1
34567 Example2

Not Assigned
98765 Example3
56784 Example4

Frank Smith
67854 Example5

Dave Johnson
65532 Example6
28394 Example7

etc.....

I want to consolidate the 2 "Not Assigned" groups into a single group - which lead me to post the thread.

Thanks again
 
I think you grouped on the {table.assignee} field and then used your formula for the group name. What you need to do is group on your formula, NOT on {table.assignee}.

-LB
 
Thanks very much!

I would've stared past that for weeks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top