Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page Contents

Implications



Page Contents



Objective

This page contains snippets and blocks of code that are useful for editing iReport XML templates.

...

  • You have full admin access to ParadigmEMS
  • You are a competent user of ParadigmEMS
  • You have already downloaded Jasper iReport v3.0, refer to Installing Jasper iReport

...


1. Never change the report file name
2. Only full admin users can edit reports
3. Compile before uploading a changed document
4. Make sure all elements are NOT bordered in red as that suggests the element is not positioned correctly
5. Do not move elements or fields out of their default bands


Java Conditions

Code Block
languagejava
themeMidnight
linenumberstrue
new Boolean($P{letterNumber}.equalsIgnoreCase("1st")||$P{letterNumber}.equalsIgnoreCase("2nd"))
new Boolean ( ! $F{provider_code}.equals( "Morling" ) )
new Boolean( $V{amountDueTotal}.compareTo( new Double (0.00) ) > 0 )
new Boolean ( $V{PAGE_NUMBER}.toString() == "1" )
new Boolean ($F{chessn}!=null && !$P{unitEnrolmentEndDate}.equals(""))
new Boolean ( $F{course_level}.equals("VET"))
new Boolean ( $F{enrolment_status_id}.equals( "ENROLMENT_COMPLETED" ) )

...

Code Block
languagejava
themeMidnight
linenumberstrue
+"•"

From https://stackoverflow.com/questions/11254009/create-an-external-url-hyperlink-with-jasperreports:The hyperlinkTarget attribute behaves in the same way as the target attribute in HTML. Note that only textFields, images, and charts can be hyperlinked in this way.

To make a textField a hyperlink to an external URL, you need to add the attribute hyperlinkType="Reference" to the element, and add a <hyperlinkReferenceExpression> tag within it. The reference expression is where you put the URL. For example:

Code Block
languagejava
themeMidnight
linenumberstrue
<textField hyperlinkType="Reference" hyperlinkTarget="Blank">
    <reportElement x="5" y="5" width="200" height="15"/>
    <textElement/>
    <textFieldExpression class="java.lang.String"><![CDATA["Click Here!"]]></textFieldExpression>
    <hyperlinkReferenceExpression><![CDATA["http://www.google.com"]]></hyperlinkReferenceExpression>
</textField>

...


Escaping

Escaping double quote

...