Crystal报表中MultiColumn的页面总计 [英] Page Total for MultiColumn in Crystal Report

查看:183
本文介绍了Crystal报表中MultiColumn的页面总计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多列水晶报告,现在我想显示运行总和的两个重量&金额列。实际报告的图片为

I have a multicolumn crystal reports, Now i want to display running total for both weight & amount column's. The image of actual report is this

但是水晶报表设计器不显示其他列,所以应该在哪一列中计算值。

But crystal report designer does not show other columns, so on which column should i compute the value.

推荐答案

遵循以下方法:

使用以下文本创建名为RunningTotal的公式:

Create a formula named "RunningTotal" with the following text:

//{@RunningTotal}
WhilePrintingRecords;
Numbervar RunningTotal_Amount;
Numbervar RunningTotal_Weight

将此公式添加到报表标题部分)

Add this formula to the Report Header section (suppress it after you finish testing)

使用以下文本创建另一个名为PageTotal.Reset的公式:

Create another formula named "PageTotal.Reset" with the following text:

//{@PageTotal.Reset}
WhilePrintingRecords;
Numbervar PageTotal_Amount:=0;
Numbervar PageTotal_Weight:=0;

将此公式添加到页眉部分(在完成测试后将其取消)

Add this formula to the Page Header section (suppress it after you finish testing)

使用以下文本创建另一个名为PageTotal.Increment的公式:

Create another formula named "PageTotal.Increment" with the following text:

//{@PageTotal.Increment}
WhilePrintingRecords;
Numbervar PageTotal_Amount:=PageTotal_Amount+{TABLE.AMOUNT_FIELD};
Numbervar PageTotal_Weight:=PageTotal_Weight+{TABLE.WEIGHT_FIELD};

将此公式添加到详细信息部分(完成测试后将其取消)

Add this formula to the Details section (suppress it after you finish testing)

使用以下文本创建名为PageTotal.Weight.Amount的公式:

Create a formula named "PageTotal.Weight.Amount" with the following text:

//{@PageTotal.Amount.Display}
WhilePrintingRecords;
Numbervar PageTotal_Amount;

将此公式添加到页脚部分。

Add this formula to the Page Footer section. DON'T suppress it, as this will display the page's total.

使用以下文本创建名为PageTotal.Weight.Display的公式:

Create a formula named "PageTotal.Weight.Display" with the following text:

//{@PageTotal.Weight.Display}
WhilePrintingRecords;
Numbervar PageTotal_Weight;

将此公式添加到页脚部分。不要禁止它。

Add this formula to the Page Footer section. DON'T suppress it.

使用以下文本创建名为RunningTotal.Amount.Display的公式:

Create a formula named "RunningTotal.Amount.Display" with the following text:

//{@RunningTotal.Amount.Display}
whileprintingrecords;
Numbervar RunningTotal_Amount;
RunningTotal_Amount:=RunningTotal_Amount+{@PageTotal.Amount.Display};

将此公式添加到页脚部分。不要禁止它。

Add this formula to the Page Footer section. DON'T suppress it.

使用以下文本创建名为RunningTotal.Weight.Display的公式:

Create a formula named "RunningTotal.Weight.Display" with the following text:

//{@RunningTotal.Weight.Display}
whileprintingrecords;
Numbervar RunningTotal_Weight;
RunningTotal_Weight:=RunningTotal_Weight+{@PageTotal.Weight.Display};

将此公式添加到页脚部分。不要禁止它。

Add this formula to the Page Footer section. DON'T suppress it.

您可能需要稍微调整这种方法来处理多列显示。

You may need to adapt this approach a little to handle the multi-column display.

这篇关于Crystal报表中MultiColumn的页面总计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆