crystal 报告根据日期获取当前金额

crystal report get current amount based on the date

我在以下设置中有一个 Crystal 报告。例如

GroupHeader

第 1 组名称 |当前值 | SumOfAmount(对于每个组名)

GroupA                    0.00               45.00
GroupB                    0.00               79.00
GroupC                    0.00               150.00

detailSection1 为空。 在 GroupA 中,如果我在 detailsection1 上显示它们,则有 3 条记录。例如

A组

 AAA              5.00             2018/01/30
 ABC              20.00            2018/01/30
 BCC              20.00            2018/01/29

现在我想根据输入的日期(?EndDate 参数字段)获取当前值的总和:在本例中为 EndDate = 2018/01/30 并将其显示在 GroupHeader 上。例如

组名 |当前值 |总和

A 组 | 25.00 | 45.00

使用以下公式求和:

If {Table.DateColumn}={?EndDate} Then
    {Table.AmountColumn}
Else
    0