在其他领域中查找值 [英] Looking Up Values In Other Fields

查看:53
本文介绍了在其他领域中查找值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,


我无法理解以下内容,并确信有一个简单的方法。


在Crystal报表中,我只想创建一个查找类型公式,该公式将显示同一个表中的某个值。


示例:


参考价值如果R?
---- ------- ------
10£100£500
11£200£0
12£300£600 < br> R10£500£0
R12£600£0


所以简单地说,在每一行,'IF R'公式将依次查看ref字段并显示如果存在R ** ref,则值。


我是否必须创建子报告才能实现此目标?


提前谢谢你的回应。


Paul Carruthers

解决方案

如果"R"如果留下({usp_rptReport; 1.Ref},1)=" r"然后{usp_rptReport; 1.Value}否则0


希望这会有所帮助


Good Morning,

Just can not get my head around the following and am sure there is a simple way around this.

In Crystal reports, I just want to create a lookup-type formula which will display a certain value from the same table.

Example:

Ref   Value    IF R?
----   -------    ------
10    £100     £500
11    £200     £0
12    £300     £600
R10  £500     £0
R12  £600     £0

So simply, at each line, the 'IF R' formula would in turn look at the ref fields and display the Value if there is an existance of an R** ref.

Would I have to create a subreport to achive this?

Thank you in advance for your response.

Paul Carruthers

解决方案

If the "R" is always in front, you could use a formula

 

if left({usp_rptReport;1.Ref},1)="r" then {usp_rptReport;1.Value} else 0

hope this helps


这篇关于在其他领域中查找值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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