Recently been migrating our old reports from Crystal to Stimulsoft recently and so far it's going well.
However, there is one thing that has thrown me which is to do with resolving expressions, specifically Totals functions.
For instance, take the following TextBox with the expression:
Code: Select all
{First(First(AgeBreaks.AgeBreak))}
However, if I create a variable with the same formula (minus the curly braces), and then use that in a TextBox, it works fine.
I first noticed this when trying to use a SumIf in conjunction with a First function in a TextBox expression:
Code: Select all
{Switch(
DataSource1.AgeByDueDate == 1,
SumIf(GroupHeaderBand1, DataSource1.OpenBillAmount,
DataSource1.adItemAgeByDueDate <= (int)DataSource1[First(AgeBreaks.AgeBreak)]),
DataSource1.AgeByDueDate != 1,
SumIf(GroupHeaderBand1, DataSource1.OpenBillAmount,
DataSource1.adItemAgeByItemDate <= (int)DataSource1[First(AgeBreaks.AgeBreak)])
)
}
I've attached a sample report which shows this effect. If you try to preview, it will fail. If you delete the first TextBox with First(First(...)), it will render just fine, despite using a Variable with the same expression.
Is there a reason for this behavior? Should I be using a different function?
Kind Regards