condition for text control based on results of group footer calculation
Posted: Thu Nov 03, 2022 1:13 pm
Hello,
I have a report where I'd like to set the condition of a text control based on the results of a calculation in the groupfooterband just below the text control.
The text control outlined in red should have its text color changed to red if its value is greater than the value of the text box outlined in blue.
The expression in the text control outlined in red is {((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge)}
The expression in the text control outlined in blue is {Avg(((FacilityAllAssets.Asset_WOCosts.CostPerAsset) + (FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge))}
I've tried using the following expression in the Highlight Condition of the text control outlined in red.
((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge) >
Totals.Avg(GroupFooterBand1,((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge))
The above expression results in all text being colored red because Totals.Avg(GroupFooterBand1,((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge)) seems to always returns 0. I must be missing something simple in the expression.
I have tried running the report in both Single Pass and Double Pass mode and get the same results for both.
Unfortunately, I am unable to provide a report file or sample data for this question.
I hope you can provide some guidance on an expression I can use.
Thank you,
Carl
I have a report where I'd like to set the condition of a text control based on the results of a calculation in the groupfooterband just below the text control.
The text control outlined in red should have its text color changed to red if its value is greater than the value of the text box outlined in blue.
The expression in the text control outlined in red is {((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge)}
The expression in the text control outlined in blue is {Avg(((FacilityAllAssets.Asset_WOCosts.CostPerAsset) + (FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge))}
I've tried using the following expression in the Highlight Condition of the text control outlined in red.
((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge) >
Totals.Avg(GroupFooterBand1,((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge))
The above expression results in all text being colored red because Totals.Avg(GroupFooterBand1,((FacilityAllAssets.Asset_WOCosts.CostPerAsset)+(FacilityAllAssets.CurrentYearDepreciation) + (decimal)FacilityAllAssets.faa_fsum.FillupTotal)/(FacilityAllAssets.CurrentAge)) seems to always returns 0. I must be missing something simple in the expression.
I have tried running the report in both Single Pass and Double Pass mode and get the same results for both.
Unfortunately, I am unable to provide a report file or sample data for this question.
I hope you can provide some guidance on an expression I can use.
Thank you,
Carl