Crystal Reports:全局变量running总计不显示在标题中 [英] Crystal Reports: global variable running total not displaying in header
问题描述
使用水晶报表我试图显示一个数据库字段的运行总计所有标签都是的标题。
Using Crystal Reports I'm trying to display the running total of a database field in the header where all the labels are.
我试图通过将运行总计(RTversion)放入具有以下内容的公式字段中来实现:
I've attempted to do this by placing the running total (RTversion) into a formula field with the following:
Shared stringvar CurrentVers;
CurrentVers := {#CurrentVers};
,然后在页眉部分中有以下内容:
and then in the page header section I have the following:
Shared stringvar CurrentVers;
EvaluateAFter({#currentVers});
CurrentVers;
$ b
这不正确吗?
Is this incorrect?
更新:目标是在标签附近的标题中显示最新版本,以显示当前节目的比较。
Update: The goal is to display the latest version in the header near the labels to show what the current verseion is for comparison.
推荐答案
运行总计字段,在我的经验中,只能在页脚部分使用。
Running-Total Fields, in my experience, only work in the footer sections.
您需要创建一个手动运行总计。
You will need to create a manual running total.
在详细信息部分添加一个公式字段,填充全局变量,捕获。类似的东西:
Add a formula field to the Details section that populates a Global variable with whatever you are trying to capture. Something like:
//use WhileReadingRecords if the values can be gathered as the report pulls in values from the database. Otherwise, use WhilePrintingRecords.
WhileReadingRecords;
Global Stringvar CurrentVers;
//logic here to capture what you want
CurrentVers:=...
将另一个公式字段添加到页眉部分。将这两行添加到它:
Add another formula field to the Header section. Add these two lines to it:
WhilePrintingRecords;
Global Stringvar CurrentVers;
这篇关于Crystal Reports:全局变量running总计不显示在标题中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!