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!

Color coding in Reports

Status
Not open for further replies.

ashishnanda

Programmer
Jan 30, 2003
2
US
I have a simple report which usesa dataset from Oracle database. I want to colorise the data in my report on some basis but i do not know how to use the colors for the dataset.
Eg
Say if my report has
components price qty
intel chipset 200 20 Color Red
motherboard 100 10 Color Blue
speakers 90 50 etc etc.....
...
and so on
 
--right click on the field you want to color
--select Format Field
--go to the Font tab
--click formula button next to the Color
Here you may type condition for coloring.
Example:

If {price}>200 then red else blue

=========================

If you need to color the background:
-- in the design mode right-lock on the section you want to color
-- select Format section
-- go to the Color tab
-- click formula button next to Background
-- enter the formula

 
You can change the font color by setting up some conditional logic.
Right click a field that you want to color and choose Font.
Select the X+2 button next to Color.
Enter in your logic in the editor like this:
Code:
select {components} 
    case "intel chipset" : crRed
    case "motherboard"   : crBlue
    case "speakers"      : crGreen
    default : crBlack
You will need to repeat this for every element that you want to change the color for. Also, you didn't say what the condition was for determining the color so the above is just an example.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top