Link to home
Start Free TrialLog in
Avatar of rvfowler2
rvfowler2Flag for United States of America

asked on

FM - How to color every other row in a Summary Report with Totals Only

I can change the color of the background for every other row in a complete list or in a summary report with a Body easily enough, but how would you change the row background color for a summary report with a Trailing Summary only and reflects a found set, not the entire set of records?  

Since it is a found set, would I have to use a script to number the records and then do a conditonal formatting formula on a field that is behind the entire row of fields in the Trailing Summary?  Thanks.
Avatar of Will Loving
Will Loving
Flag of United States of America image

Conditional formatting is probably simplest. You just use a simple calculation that checks to see if the record number is odd:

mod( Get ( RecordNumber ) ; 2 ) = 1
Just to be clear, the Mod function returns the remainder after number is divided by divisor.

   Mod( number ; divisor )

In this case, the divisor is simply 2, so if the record number is even the result is zero, if odd, then it's 1.
Avatar of rvfowler2

ASKER

Great idea, unfortumately, the report is not sorted in the same order as record numbers.  Since we only add properties a few times a year, I'm going to write a script that renumbers them in order of PropCode in a field called "BackgroundColor".
Record number is independent of any sort order. It's simply the number of the record in current found set regardless of how it's sorted.
Didn't see the obvious.  Didn't work because it is a found set and doesn't include all the prop records.  Going to add a script that numbers fields off the the side of the report.
The above didn't work either because I'm doing totals, and how do I enter a new rec# for each total row?
Randy - can you clarify a bit more? It sound like you've got a report that has sub-summaries and you're saying the alternate background is somehow not working because of the sub-summaries?
Yes, should have used the more precise term, Subsummaries.  It is a report without a Body; so it only shows totals/rows for each Prop Code and thus of course it is sorted by PropCode.  My problem is that FM does not allow a setting for alternate background color for the Subsummary Part, only the Body Part.
ASKER CERTIFIED SOLUTION
Avatar of Will Loving
Will Loving
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will, almost worked, but I found that the totals did not seem to reference the first record consistently, thus I didn't have consistent coloring of every other record.  However, an easy modification is to number every record in the found set as you see in the script below, AND IT WORKED!  Thanks so much.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Need to number every row and probably less room for error that way anyway.