如何在pentaho报表设计器的value字段中添加$符号 [英] How to add $ symbol to the value field in the pentaho report designer

查看:167
本文介绍了如何在pentaho报表设计器的value字段中添加$符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个将字符串作为数据类型的字段,该字段的值类似于$ 20000和N/A.我使用字符串作为数据类型,我想显示类似$ 20000和N/A的数据,但我将其显示为20000和N/A.我如何以$ 20000和N/A的形式获取数据.我正在使用该表达式:

I have field which is taking string as datatype and that field has values like $20000 and N/A. I am using the string as datatype I want to show data like this $20000 and N/A, but I am getting it as a 20000 and N/A. How can I get data as $20000 and N/A. I am using that expression:

=IF([annual_roll_amount]=="N/A";"N/A";"$" &[annual_roll_amount])

此表达式有什么问题,可以在属性下的value字段中使用它吗?

What is wrong in this expression and Is it ok to use that in value field under attributes??

推荐答案

您的表达式错误. 您必须使用CONCATENATION.

Your expression is wrong. you have to use CONCATENATION.

=IF([annual_roll_amount]=="N/A";"N/A";CONCATENATE("$";[annual_roll_amount]))

这篇关于如何在pentaho报表设计器的value字段中添加$符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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