iReport的變數相除

FAQ Jasper/iReport – Club d’entraide des développeurs francophones

<code id="contenuCoded0e843" class="contenuCode">除法, 四捨五入<br />$F<code class="java_operator">{</code>COUT_PRODUIT<code class="java_operator">}</code>.<code class="java_function">divide</code>( $V<code class="java_operator">{</code>TOTAL_COUT<code class="java_operator">}</code>, BigDecimal.ROUND_DOWN )<br /></code></pre><pre><code id="contenuCoded0e864" class="contenuCode">$F<code class="java_operator">{</code>COUT_PRODUIT<code class="java_operator">}</code><code class="java_operator">/</code>$V<code class="java_operator">{</code>TOTAL_COUT<code class="java_operator">}<br /></code></code><code id="contenuCoded0e1389" class="contenuCode"><code class="java_literal1">"</code><code class="java_literal1">20</code><code class="java_literal1">"</code> <code class="java_operator">+</code> Integer.<code class="java_function">toString</code>(<code class="java_keyword1">new</code> <code class="java_function">Date</code>().<code class="java_function">getYear</code>() <code class="java_operator">-</code> <code class="java_digit">1</code>).<code class="java_function">substring</code>( <code class="java_digit">1</code>, <code class="java_digit">3</code> ) <code class="java_operator">+</code> <code class="java_literal1">"</code><code class="java_literal1">-</code><code class="java_literal1">"</code> <code class="java_operator">+</code> <code class="java_literal1">"</code><code class="java_literal1">20</code><code class="java_literal1">"</code> <code class="java_operator">+</code> Integer.<code class="java_function">toString</code>(<code class="java_keyword1">new</code> <code class="java_function">Date</code>().<code class="java_function">getYear</code>()).<code class="java_function">substring</code>( <code class="java_digit">1</code>, <code class="java_digit">3</code> )<br /><br /></code><br />

iReport讀入中文的報表設計時

JasperForge: iReport: iReport 的討論區

iReport: 3.1.2 The same problem was solved adding parameter -Dfile.encoding=UTF-8 to the VM.

To add parameter edit etc/ireport.conf, modify ‘default_options’ parameter it should look like this:

   default_options="-J-Dfile.encoding=UTF-8 -J-Xms24m -J-Xmx64m"

iReport發生以上的錯誤訊息時, 要調整 conf 內的內容com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence.