如果列为空,如何显示另一个值? [英] How to display another value if the column is null?

查看:129
本文介绍了如果列为空,如何显示另一个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Birt报道的新手. 我的要求是,当列的实际值为空时,我想显示"N/A".

I am new to Birt reporting. My requirement is that, I want to display "N/A" when the actual value of the column is null.

例如:select vendor from account where id=1;

o/p:NULL

因此,我想代替报表中的空值将这些字段显示为N/A.该怎么做?

so, in place of null values in the report I want to display those fields as N/A. How to do this?

推荐答案

您可以通过以下操作在要显示值的数据单元中添加值映射:

You can add a Value-Mapping in the Data-Cell where you want to display your value by the following:

在要显示值的数据单元中单击.转到属性编辑器",然后选择选项卡地图".单击添加...",从下拉列表中选择您的值,选择等于"进行比较,输入空"作为要比较的值.输入"N/A"作为显示的替代值,然后单击确定".

Click in the Data-Cell where you want to display the value. Go to the "Property Editor" and select the Tab "Map". Click an "Add..." Select your value from the dropdown, select "Equal to" for the comparison, enter "null" for the value to compare to. Enter "N/A" for the alternative Value to display and click OK.

这篇关于如果列为空,如何显示另一个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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