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

Getting the group name of an object 1

Status
Not open for further replies.

jwaldner

Programmer
Jan 21, 2011
77
US
I have a report that groups people in 'Teams', Red, Green blue. these group names are created by a formula that looks for people who's name matches a parameter list on the report. Then I have a group based on the names. Works great. Now I need to change the background color based on the group name so 'red team' has a background of red. In order do do this I need to know the group name if the object, how can I get that?

I can parse the string OK if I can get it. so I don't need the parsing code.

My report is a cross tab similar to this:

red name1
team name2
name3
name4

green name1
team name2
name3

the object is represented by the text 'red team' I would like that to be red. I cannot just change it in the report because the user can name teams anything they want. so it needs to be dynamic and check for the name of the group. any ideas?

 
jwalder,

you will need to build a conditional formatting by navigating to:

Right-Click on group --> Section Expert --> the color tab on the RH side of the dialogue and then the "X+2" button for formula's

As for the formula itself, you can reference the :"group name" field, or you can just build the formulas off the field on which the group is based (however you determine which team).

Formula would be such as:
Code:
IF {@Team_Formula} = "Red Team" THEN crRed ELSE
IF {@Team_Formula} = "Blue Team" THEN crBlue ELSE
... so on and so forth

Hope this helps!


Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Where is group --> Section Expert ?? --> can't seem to locate.
thanks!
 
I found the section expert and it seems to apply to the entire section the cross tab is in. not the group within the cross tab itself.
 
jwaldner,

My apologies, in my haste I missed the line "My report is a cross tab similar to this:" and just looked at the structure you provided. oops!

I am not entirely certain how to acheive the same result within a cross-tab. A quick search in google turned up some options, but I couldn't get them to work in short order.

Links:
Google Search
Promising Result?

I hope these help!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Please identify the fields you have entered in the crosstab expert for row, column and summary. Please use the exact field names.

-LB
 
Rows:
@Teams [string based on user entered parameters.
'par Team name' and 'Operator' names that are in each
team. I want to use those group names to set
the background color of the objects that get created.]
mOpinterval.OpName ['Ops' in each team]

Columns:
@date

Summary:
Min Of @ShiftStart (Suppressed)
Min of @ShiftEnd (suppressed)
Sum of @Answered [number]
Avg of @TalkTime [number]
Avg of @Availibility [%]

 
You would have to select the cells you want colored->right click->format field->border->color->background->x+2 and enter:

Select split(gridrowcolumnvalue("@Teams")," ")[1]
case "Red" : red
case "Blue" : blue
case "Green" : green//etc. for all possible colors
default : nocolor

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top