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!

Suppress boxes 1

Status
Not open for further replies.

smasaitis

Programmer
Jul 31, 2000
15
US
Using version 8, I want to create an alternating background color in my details section. I though I could put 2 boxes in the details section - one box would have color while the other would be white. On every other row I would suppress the white box and not suppress the colored box. However, there is no option to conditionally suppress a box. Any suggestions?
 
Put a text box covering the whole of the details section - not linked to any field, instead of a normal box. Change the border property to desired and back colour to desired. Use the formula Remainder (RecordNumber, 2)=0 to suppress the text box on every even record, or Remainder (RecordNumber, 2)=1 to suppress on every odd record.

This has the drawback, that if you have lines on the details section, they will go behind the text box and so will not be seen. In this case, put lots of text boxes in the details section, all using the same formula for suppressing the text box.

(I used this methodology (but with different suppression formulae) to produce blocks of five records with and without a background colour).
 
Another way to do this is with Format|Section|Color
using a formula like
If RecordNumber mod 2 = 1 then silver
else white
This will always be a background color - lines etc are on top.

If you always want a group to start with a certain color, then you can use a variable for the instead of the record counter, and reset it with every group, and increment it with every record.

While some colors are easy to read on the screen, printing in black and white can seriously obscur the text. If your reports need to be printed, experiment first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top