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!

Conditional Formatting based on line number 1

Status
Not open for further replies.

Dirtless

Programmer
Apr 16, 2010
29
CA
Morning;

I want to highlight every second line in a report. I thought I had it when I conditionally formatted based on record number, but that isn't working when the LINE in the report represents data from multiple records. (That is, several records are summarized to a single line in the report.) RecordNumber doesn't work.

I've been searching for the appropriate function but without luck, so I thought I'd ask here. You folks often save me a lot of time.

Thanks in advance for your consideration.

D

 
I assume you have a group on your report, if so you will need to use a running total to count the number of groups

Summary = Count of Group field
Evaluate = on change of group (group you want to count)
Reset = never

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
If you are trying to alternate color including detail and group sections, then create a formula like this:

whileprintingrecords;
numbervar cnt := cnt + 1;

Place this in each visible report section that you want to alternate color, e.g., GH1, details, GF1. Then in the section expert->select each of these same sections one at a time->color tab->background->x+2 and enter:

whileprintingrecords;
numbervar cnt;
if remainder(cnt,2) = 0 then
cryellow else
crnocolor

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top