2

我在 WPF 中使用 SAP 水晶报表,我想要格式化(粗体,颜色)每个组的细节部分的最后记录。

这可能吗,请帮忙。

在此处输入图像描述

4

2 回答 2

1

创建一个计数器。如果您有 Crystal 7.0 或更高版本,请使用 Running Total 功能。如果没有,则使用公式创建一个运行总计。去做一个格式部分..在细节行转到颜色选项卡。
单击背景复选框。
使用“背景颜色”旁边的框进入公式部分
输入:

If Remainder ("Counter", 5) = 0 then Yellow else White

或者您可以在这种情况下说 NoColor "Counter" 代替您用于计数器的公式。

行数 5 可以替换为 .

计数({Table.Value})

于 2013-08-07T11:33:11.120 回答
1

在格式化公式中使用此代码段。

onlastrecord //if last record in report then next() will not work
or next({table.group_field}) <> {table.group_field} //the next record starts a new group

例如,如果您想将每个组中最后一个详细信息部分的背景颜色更改为黄色,那么您将使用格式公式:

if (onlastrecord or next({table.group_field}) <> {table.group_field})
  then cryellow else crnocolor
于 2013-08-07T14:11:52.853 回答