Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show rows in different colors
Message
 
To
05/09/2008 08:55:58
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345102
Message ID:
01345154
Views:
13
This message has been marked as the solution to the initial question of the thread.
>What's that little trick using the recno() and MOD (I think) to do something to every other row in a report? How would I apply that to changing the colors of the background box? Would I need to have two boxes and use the Print When for each?

I depends on your data ... some others have suggested RECNO() as the expression, but that won't work if you're using an index. If you're using an index, use a report variable. Define rnCount, doesn't matter what the expression is, set the calculate option to Count, reset it at the end of the page. Then use can use MOD(rnCount,2)=0 and MOD(rnCount,2)<>0 in the Print When for the two different colored background boxes.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Reply
Map
View

Click here to load this message in the networking platform