Jump to content
Server Maintenance This Week. ×

Sub-summary color question


This topic is 5326 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi All,

I have a layout with a sub-summary part that works just fine when sorted by the breakfield. What I would really like to do is use some sort of conditional formatting to simulate a "alternating background fill". Here's the difference: I don't want to literally alternate every other row. I want to color them in groups. So, the first subsummary part, and all associated body parts are one color. Then, the next group is an alternate color, and so on.

I've searched a lot for this, and haven't found a solution, and I keep running into dead-ends while trying to write a clever conditional formatting statement. Can anyone point me in the right direction?

Link to comment
Share on other sites

Hi everyone.

So, I see that there have been quite a few views to this thread, but no other comments yet. Maybe my question was unclear.

In the photo, the part number is the sub summary breakfield. So, the line in bold is the sub summary part of the layout. Then, the non-bold text lines are the body portion of the layout. Filemaker gives the option to use alternate colors for the body portion, but what I want to do is to color the sub summary heading, and all the associated records the same color, for visual clarity. In the attached photo, for instance, the first part number is 5464104, and there are two invoice entries under that sub summary heading. So, I photo edited them to be all the same color. Can I do anything in Filemaker to make the colors work out like this?

Any help is appreciated. If I'm unclear, please don't hesitate to ask, as I'm not always good at communicating my intent.

Link to comment
Share on other sites

You make it look easy!

I think I see what you've done here:

First, you count the number of records in each sub-summary group: sCountRecords

Then, you divide 1 by that value, essentially making it a fraction of the total: cInvCount

Next, you make a running total that sums up the fractional values...

...doing it like this means that each group will total 1, therefore each sTotalInvCount increments by 1 for each group.

At this point you've essentially numbered the sub-summary groups sequentially: 1, 2, 3...

And, each record within the group will have sTotalInvCount equal to some number fractionally below the group number.

So, In the conditional formatting statement, you use the ceiling function to round each of those fractional numbers up to the nearest whole number.

Finally, you determine if the sub-summary group is even or odd by using the Mod( ) function in the conditional formatting statement.

Brilliant!

Thank you very much for your effort on this. It is certainly more complex that I would have discovered on my own, and it makes my layout much, much better.

Link to comment
Share on other sites

This topic is 5326 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.