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!

Conditional format background color of a rectable on a report

Status
Not open for further replies.

EdAROC

Programmer
Aug 27, 2002
93
US
Thought Conditional Formatting would be the solution, but I just discovered it only allows 3 conditions. Dang!

Using a report to print job/order information on labels. Idea was to color code the top edge (apprx 1/4" high) and left edge (apprx 1/2" wide) based on the Sales Agent. We have 8 Sales Agents. That's more than 3. :) The plan was to create two text boxes for the Sales Agent (one spans the top edge, one down the left side) and make the background and font color the same, effectively creating a colored area.

Anyone got a technique to create an area (via text box, label, rectangle) with a background color based on a condition?
 
I'm sitting here trying to think outside the box. It's tough when you work inside a cubicle, so, I stepped outside my cubicle. The metaphor worked (I hope) and I got an idea. Help me out - will this work...

I'm thinking of the design being three layers.

The bottom layer is the detail section of the report - I've used the greenbar coding technique to control its color. So, I use the same technique to make the detail section background the desired color, based on the Sales Agent ID.

The next layer is a rectangle box - it's white - and it covers the area of the detail section that would not be colored. (I'm thinking I will have to move this object to the back using the Format menu > Send To Back selection)

The top layer consists of all the data.

In other words I'm masking the colored detail section with a rectangle box - net effect is the same as the original concept. Even a little easier, because I created only one additional object, instead of the two and the greenbar technique is simple (and familiar coding)!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top