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

Background color for detail section

Status
Not open for further replies.

Barrow66

Programmer
Sep 3, 2002
37
US
Hi All,



I have a report in crystal 8.5 that I want only certain columns in the detail section to be shaded. I can shade all columns. For example, there are six columns on the report and I only want to shade the last four columns but not the first two columns.

Any IDEAS

Thanks inAdvance.
 
Insert a box, fill it with a colour, and size the height of the box so that it overlaps your lower detail boundary by just a little. Place the box over one of your last four fields.

The appearance is that you get a full column of colour broken by Group or Page Footers - whatever comes first.

Naith
 
Hi Naith,

I also have in the detail section to format the background color using the formula
IF({TableName.FieldName} <> NEXT({TableName.FieldName }) ) THEN
crWhite
Else
crSilver

If i use a box all the four columns get gray out.
 
As long as the tablename.fielname not equal to next tablename.fieldname then White else gray. Is there a way for the box to show white or gray based on this condition in the datail section.
 
You can apply the same condition to the box. It probably makes more sense to apply it to the box rather than the section, because the section will apply the colour change to all 6 columns.

Inserting a Crystal box, even when filled in, shouldn't overwrite your data. You are creating a box in Crystal and using this, rather than using a bitmap rectangle from a bmp or jpg file, aren't you?

Naith
 
Hi Naith,
Yes I am using the box in cr8.5
Sorry for being a pain but I inserted the box control from crystal 8.5 into the detail section but not formula(x+2)appeared. Is there another way to insert a box in crystal 8.5.
 
No problem, Barrow. The way I mean is through the Insert Menu: Box.

When your cursor turns into a pencil, drag the cursor to the size you expect your box to be. Right click the edges of the box to format it, and then drag the box over your field. Remember to drag the bottom of the box slightly over the bottom of the detail section.

Naith
 
Hi Naith,

I cannot find in the Box format editor conditional formatting. Is there a way of finding this out so that I can place my formula to color last four columns . The formula is :

IF({TableName.Fieldname} <> NEXT({TableName.Fieldname }) ) THEN
crwhite
else
crsilver

ONCE AGAIN THANKS INADVANCE.
 
Sorry, I have misunderstood you. Don't you want your fields to not display if they don't match the criteria, rather than toggle the box colour?

To do this, you place:

({TableName.Fieldname} <> NEXT({TableName.Fieldname }))

in the Suppress conditional formula.

As you rightly point out, you cannot apply a condition to a box.

Naith
 
Hi Naith
I do want all fields displayed but only the last four columns must be highlighted as noted above based on the formula.

Thanks.
 
Hi Naith,

I placed one box to cover the first two column fields on the report and another to cover the rest of the report after the sixth column. The color of the boxes set to white and only the four column fields I needed colored were colored and the rest was white-out.
Thanks for the insight.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top