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!

Highlight alternate rows in crosstab??

Status
Not open for further replies.

hockeypuck

Programmer
Aug 7, 2002
6
US
I am generating rows of data which are grouped by Category, Vendor Item, Item Desc, and Report Criteria. All i want to do is to alternate the color of rows of data for easier reading? Can anyone help me or send me to the correct help location?

Thanks
hockeypuck
 
From Crystal Reports Help:

Alternating background colors for rows
Another typical use of multiple sections is to vary the background color in alternating lines for the Details section of a report in order to improve readability (a greenbar-paper effect).

To alternate background colors for rows
Use the Section Expert to insert a second Details section. You should now have Details A and Details B sections. See Working with sections.
While in the Section Expert, highlight Details A in the Sections list, click the Color tab, and set the background color to White.
Click the Common tab, click the Conditional Formula button to the right of Suppress (No Drill-Down), and type the following formula in the Format Formula Editor when it appears:
Remainder (RecordNumber,2)<>0

«This formula divides the record number by 2 and if the remainder is something other than zero (which will happen for every odd numbered record), it tells the program to suppress the section.»

Click Save and Close.
Now select Details B and set the background color to Green.
Use the technique from Step 3 to set Suppress conditionally for this section using the following formula:
Remainder(RecordNumber,2) = 0

«This formula divides the record number by 2 and if the remainder is equal to zero, it tells the program to suppress the section.»

Create the report and make certain that the information and layout of each of the Details sections is identical. In other words, whatever objects you place in Details A should be placed into Details B as well.
Now when you run the report, the program will print every even numbered line with a white background and every odd numbered line with a green background.

 
Thanks ElspethA for that answer. The problem is that the report is created using a crosstab and is inserted into a Group Footer, so I am not using a Detail section.

Any other suggestions???
 
I don't believe there is a way to do what your asking. You can give a row a background color, but you can't base it on a formula to get alternating colors.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top