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!

Need tips on coding CR 8.5 report. 1

Status
Not open for further replies.

TSCP74729404

Programmer
Feb 14, 2005
4
US
I want to print the details section of a report with decreasing shades of a color for each individual record until the last record reaches white, ie topmost record = dark blue, middle record = lite blue, last record white. I want to do it using variables.
 
The gradation you seek is rgb(0,0,255) to rgb(255,255,255)

So you'll use the number of rows in the report to increment the difference.

Report header formula:
numbervar IncrementRowColor:=255/count({table.field})
numbervar CurrentColor:= 0;

Details level formula for the color:
numbervar CurrentColor;
numbervar IncrementRowColor;
Currentcolor:=Currentcolor+IncrementRowColor
rgb(Currentcolor,Currentcolor,255)

Should be close enough.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top