开发者

bigdecimal as parameter

开发者 https://www.devze.com 2023-02-15 21:41 出处:网络
I\'ve got a problem regarding ireport again. How can I pass parameter 开发者_开发百科from jsp page to ireport? my field in ireport is bigdecimal. There is no bigdecimal datatype in jsp, right? I try

I've got a problem regarding ireport again.

How can I pass parameter 开发者_开发百科from jsp page to ireport? my field in ireport is bigdecimal. There is no bigdecimal datatype in jsp, right? I try to pass string and int value, and it shows an error.


As JSP has access to everything in Java, it does have access to BigDecimal.

To convert a String to BigDecimal simply use this constructor.


Either you can use:

<jsp:setProperty name="fieldname" property="propname" 
                 value="<%= new BigDecimal(amount)%>" />
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号