Crystal Reports:全局变量运行总计未显示在标题中 [英] Crystal Reports: global variable running total not displaying in header

查看:12
本文介绍了Crystal Reports:全局变量运行总计未显示在标题中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Crystal Reports 我试图在所有标签所在的标题.

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; 

{#CurrentVers} 运行第一大数字.

with {#CurrentVers} running the 1st largest number.

这不正确吗?

更新:目标是在标签附近的标题中显示最新版本,以显示当前版本用于比较.

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 仅适用于页脚部分.

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:全局变量运行总计未显示在标题中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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