Joined: 26 Dec 2012
Online Status: Offline
Posts: 24
Topic: Conditional Formatting Not Applying to Next Group Posted: 06 Feb 2014 at 1:29am
Hi..
I'm having a bit of trouble with conditional formatting I've applied to a report. I have a sales report where users can choose to view only active orders or active+cancelled ones in the same report. I've grouped my report by a combined field of cancelled date in numerical CYYMMDD format and cancelled user, and I've formatted the background colour in Section Expert with the following formula:
if {Command.Cancelled Date iS}<>0 then color (206,17,38) else crwhite
{Command.Cancelled Date iS} is numerical and if it's 0 then the orders are active.
For most orders the complete order falls within one group, either all cancelled or all active, and it looks fine. If part of the order is cancelled (all in one day by the same user) and part is active, it also looks fine - the cancelled part shows first with the red background and the active part is white.
My problem is that the formatting isn't being applied to the second cancelled group where there's more than one cancellation date for the order. For example I had an order which I cancelled part of today, and part of yesterday. In Crystal it's correctly separated into 2 groups, but the second group - which also meets the conditional formatting criteria - isn't formatted at all, the background is white.
I've put a screenshot below but I'm not sure if it'll appear in my post, if it does you can see the groups and GH2 has the Conditional Formatting formula above, but it's white in the second repeat of the section.
Also, a box I've put into GH3b which just has a background colour and that also doesn't repeat.
Can anyone help? :) I can't think why it's not working, it's like the conditional formatting has 'Stop If True' set somewhere, like in Excel? Aarg!!
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 06 Feb 2014 at 5:13am
the first thing that I would try is to put the {Command.Cancelled Date iS} on the report, and see if it is displaying the correct value, that should give a clue as to how to proceed.
Joined: 26 Dec 2012
Online Status: Offline
Posts: 24
Posted: 06 Feb 2014 at 5:29am
Hi Lockwelle!
I've added it to my report, into the group header which is refusing to turn red, and it's showing with its correct value (1140205).
Weirdly, I've got a text box in the details section, and this text box has a border which goes red to highlight something else but is usually white so it doesn't show against the background of normal active sales. I added an extra line into the border conditional formatting to make it go red, or if the product was cancelled to go pink so it didn't show as white against the pink cancelled detail background, and in the cancelled record which won't change colour this box is pink, and it has the same conditional format as the section.
It all displays perfectly if everything in the order is cancelled or if there's a cancelled group and an active group, it's just if I have two cancelled groups it's like it applies the format to the first one and then thinks its done.
I could post a screenshot, but I can't work out the file uploader either. ;)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum