JasperReports:默认值而不是'null' [英] JasperReports: default value instead of 'null'

查看:632
本文介绍了JasperReports:默认值而不是'null'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在报表中为字段设置默认值?我在报告中有很多字符串字段,并希望它们在为空时显示0,00。

Is there any way to set a default value to a field in a report? I have a lot of String fields in a report and would like them to display "0,00" when they're null.

推荐答案

假设字段名称为value,请在文本字段表达式中写入:

Supposing the field name is "value", in the "Text Field Expression", write:

($ F {value}!= null)? $ F {值}:0.00

这篇关于JasperReports:默认值而不是'null'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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