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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR9-how to highlight alternating group footer 1 info

Status
Not open for further replies.

JoyCR9

MIS
Jan 13, 2004
70
CA
My report is a summary (details supressed). The summary reported shows in group footer 1.

I would like to have alternating lines highlighted.

Sample report:

name1 info1
name2 info2
name3 info3
name4 info4

For eg: would like name2 & name4 lines hightlighted.

Can I do this? If so, how?

Thanks.
 
Right click on GroupFooter1>Format Section>Click the Color tab, and enter a formula like:
Code:
if groupnumber mod 2 <> 0 then crWhite else crSilver
Or, if you want to specify the RGB values for your color, you can do it like:
Code:
if groupnumber mod 2 <> 0 then crWhite else Color(RedVal, GreenVal, BlueVal)
-dave
 
If you only have one group, you could go to format section->group 1 footer->color->background color->x+2 and enter:

if remainder(groupnumber,2) = 0 then crYellow else crWhite

If you have more than one group, then create a formula {@grp1no} and place it in the group 1 footer:

whileprintingrecords;
numbervar grp1no := grp1no + 1;

Then change the color formula to:

if remainder({@grp1no},2) = 0 then crYellow else crWhite

-LB
 
Thanks guys, but it's not working as expected.

My report has the following lines in group footer 1 (only one group in report):

name1
name2
name3
name4
name5
name6
name7
name8
name9
name10
name11
name12

I plugged both variations of the formula into select expert as outlined and the following lines were highlighted:

name2
name3
name4
name5
name6
name7
name8
name12

Confused!
 
These formulas do not belong in the section expert. If you read each post there are directions about where to go to place the particular formula. You would go to format->section-> select the group 1 footer section->select the color tab->background color->click on the x+2 button which takes you to a formula area.

-LB
 
I tried to follow the post instructions. However in my version of Crystal Reports 9, under FORMAT I don't have a SECTION option. I am assumuing you're referring to the &quot;File, Edit, View, Insert, Format&quot; toolbar when you say format.

The version of Crystal I'm using only lists &quot;Move, align, size&quot; as valid options under FORMAT, and there is no &quot;Section&quot; option under FORMAT (even in the greyed out options).

I apologize for not being as up to snuff on my crystal report knowledge, but something is not the same as what you're looking at.
 
When you have the report open, try right clicking in the gray area to the left of the actual report on the words &quot;GroupFooter #1&quot;. &quot;Format Section&quot; should be one of the options on that shortcut menu.

-dave
 
Tried that guys. My options are (when right clicking on grey area):
group footer #1
Hide
Section Expert
Change Group
Show Short Section Names
Insert Line
Delete Last Line
Arrange Lines
Delete Group
Select All Section Objects
Cancel

BTW I thought Select all section objects would be the key on this one (trial and error)...I was wrong. Argg!

Again, I'm CR9.2.3.787
 
Sorry, using 8.5 here... I think that it might indeed be the Section Expert that'll get you there.

-dave
 
figured it out...sort of. I do need to use Section Expert. However, the formatting gets thrown off if blank records are supressed. When I have no suppression, I have perfect altered highlighting.

A whole new problem. Ah the joys of formulas!
 
If it is a condition that makes you get blank records that you suppress then you can create
a formula and use the same condition there like this:

WhilePrintingRecords;
NumberVar counter;

if Your condition then
counter
else
counter := counter + 1


Now you can use this formula in your color formula:

if remainder({@counter},2) = 0 then crYellow else crWhite

Maybe it can help you.

/Goran
 
I apologize, too. I use 8.0 and didn't realize the toolbars were this different. Goran's suggestion of adding in the suppression formula should allow the formula to work.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top