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

How to put background on every other entry 1

Status
Not open for further replies.

madsstiig

Technical User
Jun 11, 2008
50
DK
Hi.
I guess there is a simple solution to this - I just never used this function before.
I'm doing a report with quite a lot of entries in the detail section and I wish to separate them from each other.
Hence I need a way to put a background on every other (or every 3rd) line in the detail section.
The data in the detail section will be of the same type just with different patient-IDs for instance.
Could you please help me with this?
Best regards Mads Stiig, Denmark.
 
In format details on the clour tab. Click formula box

try

If remainder(recordnumber,2) <> 0 then silver else white

This should make every othr line silver background.

Use 3 for every third line.

Ian
 
Hi Ian.

Thank you for your reply ... unfortunately I forgot to tell you that the values I use in the report are strings and not numbers.
When I use your suggested formula I get an error that says 'A number or currency amount is required here.'
Do you have a solution for that?
Best regards Mads, Copenhagen - Denmark
 
Recordnumber is a crystal function which just counts the rows. Should not matter what datatypes you are displaying.

Ian
 
Hi Ian.

My bad - of course it works. I just exchanged a value I shouldn't have, hehe...

Best regards Mads, Copenhagen - Denmark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top