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

Grouping - Same value, two groups 2

Status
Not open for further replies.

BlurredVision

Technical User
Aug 6, 2001
326
GB
I am in need of an idea on how I can create two groups out of a single value.

Here is my formula example:

if {Tax_ID} = "591943502" then "Shands at Live Oak" or
if {Tax_ID} = "591943502" then "Shands at Starke";

The tax_id the above value is found need to create two separate groups when the value is returned. Any ideas?

I am running CR XI R2 against a SQL 2003 backend.

Thank you.
 
How do you know which value means what? I'm guessing there is a second field that helps you distinguish this. What is it?

-LB
 
I guess that's my issue.. I don't have a second field to help distinguish it. If I run into the number 591943502 I need to tell the report to group it twice. Once for Live Oak, the other for Starke..
 
Can you explain why? Nothing else in the database will be able to be associated with one or the other--or are you saying you just need related fields to appear twice, once under each set of names?

-LB
 
Yes, the related fields need to appear twice, under each set of names. Sorry for the confusion.
 
You need to force fields to appear more than once then. You could handle this by using a command as your datasource, like this:

Select table.`Employer`, table.`amount`, table.`tax ID`
from table
where table.`tax ID` <> '591943502'
union
Select 'Shands at Live Oak', table.`amount`, table.`tax ID`
from table
where table.`tax ID` = '591943502'
union
Select 'Shands at Starke', table.`amount`, table.`tax ID`
from table
where table.`tax ID` = '591943502'

Then when you group on {command.employer}, you will get separate groups for 591943502.

-LB
 
Awesome.. I didn't even think of using an union.. well done..
 
BlurredVision,

It's usually customary to give the solver a star, especially one as great as this one as I didn't think of a union either.

A Star for LB!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top