Condition expression for text box in group header

Stimulsoft Reports.WEB discussion
Post Reply
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Condition expression for text box in group header

Post by cbrydon »

Hello,

I am having some trouble figuring out the proper expression for setting a condition on a group of text controls in a group header.
The report lists for each employee the number of hours they work on a given day for a month. If an employee works more than
8 hours, the text should appear blue. If they work less than 8 hours, the text should appear red. If they work 8 hours exactly,
then the text should remain black.

A copy of the report is attached along with some sample data for days 24 to 28.

There are two pages in the report showing the same information, but using two different condition expressions that I've tried.

Page 1 uses the following type of expression...
Day(ResourceUsage.RecordDate) == 24 && Sum(ResourceUsage.Hours) > 8

Page 2 uses the following type of expression...
SumIf(ResourceUsage.Hours,Day(ResourceUsage.RecordDate) == 24) > 8

The final report will only have 1 page. I've included two pages in the sample report just to demonstrate the expressions I've tried.

For this report, I am using Stimulsoft 2019.4.2 from 13 November 2019 ASP.NET, JS.

Hope you can help.

Thanks,
Carl
Attachments
ForStimulsoft.zip
(350.08 KiB) Downloaded 213 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Condition expression for text box in group header

Post by HighAley »

Hello,

Please, use the next expression in the Conditions:

Code: Select all

Totals.Sum(GroupHeaderBand2,Day(ResourceUsage.RecordDate) == 24?ResourceUsage.Hours:0) > 8
Thank you.
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Re: Condition expression for text box in group header

Post by cbrydon »

That worked great - Thank You!
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: Condition expression for text box in group header

Post by Andrew »

Hello, Okay great! You are welcome!
Post Reply