<?xml version="1.0"?>
<rss version="2.0"><channel><title>Knowledge Base: Best Practices</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/page/2/?d=6</link><description>Knowledge Base: Best Practices</description><language>en</language><item><title>JasperServer tried to contact 104.96.227.25</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/jasperserver-tried-contact-1049622725/</link><description><![CDATA[<p>
	<span style="color:#c0392b;">Please see the current latest Administration Guide for  details on configuring the Heartbeat.</span>
</p>
<iframe allowfullscreen="" class="ipsEmbed_finishedLoading" data-embedcontent="" data-embedid="embed7086380174" style="height:176px;max-width:502px;" src="https://community.jaspersoft.com/documentation/jasperreports-server/tibco-jasperreports-server-administration-guide/v1000/jasperreports-server-admin-guide-_-configuration-_-configuring_the_heartbeat/?do=embed#top" loading="lazy"></iframe>

<h3>
	Enable/Disable the heartbeat
</h3>

<p>
	With a newly installed <a href="https://community.jaspersoft.com/node/200605" rel="">JasperReports Server</a>, you will be asked whether to opt-in to the JasperReports Server Heartbeat or not.<br>
	To opt-in, click <strong>OK</strong>. To opt-out, click the check box to remove the check and click <strong>OK</strong>.<br>
	You can also manually enable or disable the heartbeat by modifying the <strong>jasperserver-pro/WEB-INF/applicationContext-logging.xml</strong> file. To disable, set the enabled property to false like below:
</p>

<pre class="ipsCode prettyprint lang-auto prettyprinted">&lt;property name="enabled" value="false" /&gt;</pre>

<div>
	 
</div>

<p>
	For additional information on <em><a href="https://community.jaspersoft.com/sites/all/libraries/pdf.js/web/viewer.html?file=/sites/default/files/docs/jasperreports-server-admin-guide.pdf#G3.1063776" rel="">enabling and disabling the heartbeat</a> </em>component refer to the <a href="https://community.jaspersoft.com/documentation/jasperreports-server-administration-guide-v470" rel=""><em>JasperReports Server Administrator Guide</em></a>.
</p>

<p>
	For more information on the<a href="http://www.jaspersoft.com/heartbeat" rel="external nofollow"> JasperReports Server Heartbeat Program click here</a>.
</p>
]]></description><guid isPermaLink="false">4109</guid><pubDate>Tue, 05 Oct 2021 22:28:47 +0000</pubDate></item><item><title>Removing 'ticks' from Fusion Angular Gauge Chart when used as ArcGauge</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/removing-ticks-fusion-angular-gauge-chart-when-used-arcgauge/</link><description><![CDATA[<h3>
	Problem: 
</h3>

<p>
	In order to remove 'ticks' or 'lines' from the ArcGuage as shown in the below image:
</p>

<p>
	 
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="91404" href="//media.invisioncic.com/i328763/monthly_2022_03/image_119.png.8f183d277e7c2cfae13cce35382bb5d7.png" rel=""><img alt="image_119.png.8f183d277e7c2cfae13cce35382bb5d7.png" class="ipsImage ipsImage_thumbnailed" data-fileid="91404" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2022_03/image_119.png.8f183d277e7c2cfae13cce35382bb5d7.png" loading="lazy"></a>
</p>

<p>
	 
</p>

<h3>
	Solution:
</h3>

<p>
	Add the following property to the &lt;fw:dial&gt; element in the jrxml.
</p>

<pre class="ipsCode prettyprint lang-auto prettyprinted">&lt;fw:dialProperty name="radius"&gt;
        &lt;fw:propertyExpression&gt;&lt;![CDATA[0]]&gt;&lt;/fw:propertyExpression&gt;
  &lt;/fw:dialProperty&gt;</pre>

<div>
	 
</div>

<p>
	In JasperServer Studio you can find it under Widget Pro Properties/Widget Data/Angular Dials/Modify/Radius. It shows 0 by default, but it's not actually set in the JRXML. You can try to change the value up and down to force JSS to set the property. <br>
	<br>
	<br>
	Note : This is a specific use case and specific solution that you can try to meet the exact requirement.
</p>
]]></description><guid isPermaLink="false">4258</guid><pubDate>Tue, 08 Mar 2022 12:17:50 +0000</pubDate></item><item><title>option for Stretch with overflow</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/option-stretch-overflow/</link><description><![CDATA[
<p><img src="https://media.invisioncic.com/i328763/monthly_2023_11/streatchwithoverflow.png.d3ae593935af15680611053cd746186d.png" /></p>
<p>
	In our old jasper studio versions there was a option "Stretch with overflow". This option was used  to allow the text field to stretch downwards in order to display all its text when it doesn't fit in the defined text field height. This property will work irrespective of cell height that you provide.
</p>

<p>
	This option is now removed in our newer versions and replaced with 
</p>

<ul>
	<li>
		Stretch Height (which is the same as the old stretch with overflow)
	</li>
</ul>

<p>
	Stretch with overflow is now part of the text adjust options:
</p>

<ul>
	<li>
		Cut Text (which is the default)
	</li>
	<li>
		Stretch Height (which is the same as the old stretch with overflow)
	</li>
	<li>
		Scale Font (which instead of stretching the element, JasperReports will try to decrease the font size until the full text fit the textfield size).
	</li>
</ul>

<p>
	Please find attached screenshot. 
</p>
]]></description><guid isPermaLink="false">4611</guid><pubDate>Thu, 09 Nov 2023 15:53:29 +0000</pubDate></item><item><title>How to remove added extra loggers starting with com.jaspersoft.</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-remove-added-extra-loggers-starting-comjaspersoft/</link><description><![CDATA[<h2>
	Issue Description:
</h2>

<p>
	Usually customer add additional loggers explicitly under the black space present in Log Settings tab to analyze and debug the issues specific to component which are not already present in Log Settings. But going further when issue get resolves they require to remove this added extra loggers to not compromise on performance and to avoid extra loggers to get captured in log files.
</p>

<p>
	 
</p>

<p>
	But , for some of the loggers added which has prefix  with "com.jaspersoft....". then this loggers are not present with the same name in Restore default while deleting this loggers.
</p>

<p>
	For example , When you added loggers as below .
</p>

<p>
	 
</p>

<pre class="ipsCode prettyprint lang-auto prettyprinted">com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob
com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobFileSavingImpl
com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobMailNotificationImpl</pre>

<div>
	 
</div>

<h2>
	 
</h2>

<p>
	Resolution:
</p>

<p>
	To remove this added extra loggers under the log settings tab ,  You will need to navigate to
</p>

<p>
	<strong>Manage &gt;&gt; Server Settings &gt;&gt; Restore default  </strong>and search for below loggers and delete  and click on the save button present on bottom left corner.
</p>

<p>
	 
</p>

<p>
	 
</p>

<pre class="ipsCode prettyprint lang-auto prettyprinted">log4j.com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob
log4j.com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobFileSavingImpl
log4j.com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobMailNotificationImpl</pre>

<div>
	 
</div>

<p>
	 
</p>

<p>
	Here, log4j is getting appended as the prefix for some of the extra loggers added. There is no need to restart the Jasperserver server as this changes get applied on fly.
</p>

<p>
	Hope this helps. Have a GREAT day ahead!
</p>

<p>
	Thank you
</p>
]]></description><guid isPermaLink="false">4552</guid><pubDate>Wed, 12 Jul 2023 07:58:11 +0000</pubDate></item><item><title>Resolving SSLHandshakeException in Jaspersoft Studio After Certificate Renewal</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/cannot-connect-jaspersoft-studio-jasperserver-after-certificate-update/</link><description><![CDATA[<p>
	<strong>Problem Description:</strong>
</p>

<p>
	Users may encounter a connection failure when attempting to link <b>Jaspersoft Studio</b> to <b>JasperReports Server</b> following an SSL certificate update. Despite the certificate being renewed, the application returns a <code>javax.net.ssl.SSLHandshakeException</code>.
</p>

<h3>
	Error Trace
</h3>

<p>
	The typical stack trace observed is:
</p>

<blockquote>
	<p>
		<code>java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target</code>
	</p>
</blockquote>

<p>
	This error indicates that the Java Runtime Environment (JRE) powering Jaspersoft Studio cannot verify the trust chain of the certificate presented by the server.<br />
	<br />
	<strong>Solution:</strong>
</p>

<p>
	While this error generally points to a missing certificate in the Java <code>cacerts</code> truststore, it can be particularly nuanced when replacing an existing certificate from the same CA.
</p>

<p>
	If you have confirmed that the primary server certificate is valid and the path in Studio is correct, ensure that the <b>Intermediate Certificate</b> has also been updated within your keystore or truststore. Java requires the complete chain of trust to be present; if the new server certificate was signed by a different intermediate bundle than the expired one, the handshake will fail because the "path" to the Root CA is broken.
</p>

<h3>
	Recommended Steps:
</h3>

<ol start="1">
	<li>
		<p>
			<b>Verify the Chain:</b> Use an SSL tool to ensure the server is broadcasting the full certificate chain (Root, Intermediate, and Identity).
		</p>
	</li>
	<li>
		<p>
			<b>Update the JRE Truststore:</b> Ensure the new Intermediate CA is imported into the specific JRE used by Jaspersoft Studio: <code>keytool -import -alias intermediate_alias -keystore ../lib/security/cacerts -file intermediate.crt</code>
		</p>
	</li>
	<li>
		<p>
			<b>Restart Studio:</b> Java caches truststore information at startup; a full restart is required after any <code>keytool</code> modifications.
		</p>
	</li>
</ol>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">3945</guid><pubDate>Fri, 08 Jan 2021 07:21:56 +0000</pubDate></item><item><title>Issue with AM / PM mask when exporting ad hoc report to XLS/XLSX</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/issue-am-pm-mask-when-exporting-ad-hoc-report-xlsxlsx/</link><description><![CDATA[<p>
	<strong>Problem:</strong>
</p>

<p>
	You have an ad hoc view with date field that uses date format which includes AM/PM component. For example:
</p>

<p>
	MMM dd, yyyy HH:mm:ss a
</p>

<p>
	When you export this to XLS or XLSX you get invalid mask for cell format:
</p>

<p>
	mmm d, yyyy h:mm:ss a
</p>

<p>
	<strong>Solution:</strong>
</p>

<p>
	Edit the applicationContext.xml file, find the following section:
</p>

<p>
	  &lt;util:map id="formatPatternsMap"&gt;<br />
	    &lt;!--entry key="$ #,##0.00" value="$ #,##0.00"/--&gt;<br />
	  &lt;/util:map&gt;
</p>

<p>
	Add the following entries:
</p>

<p>
	    &lt;entry key="MMM d, yyyy h:mm:ss a" value="MMM d, yyyy h:mm:ss AM/PM"/&gt;<br />
	    &lt;entry key="h:mm:ss a" value="h:mm:ss AM/PM"/&gt;
</p>

<p>
	Save the file and restart the server.
</p>
]]></description><guid isPermaLink="false">2299</guid><pubDate>Fri, 10 Jun 2016 23:18:59 +0000</pubDate></item><item><title>Sample Report: Changing Report Grouping at Run Time Based on User's Input</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/sample-report-changing-report-grouping-run-time-based-users-input/</link><description><![CDATA[<div>
	<div>
		<div>
			<div>
				<div>
					<div>
						<div>
							<div>
								The purpose of this sample report is to show user one of the way to change report grouping structure dynamically using available JR features. The techniques used in this report design are very basic features of JasperReports product. We encourage users to review <strong><a href="https://support.jaspersoft.com/Docs/viewDocument.php?doc_id=293277363&amp;start_page=1" rel="external nofollow">TIBCO JASPERSOFT® STUDIO USER GUIDE RELEASE 6.2</a></strong> document and get themselves familiar with the product in order to use it efficiently, effectively, and creatively to meet their report requirement. <br>
								 
							</div>
							<strong><span style="font-size:14px;">Key Design Considerations:</span></strong><br>
							 
						</div>
						- This report uses jasperserver repository "profile" database to list organizations, its users, and as associated roles.<br>
						<br>
						- To simplify report design and avoid complex structure, this report utilizes simple tabular layout without grouping. <em>Users with report design expertise who have mastered the JR features can utilize group function to create more complex report structures.</em><br>
						 
					</div>
					- The report data is grouped based on user's input, and report rows are displayed by grouping sequence.<br>
					 
				</div>
				- Report input selection is based on predefined key values and translated into "order by" syntax before being injected as a piece of report SQL query replacement via $P!{}.<br>
				 
			</div>
			<em>It is imperative not to inject user's input directly into report SQL query using $P!{} to avoid hacking and malicious acts through SQL injection. Using a hidden parameter as a buffer zone instead, as demonstrated in this report design, to control and limit what can be used in the actual report SQL query.</em><br>
			 
		</div>
		<strong><span style="font-size:14px;">Report Design:</span></strong><br>
		 
	</div>

	<pre class="ipsCode prettyprint lang-xml prettyprinted">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!-- Created with Jaspersoft Studio version 6.2.1.final using JasperReports Library version 6.2.1  --&gt;
&lt;!-- 2016-06-02T12:44:01 --&gt;
&lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_Letter" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="026e0562-4130-4d3e-8004-4285bde9118f"&gt;
    &lt;property name="com.jaspersoft.studio.data.sql.tables" value=""/&gt;
    &lt;property name="com.jaspersoft.studio.data.defaultdataadapter" value="JRSrepo"/&gt;
    &lt;parameter name="GroupBy" class="java.lang.Integer"&gt;
        &lt;defaultValueExpression&gt;&lt;![CDATA[1]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;parameter name="GroupItem" class="java.lang.String" isForPrompting="false"&gt;
        &lt;defaultValueExpression&gt;&lt;![CDATA[$P{GroupBy}.intValue()==3?"Role":$P{GroupBy}.intValue()==2?"User":"Organization"]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;parameter name="OrderBy" class="java.lang.String" isForPrompting="false"&gt;
        &lt;defaultValueExpression&gt;&lt;![CDATA[" order by "+($P{GroupBy}.intValue()==3?"3, 1, 2":$P{GroupBy}.intValue()==2?"2, 1, 3":"1, 2, 3")]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;queryString&gt;
        &lt;![CDATA[SELECT o.tenantname as org_name
, u.username as user_name
, r.rolename as role_name
FROM jitenant o
inner join jiuser u on u.tenantid = o.id
inner join jiuserrole j on j.userid = u.id
inner join jirole r on r.id = j.roleid
$P!{OrderBy} ]]&gt;
    &lt;/queryString&gt;
    &lt;field name="org_name" class="java.lang.String"/&gt;
    &lt;field name="user_name" class="java.lang.String"/&gt;
    &lt;field name="role_name" class="java.lang.String"/&gt;
    &lt;background&gt;
        &lt;band splitType="Stretch"/&gt;
    &lt;/background&gt;
    &lt;title&gt;
        &lt;band height="35" splitType="Stretch"&gt;
            &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
            &lt;textField&gt;
                &lt;reportElement x="0" y="0" width="570" height="30" uuid="51f0449a-2105-483e-926b-f3616fdd97d0"/&gt;
                &lt;textElement&gt;
                    &lt;font size="14" isBold="true"/&gt;
                &lt;/textElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA["Demo Report on Dynamic Grouping of "+$P{GroupItem}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
    &lt;/title&gt;
    &lt;pageHeader&gt;
        &lt;band height="1" splitType="Stretch"/&gt;
    &lt;/pageHeader&gt;
    &lt;columnHeader&gt;
        &lt;band height="35" splitType="Stretch"&gt;
            &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
            &lt;textField&gt;
                &lt;reportElement x="0" y="0" width="190" height="30" forecolor="#FC0905" uuid="01864a95-4b0d-4410-be9c-ca4f616c40d1"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.width" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textElement&gt;
                    &lt;font isBold="true"/&gt;
                &lt;/textElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$P{GroupBy}.intValue()==3?"role_name":$P{GroupBy}.intValue()==2?"user_name":"org_name"]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="190" y="0" width="190" height="30" uuid="105b50cf-1e17-4aec-8aa1-83cac3dc0032"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textElement&gt;
                    &lt;font isBold="true"/&gt;
                &lt;/textElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$P{GroupBy}.intValue()==3?"org_name":$P{GroupBy}.intValue()==2?"org_name":"user_name"]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="380" y="0" width="190" height="30" uuid="eb853cf4-82d1-4bc7-b6f7-4e694fb8c2d3"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textElement&gt;
                    &lt;font isBold="true"/&gt;
                &lt;/textElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$P{GroupBy}.intValue()==3?"user_name":"role_name"]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
    &lt;/columnHeader&gt;
    &lt;detail&gt;
        &lt;band height="30" splitType="Stretch"&gt;
            &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
            &lt;printWhenExpression&gt;&lt;![CDATA[!($P{GroupBy}.intValue()==2||$P{GroupBy}.intValue()==3)]]&gt;&lt;/printWhenExpression&gt;
            &lt;textField&gt;
                &lt;reportElement isPrintRepeatedValues="false" x="0" y="0" width="190" height="30" uuid="16978d74-66b3-49a1-b111-5b4c26a4768f"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.width" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{org_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="190" y="0" width="190" height="30" uuid="5c54b46f-088b-432b-87e1-2fe9f1ce36be"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{user_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="380" y="0" width="190" height="30" uuid="cdaf1f8c-dea1-43db-bf09-5bc4c7bfbc59"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{role_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
        &lt;band height="30"&gt;
            &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
            &lt;printWhenExpression&gt;&lt;![CDATA[$P{GroupBy}.intValue()==2]]&gt;&lt;/printWhenExpression&gt;
            &lt;textField&gt;
                &lt;reportElement isPrintRepeatedValues="false" x="0" y="0" width="190" height="30" uuid="05826092-c5e5-4059-b086-f8a1a15a0d99"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.width" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{user_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="190" y="0" width="190" height="30" uuid="cf5d9477-dde4-43e8-aec6-3f7e737dc8c6"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{org_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="380" y="0" width="190" height="30" uuid="353d8d6d-5857-4937-9125-58ee8e818e35"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{role_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
        &lt;band height="30"&gt;
            &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
            &lt;printWhenExpression&gt;&lt;![CDATA[$P{GroupBy}.intValue()==3]]&gt;&lt;/printWhenExpression&gt;
            &lt;textField&gt;
                &lt;reportElement isPrintRepeatedValues="false" x="0" y="0" width="190" height="30" uuid="82cbd8ee-c77b-4d7d-9a45-0662174428d2"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.width" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{role_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="190" y="0" width="190" height="30" uuid="ca4150c3-1ae4-42c5-8822-8ab3b5477bfd"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{org_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField&gt;
                &lt;reportElement x="380" y="0" width="190" height="30" uuid="01cf29d7-1390-481d-8510-0ff4757e3e4b"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.x" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$F{user_name}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
    &lt;/detail&gt;
    &lt;columnFooter&gt;
        &lt;band splitType="Stretch"/&gt;
    &lt;/columnFooter&gt;
    &lt;pageFooter&gt;
        &lt;band height="30" splitType="Stretch"&gt;
            &lt;property name="com.jaspersoft.studio.unit.height" value="pixel"/&gt;
            &lt;textField&gt;
                &lt;reportElement x="180" y="0" width="100" height="30" uuid="2261cff4-6169-41f8-8c43-189891acfef9"/&gt;
                &lt;textElement textAlignment="Right"&gt;
                    &lt;font isItalic="true"/&gt;
                &lt;/textElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[$V{PAGE_NUMBER}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
            &lt;textField evaluationTime="Report"&gt;
                &lt;reportElement x="280" y="0" width="100" height="30" uuid="b9502135-9343-400c-b843-416a6dad91fc"/&gt;
                &lt;textElement&gt;
                    &lt;font isItalic="true"/&gt;
                &lt;/textElement&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA[" of "+$V{PAGE_NUMBER}]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
    &lt;/pageFooter&gt;
    &lt;summary&gt;
        &lt;band height="50" splitType="Stretch"&gt;
            &lt;textField&gt;
                &lt;reportElement x="0" y="10" width="570" height="30" uuid="a65dd7b6-8e9f-41d7-b25f-e0b0725782c9"&gt;
                    &lt;property name="com.jaspersoft.studio.unit.y" value="pixel"/&gt;
                &lt;/reportElement&gt;
                &lt;box&gt;
                    &lt;topPen lineWidth="1.0"/&gt;
                    &lt;leftPen lineWidth="1.0"/&gt;
                    &lt;bottomPen lineWidth="1.0"/&gt;
                    &lt;rightPen lineWidth="1.0"/&gt;
                &lt;/box&gt;
                &lt;textFieldExpression&gt;&lt;![CDATA["          Total records: "+$V{REPORT_COUNT}+"."]]&gt;&lt;/textFieldExpression&gt;
            &lt;/textField&gt;
        &lt;/band&gt;
    &lt;/summary&gt;
&lt;/jasperReport&gt;</pre>

	<p>
		<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89661" href="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot1.png.05cb5850907116d8b096a6c8b71b269e.png" rel=""><img alt="Screenshot1.png.05cb5850907116d8b096a6c8b71b269e.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89661" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot1.png.05cb5850907116d8b096a6c8b71b269e.png" loading="lazy"></a>
	</p>

	<p>
		Report Outputs:
	</p>

	<p>
		<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89662" href="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot2.png.47d6ed45ccf04dcbae0324c38cbbc39a.png" rel=""><img alt="Screenshot2.png.47d6ed45ccf04dcbae0324c38cbbc39a.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89662" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot2.png.47d6ed45ccf04dcbae0324c38cbbc39a.png" loading="lazy"></a>
	</p>

	<p>
		<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89663" href="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot3.png.d22ce38a81e325c6bb758306109ae2de.png" rel=""><img alt="Screenshot3.png.d22ce38a81e325c6bb758306109ae2de.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89663" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot3.png.d22ce38a81e325c6bb758306109ae2de.png" loading="lazy"></a>
	</p>

	<p>
		<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89664" href="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot4.png.2c2601f31d7494479c9fdd7999fcd9c8.png" rel=""><img alt="Screenshot4.png.2c2601f31d7494479c9fdd7999fcd9c8.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89664" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot4.png.2c2601f31d7494479c9fdd7999fcd9c8.png" loading="lazy"></a>
	</p>

	<p>
		<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89665" href="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot5.png.cbd0a67b1def9f1e3d8eae803e9afc5b.png" rel=""><img alt="Screenshot5.png.cbd0a67b1def9f1e3d8eae803e9afc5b.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89665" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_06/Screenshot5.png.cbd0a67b1def9f1e3d8eae803e9afc5b.png" loading="lazy"></a>
	</p>

	<p>
		 
	</p>

	<p>
		======================================
	</p>
</div>

<p>
	<strong><em>TTC-20160602</em></strong>
</p>
]]></description><guid isPermaLink="false">2289</guid><pubDate>Thu, 02 Jun 2016 22:07:05 +0000</pubDate></item><item><title>How to Group and Display Timestamps in 15 Minute Interval in Ad Hoc Cross Tab</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-group-and-display-timestamps-15-minute-interval-ad-hoc-cross-tab/</link><description><![CDATA[<div>
	<span style="font-size:14px;"><strong>Report Requirement:</strong></span><br />
	<br />
	JasperReports Server Ad hoc View currently supports grouping date by hour, day, month, quarter and year. User's requirement is to have a date type column added to the cross tab and group the date by 15 minute intervals.<br />
	 
</div>

<p>
	<span style="font-size:14px;"><strong>Solution:</strong></span><br />
	<br />
	In a domain ad hoc view, the simplest way to group user's date in 15 minutes interval in the cross tab is to create a derived table to convert the timestamp field value into 15 minutes increment and join this table with data source table, then use the new timestamp from derive table to display data in the cross tab with "Minutes by Day" group.
</p>

<p>
	User can use integer division to carry out the conversion operation. First convert timestamp into Unix date in second unit then do an integer divide by 900 (15 minute interval). The fraction of 15 minutes will get dropped by this operation. Multiple the result by 900 and we will get the Unix dates in the 15 minutes interval. Construct the timestamp from this Unix date and user can have the timestamp fields only contain minutes in 0, 15, 30 and 45 tick marks.<br />
	<br />
	The following is a test SQL query for the derived table and its CSV output.
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">select id
, FROM_UNIXTIME((UNIX_TIMESTAMP(previouspasswordchangetime) div 900) * 900) as previouspasswordchangetime
from jasperserver.jiuser</pre>

<pre class="ipsCode prettyprint lang-xml prettyprinted">id,previouspasswordchangetime
1,2014-12-16 14:15:00.0
2,2014-12-16 14:15:00.0
3,2014-12-16 14:30:00.0
4,2014-12-16 14:30:00.0
5,2014-12-16 14:30:00.0
6,2014-12-16 14:30:00.0</pre>

<p>
	<br />
	===========================================<br />
	<em><strong>TTC-20160531</strong>-67189</em>
</p>
]]></description><guid isPermaLink="false">2287</guid><pubDate>Wed, 01 Jun 2016 06:17:23 +0000</pubDate></item><item><title>Using Derived Hidden Parameter In Report Design To Ensure User Selected Date For The Report Is Not In The Future</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/using-derived-hidden-parameter-report-design-ensure-user-selected-date-report-not-future/</link><description><![CDATA[<p>
	<strong><span style="font-size:14px;">Report Requirement:</span></strong><br />
	<br />
	User is using JR 5.0.1 version of which the Relative Date had not been implemented. User wants to select report data based on user's input date DATE_END as the following:<br />
	<br />
	A. If the date provided &lt;= NOW(), run the report as is based on user's selected date;<br />
	B. If the date provided &gt; NOW(), run the report selecting data based on Today's date at midnight.<br />
	<br />
	<span style="font-size:14px;"><strong>Solution:</strong></span><br />
	<br />
	We need to create a secondary "hidden" (non-prompting) parameter in the report design template to derive the date based on user input from DATE_END parameter and use it in the SQL query. This secondary date DATE_END2 parameter is based on user's input date and today's date, whichever is smaller, to select report data. The parameter is constructed in the following exact order in the report design to have it work correctly: 
</p>

<pre class="ipsCode prettyprint lang-xml prettyprinted">    &lt;parameter name="DATE_FORMAT" class="java.text.SimpleDateFormat" isForPrompting="false"&gt;
        &lt;defaultValueExpression&gt;&lt;![CDATA[new SimpleDateFormat("dd/MM/yyyy")]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;parameter name="DATE_TODAY" class="java.util.Date" isForPrompting="false"&gt;    
        &lt;defaultValueExpression&gt;&lt;![CDATA[$P{DATE_FORMAT}.parse($P{DATE_FORMAT}.format(new java.util.Date()))]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;parameter name="DATE_END" class="java.util.Date"&gt;
        &lt;defaultValueExpression&gt;&lt;![CDATA[$P{DATE_TODAY}]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;
    &lt;parameter name="DATE_END2" class="java.util.Date" isForPrompting="false"&gt;
        &lt;defaultValueExpression&gt;&lt;![CDATA[$P{DATE_END}.compareTo($P{DATE_TODAY})&lt;0?$P{DATE_END}:$P{DATE_TODAY}]]&gt;&lt;/defaultValueExpression&gt;
    &lt;/parameter&gt;</pre>

<p>
	<br />
	This derived date parameter $P!{DATE_END2 then can be used in the report SQL query in the following fashion:<br />
	 
</p>

<pre class="ipsCode prettyprint lang-sql prettyprinted">SELECT
........
WHERE
"datetime" &gt; '$P!{DATE_END2}'::timestamp - interval '1 $P!{INTERVAL}'
AND "datetime" &lt;= '$P!{DATE_END2}'</pre>

<p>
	<br />
	<br />
	==================================
</p>

<p>
	<em><strong>TTC-20160531</strong>-67712</em>
</p>
]]></description><guid isPermaLink="false">2286</guid><pubDate>Wed, 01 Jun 2016 06:01:03 +0000</pubDate></item><item><title>Running JasperReports Server Bundled Installer in Silent Mode</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/running-jasperreports-server-bundled-installer-silent-mode/</link><description><![CDATA[<h2>
	Introduction
</h2>

<p>
	JasperReports Server bundled installers install bundled Apache Tomcat, PostgreSQL servers, and PhantomJS.  Normally, these installers run in either graphical or text-based menu mode.  However, it's possible to install JasperReports Server silently using an options file.  This install mode can be particularly helpful when used as part of another product installation.
</p>

<h2>
	Step-by-Step instructions
</h2>

<ol>
	<li>
		<p>
			Open a text editor and add the following lines:
		</p>

		<pre class="ipsCode prettyprint lang-auto prettyprinted">mode=unattended
installer-language=en
jasperLicenseAccepted=yes
prefix={path to install location e.g. C:\jrs63 or /opt/jrs63}
</pre>
	</li>
	<li>
		<p>
			Save the file as options.txt or whatever file you wish and close the text editor
		</p>
	</li>
	<li>
		<p>
			Open a command line window and browse to where the installer has been saved
		</p>
	</li>
	<li>
		<p>
			Run the following command:
		</p>

		<p>
			Windows:
		</p>

		<pre class="ipsCode prettyprint lang-auto prettyprinted">jasperreports-server-{version}-windows-x64-installer.exe --optionfile options.txt
</pre>

		<p>
			Linux:
		</p>

		<pre class="ipsCode prettyprint lang-auto prettyprinted">./jasperreports-server-{version}-linux-x64-installer.run --optionfile options.txt
</pre>
	</li>
</ol>

<h2>
	<strong>Result</strong>
</h2>

<p>
	JasperReports Server will install silently then exit.  The server will need to be started separately.  To do so, execute the ctlscript.sh or ctlscript.bin file with the start option.
</p>

<hr />
<h2>
	Additional Information
</h2>

<p>
	To see a list of available options, run the installer from the command line with the --help option.
</p>

<p>
	An example with additional options may look as follows:
</p>

<pre class="ipsCode prettyprint lang-auto prettyprinted">mode=unattended
installer-language=en
jasperLicenseAccepted=yes
prefix={path to install location e.g. C:\jrs63 or /opt/jrs63}
postgres_installation_type=bundled
postgres_locale=en
postgres_port=5432
postgres_password=&lt;postgres password&gt;
tomcat_installation_type=bundled
tomcat_server_port=8080
tomcat_server_shutdown_port=8005
tomcat_server_ajp_port=8009
phantomjs_installation_type=bundled
jasperserver_install_sampledata=1
</pre>
]]></description><guid isPermaLink="false">2256</guid><pubDate>Wed, 11 May 2016 21:42:04 +0000</pubDate></item><item><title>Localizing Domain Data</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/localizing-domain-data/</link><description><![CDATA[<h1>
	How To Access Localized Data Via A Domain
</h1>

<p>
	TIBCO JasperReports Server offers users the ability to localize domain labels by leveraging the Java platform's built-in internationalization support using resource bundles. But accessing and analyzing localized data isn't as straightforward a proposition. The usual recommendation for this use case is to create multiple domains, one for each locale, store the localized data in separate database tables, and limit user access to the domains via roles. While this approach is fine in limited situations, some customers have reported performance and scalability issues and others have found this approach to be inflexible and difficult to maintain. There is an alternate approach that allows for localized data to be stored inline in a single table and uses a single domain to access it. The purpose of this wiki article is to present step-by-step guidance to implement this approach.
</p>

<h2>
	Prerequisites
</h2>

<ul>
	<li>
		<p>
			JasperReports Server Professional (any version)
		</p>
	</li>
	<li>
		<p>
			One or more database tables with localized inline data
		</p>
	</li>
</ul>

<h2>
	Configuration Steps
</h2>

<ul>
	<li>
		<p>
			Create a new domain or edit an existing one and launch the <strong>Domain Designer</strong>
		</p>
	</li>
	<li>
		<p>
			Click the <strong>Calculated Fields</strong> tab
		</p>
	</li>
	<li>
		<p>
			Enter the following values in the text fields to create a new calculated field:
		</p>

		<ul>
			<li>
				<p>
					<strong>Field Name:</strong>  <i>any descriptive name (this example uses "user_locale")</i>
				</p>
			</li>
			<li>
				<p>
					<strong>Type:</strong>  String
				</p>
			</li>
			<li>
				<p>
					<strong>Expression:</strong>  groovy('org.springframework.context.i18n.LocaleContextHolder.getLocale()')
				</p>
			</li>
		</ul>
	</li>
	<li>
		<p>
			Click the <strong>Save Field</strong> button
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89554" href="//media.invisioncic.com/i328763/monthly_2016_04/groovy_calc_field_locale.png.142e661e9e827fbcbdea9bf092e75663.png" rel=""><img alt="groovy_calc_field_locale.png.142e661e9e827fbcbdea9bf092e75663.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89554" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/groovy_calc_field_locale.png.142e661e9e827fbcbdea9bf092e75663.png" loading="lazy"></a>
		</p>
	</li>
	<li>
		<p>
			Create another calculated field by populating the text fields with the following values:
		</p>

		<ul>
			<li>
				<p>
					<strong>Field Name:</strong>  <i>any descriptive name (this example uses "Locale_Check")</i>
				</p>
			</li>
			<li>
				<p>
					<strong>Type:</strong>  Boolean
				</p>
			</li>
			<li>
				<p>
					<strong>Expression:</strong>  <i>&lt;Database locale column name&gt;</i> == <em>constant_fields_level.</em><i>user_locale</i>
				</p>
			</li>
		</ul>
	</li>
	<li>
		<p>
			Click the <strong>Save Field</strong> button
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89555" href="//media.invisioncic.com/i328763/monthly_2016_04/locale_check_example.png.9bf38f787ae5b4a8f67c5509bf0555c8.png" rel=""><img alt="locale_check_example.png.9bf38f787ae5b4a8f67c5509bf0555c8.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89555" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/locale_check_example.png.9bf38f787ae5b4a8f67c5509bf0555c8.png" loading="lazy"></a>
		</p>
	</li>
	<li>
		<p>
			Click the <strong>Pre-filters</strong> tab
		</p>
	</li>
	<li>
		<p>
			Find the second calculated field created in the previous step (called "Locale_Check" in this example) and double-click it
		</p>
	</li>
	<li>
		<p>
			In the new filter that appears, leave the default <strong>equals</strong> in the combo box and enter <strong>true</strong> in the text field to the right of the combo box
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89556" href="//media.invisioncic.com/i328763/monthly_2016_04/locale_pre-filter_example.png.4c1fb8507b47173c6a220132c9766011.png" rel=""><img alt="locale_pre-filter_example.png.4c1fb8507b47173c6a220132c9766011.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89556" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/locale_pre-filter_example.png.4c1fb8507b47173c6a220132c9766011.png" loading="lazy"></a>
		</p>
	</li>
	<li>
		<p>
			Click <strong>OK</strong> and <strong>Submit</strong> to save the domain
		</p>
	</li>
</ul>

<h2>
	Testing
</h2>

<p>
	If you have the sample data installed and you're using PostgreSQL as your database, perform the following steps to test the solution:
</p>

<ul>
	<li>
		<p>
			Download, unzip and execute the following SQL script against the <strong>SugarCRM</strong> sample database:
		</p>

		<p>
			<a data-fileext="zip" data-fileid="89557" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=89557" rel="">simple_domain_test_data_sql.zip</a>
		</p>
	</li>
	<li>
		<p>
			Modify the <i>/organizations/organization_1/domains/simple_domain</i> using the steps described above
		</p>
	</li>
	<li>
		<p>
			Create an Ad Hoc view using the <i>Simple Domain</i> as a data source.
		</p>
	</li>
	<li>
		<p>
			Select the <i>Opportunities</i> set, drag or click it into the <strong>Selected Fields</strong> list, and click <strong>OK</strong>
		</p>
	</li>
	<li>
		<p>
			In the Ad Hoc editor, expand the <i>Opportunities</i> node
		</p>
	</li>
	<li>
		<p>
			Drag or click the <i>Opportunity</i> and <i>Sales Stage</i> fields to add them to the report
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89558" href="//media.invisioncic.com/i328763/monthly_2016_04/locale_ad_hoc_view_sample.png.e1d792dea44c06376722eca67add21af.png" rel=""><img alt="locale_ad_hoc_view_sample.png.e1d792dea44c06376722eca67add21af.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89558" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/locale_ad_hoc_view_sample.png.e1d792dea44c06376722eca67add21af.png" loading="lazy"></a>
		</p>
	</li>
	<li>
		<p>
			Save the Ad Hoc view
		</p>
	</li>
	<li>
		<p>
			Log out of JasperReports Server
		</p>
	</li>
	<li>
		<p>
			On the login screen, click the <strong>Show locale and timezone</strong> link
		</p>
	</li>
	<li>
		<p>
			Change the <strong>Locale</strong> combo box setting from <i>en_US</i> to <i>es</i>
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89559" href="//media.invisioncic.com/i328763/monthly_2016_04/login_locale_setting.png.e6da389de3c5c61ba8c764572b0d008a.png" rel=""><img alt="login_locale_setting.png.e6da389de3c5c61ba8c764572b0d008a.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89559" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/login_locale_setting.png.e6da389de3c5c61ba8c764572b0d008a.png" loading="lazy"></a>
		</p>
	</li>
	<li>
		<p>
			Provide your credentials and re-login to JasperReports Server
		</p>
	</li>
	<li>
		<p>
			Click <strong>Ver -&gt; Repositorio</strong> and navigate to the Ad Hoc view created in the previous steps
		</p>
	</li>
	<li>
		<p>
			Upon executing the Ad Hoc view, you should see the constrained data set with the locale filter automatically applied
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89560" href="//media.invisioncic.com/i328763/monthly_2016_04/localized_ad_hoc_view_data.png.7759daaa1e6956a82aa698d4066ec153.png" rel=""><img alt="localized_ad_hoc_view_data.png.7759daaa1e6956a82aa698d4066ec153.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89560" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/localized_ad_hoc_view_data.png.7759daaa1e6956a82aa698d4066ec153.png" loading="lazy"></a>
		</p>
	</li>
</ul>

<h2>
	Known Issues
</h2>

<p>
	Due to Ad Hoc caching, you might still see the non-localized data the first couple of times you execute the Ad Hoc view. It may be necessary to log in as Superuser and manually clear the Ad Hoc cache from the <strong>Manage -&gt; Server Settings</strong> page.
</p>
]]></description><guid isPermaLink="false">2220</guid><pubDate>Tue, 12 Apr 2016 21:11:41 +0000</pubDate></item><item><title>Domain Ad Hoc View Report Listing</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/domain-ad-hoc-view-report-listing/</link><description><![CDATA[<p>
	When making changes to a domain, users often want to know which ad hoc view report unit will get affected by the change. Users can download<a data-fileext="zip" data-fileid="89526" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=89526" rel="">export(2).zip</a>and import it into TIBCO JasperReports<sup>® </sup>Server repository, then run "<strong>50. Domain Reference Listing Ad Hoc View Report</strong>" under <strong>publicSamplesReports</strong> repository folder to get the list of report units using that domain.
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89527" href="//media.invisioncic.com/i328763/monthly_2016_04/Input.png.c68b3d8da7cf8551f585f815008e87da.png" rel=""><img alt="Input.png.c68b3d8da7cf8551f585f815008e87da.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89527" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/Input.png.c68b3d8da7cf8551f585f815008e87da.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89529" href="//media.invisioncic.com/i328763/monthly_2016_04/reportoutput(7).png.1c9778bcd8b2a668b19a145349d9f765.png" rel=""><img alt="reportoutput(7).png.1c9778bcd8b2a668b19a145349d9f765.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89529" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/reportoutput(7).png.1c9778bcd8b2a668b19a145349d9f765.png" loading="lazy"></a>
</p>

<hr>
<p>
	 
</p>

<p>
	<em><strong>TTC</strong>-20160331</em>
</p>

<p>
	 
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89528" href="//media.invisioncic.com/i328763/monthly_2016_04/Input.png.51679036f9f9147389e8c157d783d2e3.png" rel=""><img alt="Input.png.51679036f9f9147389e8c157d783d2e3.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89528" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/Input.png.51679036f9f9147389e8c157d783d2e3.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89530" href="//media.invisioncic.com/i328763/monthly_2016_04/reportoutput(7).png.d0d1c5c199741dd0e84e3702270da8dc.png" rel=""><img alt="reportoutput(7).png.d0d1c5c199741dd0e84e3702270da8dc.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89530" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_04/reportoutput(7).png.d0d1c5c199741dd0e84e3702270da8dc.png" loading="lazy"></a>
</p>
]]></description><guid isPermaLink="false">2212</guid><pubDate>Fri, 01 Apr 2016 04:37:07 +0000</pubDate></item><item><title>When Using the Bundled Installation of TIBCO JasperReports&#xAE; Server an Error "The System cannot find file cmd.exe" is Received</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/when-using-bundled-installation-tibco-jasperreports-server-error-system-cannot-find-file-cmdexe/</link><description><![CDATA[<h2>
	Issue:
</h2>

<p>
	When using the bundled installation of TIBCO JasperReports<sup>®</sup> Server, towards the end of installation, an error of "The System cannot find file cmd.exe". You may see the full error as follows:
</p>

<p>
	Problem running post-install step. Installation may not complete correctly
</p>

<p>
	Error running C:Jaspersoftjasperreports-server-X.X.X/servicerun.bat STOP:
</p>

<p>
	The system cannot find the file cmd.exe.
</p>

<p>
	The system cannot find the file cmd.exe.
</p>

<hr />
<h2>
	Solution:
</h2>

<p>
	This error may be do to not sufficient permission on the server. Cmd.exe is command prompt. You have to have administrator permissions to run command prompt on the server to start and stop JasperReports<sup>®</sup> Server. 
</p>

<hr />
<p>
	 
</p>
]]></description><guid isPermaLink="false">3809</guid><pubDate>Thu, 28 May 2020 16:46:50 +0000</pubDate></item><item><title>How to Configure Default Values in Scheduler Notification Tab</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-configure-default-values-scheduler-notification-tab/</link><description><![CDATA[<h2>
	Question:
</h2>

<p>
	How do I set default values in Notification tab of report scheduler?
</p>

<hr>
<h2>
	Answer:
</h2>

<p>
	Please note the solution below verified with TIBCO JasperReports<sup>®</sup> Server v.6.1.1
</p>

<p>
	Default values for Notification tab can be setup in a Javascript file:
</p>

<blockquote class="ipsQuote">
	<div class="ipsQuote_citation">
		Quote
	</div>

	<div class="ipsQuote_contents ipsClearfix">
		<p>
			<span style="color:#696969;"><em><strong>jasperserver-proscriptsbower_componentsjrs-uisrcschedulermodeljobModel.js </strong></em></span>
		</p>
	</div>
</blockquote>

<p>
	Add the following code after repositoryDestination: {.....} model definition (line ~1465): 
</p>

<pre class="ipsCode prettyprint lang-auto prettyprinted">mailNotification: {

    toAddresses:  { address: ['JohnSmith@mail.com', 'BobSmith@mail.com'] },
    ccAddresses:  { address: ['RedGreen@mail.com'] },
    bccAddresses: { address: ['BlueJack@mail.com'] },

    subject:      'Ouptut Job - Year Sales',
    messageText:  'See attached...',

    skipEmptyReports: true,
    includingStackTraceWhenJobFails: false,
    skipNotificationWhenJobFails:    false,
    resultSendType: 'SEND_ATTACHMENT' // SEND, SEND_EMBED, SEND_EMBED_ZIP_ALL_OTHERS,
                                      // SEND_ATTACHMENT, SEND_ATTACHMENT_ZIP_ALL
},
alert: {
    recipient:   'OWNER_AND_ADMIN',   // NONE, OWNER, ADMIN, OWNER_AND_ADMIN
    jobState:    'ALL',               // NONE, ALL, FAIL_ONLY, SUCCESS_ONLY
    subject:     'Year Sales Job Status',
    messageText: 'Successful run.',

    messageTextWhenJobFails: 'Job Output failed.',
    includingStackTrace:     true,
    includingReportJobInfo:  true,

    toAddresses: { address: ['statusForAdmin@mail.com'] }
}
</pre>

<p>
	You need to replace dummy values with your custom ones. 
</p>

<p>
	Please note that by default JasperReports Server uses so-called optimized scripts.
</p>

<p>
	In order to test the changes you can add <span style="color:#696969;"><em><strong>_opt=false</strong></em></span> parameter to URL to make the server uses non-optimized scripts: 
</p>

<blockquote class="ipsQuote">
	<div class="ipsQuote_citation">
		Quote
	</div>

	<div class="ipsQuote_contents ipsClearfix">
		<p>
			<a href="http://http//localhost:8080/jasperserver-pro/flow.html?_flowId=searchFlow&amp;_opt=false" rel="external nofollow">http://localhost:8080/jasperserver-pro/flow.html?_flowId=searchFlow&amp;_opt=false </a>
		</p>
	</div>
</blockquote>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89465" href="//media.invisioncic.com/i328763/monthly_2016_02/JobNotifications_DefaultValues.png.56714b47478d7592497e7fbcba4e557d.png" rel=""><img alt="JobNotifications_DefaultValues.png.56714b47478d7592497e7fbcba4e557d.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89465" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/JobNotifications_DefaultValues.png.56714b47478d7592497e7fbcba4e557d.png" loading="lazy"></a>
</p>

<p>
	If the changes meet your requirements, you should regenerate optimized scripts as described in JasperReports Server guide: 
</p>

<blockquote class="ipsQuote">
	<div class="ipsQuote_citation">
		Quote
	</div>

	<div class="ipsQuote_contents ipsClearfix">
		<p>
			<a href="https://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v561/customizing-javascript-files" rel="">http://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v561/customizing-javascript-files</a>
		</p>
	</div>
</blockquote>

<hr>
<h3>
	See also: 
</h3>

<blockquote class="ipsQuote">
	<div class="ipsQuote_citation">
		Quote
	</div>

	<div class="ipsQuote_contents ipsClearfix">
		<p>
			<a href="https://community.jaspersoft.com/wiki/how-automatically-enable-and-configure-ftp-properties-scheduler-output-options-tab" rel="">How to Automatically Enable and Configure FTP properties in Scheduler 'Output Options' tab</a>
		</p>
	</div>
</blockquote>

<hr>
<p>
	<em><strong>Ref. Case #00065543</strong></em>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89466" href="//media.invisioncic.com/i328763/monthly_2016_02/JobNotifications_DefaultValues.png.fb47231ad93866c5438900d5f249f3e2.png" rel=""><img alt="JobNotifications_DefaultValues.png.fb47231ad93866c5438900d5f249f3e2.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89466" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/JobNotifications_DefaultValues.png.fb47231ad93866c5438900d5f249f3e2.png" loading="lazy"></a>
</p>
]]></description><guid isPermaLink="false">2150</guid><pubDate>Wed, 10 Feb 2016 08:18:21 +0000</pubDate></item><item><title>An Example of Custom AdHoc Report Generator and Report Builders : Export Ad Hoc Table Report Data to JSON</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/example-custom-adhoc-report-generator-and-report-builders-export-ad-hoc-table-report-data-json/</link><description><![CDATA[<h2>
	Introduction - Why this Article?
</h2>

<p>
	I often get the question, "What can I do if I want the Reports generated from Ad Hoc to be different than the default ones?".
</p>

<p>
	One part of the answer is, "you can use a <b>Report Template</b>".
</p>

<p>
	But this is just one part of the answer. Indeed, what we barely know is that the introduction of this concept of <b>Report Template</b> was linked to a more generic and powerful engine : the <b>Report Generator</b>.
</p>

<p>
	To be more precise, a Template is a part of a Generator.
</p>

<p>
	As a reminder, a <strong>Report Template</strong> permits you to:
</p>

<ul>
	<li>
		<p>
			Create a pixel perfect report from an ad hoc view
		</p>
	</li>
	<li>
		<p>
			Adjust the look and feel on the existing structure of an Ad-Hoc Report and will act as a Stamp.
		</p>
	</li>
</ul>

<p>
	But, if you want to touch in a deeper way on the Report Structure, the Template will not be the answer anymore.
</p>

<p>
	To change the logic with which the report/JRXML is generated, starting from an AdHoc View, you will need to create/adapt a <b>ReportGenerator</b> <em>and its dependencies</em>.
</p>

<p>
	We introduced last year the JSON exporter which requires the user to add some properties on the Text Fields to create the Json Structure (for further in formation please consider <a href="http://jasperreports.sourceforge.net/sample.reference/subreport/index.html#jsonmetadataexport" rel="external nofollow">Json Metadata Exporter</a>).
</p>

<p>
	To adapt in a generic way the generated Report to be exportable in Json, we will so need to use another object which is part of a Report Generator, the <b>Report Builder</b>.
</p>

<p>
	The Report Builder permits the user to automate the JRXML generation with the Ad-Hoc view as an entry point. It is important to be clear on the wording.
</p>

<hr>
<h2>
	NB
</h2>

<p>
	You can use the sample code to <a href="https://community.jaspersoft.com/wiki/build-your-customized-jar-jasperreports-server" rel="">build your own library</a> as a JAR file and add it to your server.
</p>

<p>
	<a href="https://community.jaspersoft.com/wiki/build-your-customized-jar-jasperreports-server" rel="">http://community.jaspersoft.com/wiki/build-your-customized-jar-jasperreports-server</a>
</p>

<p>
	It is recommended to replace the level <em>sample</em> in the package name hierarchy with something else specific to your project or company name.
</p>

<p>
	This code has been tested on the latest release of the Professional edition of JasperReports Server, which is 6.1.1 at the time of writing. It is likely to work on 6.1,6.0.1 and 6.2.
</p>

<p>
	<strong>Please be aware</strong> that this sample code is provided <strong style="color:rgb(255,0,0);">AS IS</strong>, it is your responsibility to review it and make sure it satisfies your requirements. Feel free to modify it and adapt it to your needs.
</p>

<h3>
	Principles and Definitions / the existing part
</h3>

<p>
	As documented in<a href="https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v60/configuring-ad-hoc#Templates_and_Generators" rel=""> TIBCO JasperReports<sup>®</sup> Server Administrator Guide, v6.0, Configuring Ad Hoc, Templates_and_Generators</a>, JasperReports Server allows you to customize the way Reports are generated from Ad Hoc View.
</p>

<p>
	A custom report generator can be written in java/groovy and enabled in configuration <span style="color:#696969;"><em><strong>applicationContext-adhoc.xml.</strong></em></span> They should be designed as classes and MUST implement <span style="color:#696969;"><em><strong>com.jaspersoft.ji.adhoc.service.AdhocReportGenerator</strong></em></span> interface.
</p>

<p>
	To make them available to the user compiled jar should be placed under WEB-INF/lib folder or class file under <span style="color:#696969;"><em><strong>WEB-INF/classes</strong></em></span>.
</p>

<p>
	By default JasperReport Server is using the <span style="color:#696969;"><em><strong>SimpleReportGenerator</strong></em></span>.
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89455" href="//media.invisioncic.com/i328763/monthly_2016_02/forWiki1.png.d369e707d81b6ea34c7fa3e4c0b80935.png" rel=""><img alt="forWiki1.png.d369e707d81b6ea34c7fa3e4c0b80935.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89455" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/forWiki1.png.d369e707d81b6ea34c7fa3e4c0b80935.png" loading="lazy"></a>
</p>

<p>
	Which contains references to several <strong>ReportBuilders</strong>.
</p>

<p>
	For our use case the only one we need to modify is the <strong>tableReportBuilder</strong>.
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89457" href="//media.invisioncic.com/i328763/monthly_2016_02/forWiki2.png.bcfdaef96980c38e131863a2f28e8667.png" rel=""><img alt="forWiki2.png.bcfdaef96980c38e131863a2f28e8667.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89457" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/forWiki2.png.bcfdaef96980c38e131863a2f28e8667.png" loading="lazy"></a>
</p>

<p>
	Let’s have a look to the related bean definition into the <span style="color:#696969;"><em><strong>/WEB-INF/applicationContext-adhoc.xml</strong></em></span>, when we generate a report from ad-hoc without choosing any template this is what is used:
</p>

<pre class="ipsCode prettyprint lang-xml prettyprinted">&lt;bean id="actualSizeReportGenerator" class="com.jaspersoft.ji.adhoc.service.SimpleReportGenerator"&gt;
    &lt;property name="id"       value="actual-size"/&gt;
    &lt;property name="template" value="/public/templates/actual_size.620.jrxml"/&gt;
    &lt;property name="crosstabReportBuilderName"&gt;
        &lt;idref bean="defaultCrosstabReportBuilder"/&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</pre>

<p>
	The bean which interests us is the following:
</p>

<pre class="ipsCode prettyprint lang-xml prettyprinted">&lt;bean id="reportGeneratorFactory" class="com.jaspersoft.ji.adhoc.service.ReportGeneratorFactoryImpl"&gt;
    &lt;property name="reportGenerators"&gt;
        &lt;list&gt;
            &lt;!--&lt;ref bean="actualSizeReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="letterPortraitReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="letterLandscapeReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="a4PortraitReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="a4LandscapeReportGenerator" /&gt;--&gt;
        &lt;/list&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</pre>

<p>
	Showing that we can add easily a new Report Generator.
</p>

<p>
	By default the list is empty, but once we activate a ReportGenerator reference, the popup menu which appears when you Save an AdHoc view and Create a report will change, a new Option permitting to choose a Report Generator will appear, and the popup window will then look like :
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89459" href="//media.invisioncic.com/i328763/monthly_2016_02/forWiki3.png.59ff7b6f10db45bf65eb76c0255d13b7.png" rel=""><img alt="forWiki3.png.59ff7b6f10db45bf65eb76c0255d13b7.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89459" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/forWiki3.png.59ff7b6f10db45bf65eb76c0255d13b7.png" loading="lazy"></a>
</p>

<h3>
	Back to our example : Let’s generate Json Reports !
</h3>

<p>
	To do so and following the previous explanations we will just need to:
</p>

<ul>
	<li>
		<p>
			Create our <strong>ReportGenerator</strong>, for our use case we will just copy the <b>SimpleReportGenerator</b> and rename it <b>CustomWikiReportGenerator.</b>&lt;
		</p>
	</li>
	<li>
		<p>
			Create a copy of the default TableReportBuilder named TableReportBuilderExtendable, I just switched all the methods from private to protected in order to extend it.
		</p>

		<p>
			I just modified some methods to accept a Boolean named group which determines the behavior and structure of the json regarding if some groups have been created into the used Table Ad Hoc view.
		</p>

		<p>
			All the modification are signaled by a comment containing the keyword JSON:
		</p>

		<p>
			First Example, I Just changed the signature of the method:
		</p>

		<pre class="ipsCode prettyprint lang-auto prettyprinted">/**
* Modified by plambert for group in detail JSON path
*/
protected JRDesignTextField getDetailField(int x, AdhocColumn column, boolean group)
{
    JRDesignTextField textField = new JRDesignTextField();

    textField.setStyleNameReference("TableDetailTextStyle");
    textField.setStretchWithOverflow(true);
    textField.setStretchType(StretchTypeEnum.RELATIVE_TO_TALLEST_OBJECT);
    textField.setBlankWhenNull(true);
    textField.setEvaluationTime(EvaluationTimeEnum.NOW);
    textField.setHyperlinkType(HyperlinkTypeEnum.NONE);
    textField.setHyperlinkTarget(HyperlinkTargetEnum.SELF);
    textField.setX(x);
    textField.setY(0);
    textField.setWidth(column.getWidth());
    textField.setHeight(detailBandHeight);
    textField.setKey("textField");
    textField.setHorizontalAlignment(HorizontalAlignEnum.getByName(column.getAlignment()));
    setMaskPattern(textField, column);
    return textField;
}</pre>

		<p>
			Second Example, I added this statement into the getTable() method in order to use this boolean in every required method which have had their signature changed:
		</p>

		<pre class="ipsCode prettyprint lang-auto prettyprinted">//added for JSON
boolean tableHasGroup = state.getGroups().size() &gt; 0;
//end
</pre>

		<p>
			<strong style="color:#ff0000;">Again I did not change any other logic there a part Signature and usage of boolean group.</strong>
		</p>
	</li>
	<li>
		<p>
			Create <span style="color:#696969;"><em><strong>TableReportBuilderJSON</strong></em></span> which extends <span style="color:#696969;"><em><strong>TableReportBuilderExtendable</strong></em></span>
		</p>

		<p>
			This is where we will adapt the logic of the existing TableReportBuilder to add the json properties onto every concerned text fields.
		</p>

		<p>
			For instance the following snippet permits to get into the JSON export the group and column names as <b>attributes</b> and the content of the Detail Text Field and Group Footer Text Field as <b>values</b>:
		</p>

		<pre class="ipsCode prettyprint lang-auto prettyprinted">//to add the detail values to the JSON
@Override
protected JRDesignTextField getDetailField(int x, AdhocColumn column ,boolean group)
{
    JRDesignTextField textField =  super.getDetailField(x, column ,group);
    if(!(column.getFieldName().equals("_artificial")))
    {
        if(group) {
            textField.getPropertiesMap().setProperty("net.sf.jasperreports.export.json.path", "table.group.detail."+column.getLabel());
        }
        else {
            textField.getPropertiesMap().setProperty("net.sf.jasperreports.export.json.path", "table.detail."+column.getLabel());}
        }
        return textField;
    }
    //to add the group name to the JSON
    @Override
    protected JRDesignTextField getGroupFooterTextField( AdhocGroup adhocGroup, AdhocColumn column, int level)
    throws Exception {
        JRDesignTextField summaryTextField =  super.getGroupFooterTextField(adhocGroup, column, level);
        summaryTextField.getPropertiesMap().setProperty("net.sf.jasperreports.export.json.path", "table.group."+adhocGroup.getLabel()+"."+column.getLabel());
        return summaryTextField;
    }
</pre>

		<p>
			Etc...
		</p>

		<p>
			Following this logic for such an AdHoc View you will be able to export this Json Structure:
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89461" href="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson1.png.97ab515ee5ff54817bb9c44f4fedf812.png" rel=""><img alt="AdHocJson1.png.97ab515ee5ff54817bb9c44f4fedf812.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89461" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson1.png.97ab515ee5ff54817bb9c44f4fedf812.png" loading="lazy"></a>
		</p>

		<p>
			Another Example :
		</p>

		<p>
			<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89463" href="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson2.png.d05eb4aac4ee6f23cf1f46bceffaf5ba.png" rel=""><img alt="AdHocJson2.png.d05eb4aac4ee6f23cf1f46bceffaf5ba.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89463" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson2.png.d05eb4aac4ee6f23cf1f46bceffaf5ba.png" loading="lazy"></a>
		</p>
	</li>
	<li>
		<p>
			We need to put the .jar in the /WEB-INF/lib folder (ReportGeneratorTableJSON.jar if we consider the attached material).
		</p>
	</li>
</ul>

<ul>
	<li>
		<p>
			Then we will just need to add this CustomWikiReportGenerator bean definition in the /WEB-INF/applicationContext-adhoc.xml
		</p>

		<p>
			To do so 5 steps :
		</p>

		<ol>
			<li>
				<p>
					Add at the end of the Reportgenerator bean list:
				</p>

				<pre class="ipsCode prettyprint lang-xml prettyprinted">&lt;bean id="wikiReportGenerator" class="com.jaspersoft.ji.adhoc.service.CustomWikiReportGenerator"&gt;
    &lt;property name="id" value="wiki"/&gt;
    &lt;property name="template" value="/public/templates/actual_size.620.jrxml"/&gt;
    &lt;property name="crosstabReportBuilderName"&gt;
        &lt;idref bean="defaultCrosstabReportBuilder"/&gt;
    &lt;/property&gt;
    &lt;property name="tableReportBuilderName"&gt;
        &lt;idref bean="TableReportBuilderJSON"/&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</pre>

				<p style="font-family:Arial;">
					 
				</p>
			</li>
			<li>
				<p>
					Just after add the new ReportBuilder TableReportBuilderJSON bean definition.
				</p>

				<pre class="ipsCode prettyprint lang-xml prettyprinted">&lt;bean id="TableReportBuilderJSON" class="com.jaspersoft.ji.adhoc.service.TableReportBuilderJSON"/&gt;
</pre>
			</li>
			<li>
				<p>
					Modify the reportGeneratorFactory list of reportGenerators to add our wikiReportGenerator.
				</p>

				<pre class="ipsCode prettyprint lang-xml prettyprinted">&lt;bean id="reportGeneratorFactory" class="com.jaspersoft.ji.adhoc.service.ReportGeneratorFactoryImpl"&gt;
    &lt;property name="reportGenerators"&gt;
        &lt;list&gt;
            &lt;!--&lt;ref bean="actualSizeReportGenerator" /&gt;--&gt;
            &lt;ref bean="wikiReportGenerator" /&gt;
            &lt;!--&lt;ref bean="letterPortraitReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="letterLandscapeReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="a4PortraitReportGenerator" /&gt;--&gt;
            &lt;!--&lt;ref bean="a4LandscapeReportGenerator" /&gt;--&gt;
        &lt;/list&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</pre>
			</li>
			<li>
				<p>
					Edit /WEB-INF/jsp/modules/common/jrsConfigs.jsp to put "" around commonReportGeneratorsMetadata value as follow:
				</p>

				<pre class="ipsCode prettyprint lang-javascript prettyprinted">  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  ~ GNU Affero  General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public  License
  ~ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
  --%&gt;

&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
&lt;%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %&gt;
&lt;%@ taglib uri="/spring" prefix="spring"%&gt;
&lt;%@ taglib uri="http://www.springframework.org/security/tags" prefix="authz"%&gt;
&lt;%@ page import="com.jaspersoft.jasperserver.war.webHelp.WebHelpLookup" %&gt;

&lt;%--Global JRS State/Config object --%&gt;

&lt;script type="text/javascript"&gt;
    var JRS = {};

    var __jrsConfigs__ = {

        i18n: {},
        localContext: {},
        isIPad: "${isIPad}",
        contextPath: "${pageContext.request.contextPath}",
        publicFolderUri: "${not empty publicFolderUri ? publicFolderUri : commonProperties.publicFolderUri}",
        tempFolderUri: "${not empty tempFolderUri ? tempFolderUri : commonProperties.tempFolderUri}",
        enableAccessibility: "${not empty enableAccessibility ? enableAccessibility : commonProperties.enableAccessibility}",
        organizationId: "${not empty organizationId ? organizationId : commonProperties.organizationId}",
        commonReportGeneratorsMetadata: "${not empty reportGenerators ? reportGenerators : '[]'}",
        templatesFolderUri: '${not empty templatesFolderUri ? templatesFolderUri : templateProperties.templatesFolderUri}',
        defaultTemplateUri: '${not empty defaultTemplateUri ? defaultTemplateUri : templateProperties.defaultTemplateUri}',
</pre>
			</li>
			<li>
				<p>
					Add your report Generator message value into /WEB-INF/bundles/adhoc_messages.properties (ADH_REPORT_GENERATOR_wiki for us as defined in wikiReportGenerator bean)
				</p>

				<pre class="ipsCode prettyprint lang-xml prettyprinted">ADH_REPORT_GENERATOR_letter-portrait=Letter Size Portrait
ADH_REPORT_GENERATOR_letter-landscape=Letter Size Landscape
ADH_REPORT_GENERATOR_a4-portrait=A4 Size Portrait
ADH_REPORT_GENERATOR_a4-landscape=A4 Size Landscape
ADH_REPORT_GENERATOR_actual-size=Actual Size
ADH_REPORT_GENERATOR_custom-template=Custom template
ADH_REPORT_GENERATOR_report-title=Report title
ADH_REPORT_GENERATOR_wiki=Custom Example Generator
</pre>

				<p>
					Now you can restart Jasper Reports Server , create an Ad Hoc View (a Table) create a Report thanks to your new Custom Report Generator and call the Json result thanks to our Rest APIs. Making this Json Export possible with the UI is another topic.
				</p>
			</li>
		</ol>
	</li>
</ul>

<p style="font-family:Arial;">
	Attached you will find the Complete Material to run the the described Custom Generator in JasperReports Server v6.2. Inside JsonReportGeneratorMaterial you will find the full structure starting from the  WEB-INF folder. ReportGeneratorTableJSON.jar contains the used source code.
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89456" href="//media.invisioncic.com/i328763/monthly_2016_02/forWiki1.png.b807431a2be60d29f192b99b2de06cde.png" rel=""><img alt="forWiki1.png.b807431a2be60d29f192b99b2de06cde.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89456" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/forWiki1.png.b807431a2be60d29f192b99b2de06cde.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89458" href="//media.invisioncic.com/i328763/monthly_2016_02/forWiki2.png.8e79ea42241f2325f7677270a68ef224.png" rel=""><img alt="forWiki2.png.8e79ea42241f2325f7677270a68ef224.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89458" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/forWiki2.png.8e79ea42241f2325f7677270a68ef224.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89460" href="//media.invisioncic.com/i328763/monthly_2016_02/forWiki3.png.a8b1d2f2bb02a8d8344d8114eef42e9a.png" rel=""><img alt="forWiki3.png.a8b1d2f2bb02a8d8344d8114eef42e9a.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89460" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/forWiki3.png.a8b1d2f2bb02a8d8344d8114eef42e9a.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89462" href="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson1.png.4e8cd1e0ed49fdee8d7c27b7db293732.png" rel=""><img alt="AdHocJson1.png.4e8cd1e0ed49fdee8d7c27b7db293732.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89462" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson1.png.4e8cd1e0ed49fdee8d7c27b7db293732.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="89464" href="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson2.png.cc2a2dd6c349c3be55e8fa2153246b22.png" rel=""><img alt="AdHocJson2.png.cc2a2dd6c349c3be55e8fa2153246b22.png" class="ipsImage ipsImage_thumbnailed" data-fileid="89464" style="height:auto;" src="//media.invisioncic.com/i328763/monthly_2016_02/AdHocJson2.png.cc2a2dd6c349c3be55e8fa2153246b22.png" loading="lazy"></a>
</p>

<p>
	<a class="ipsAttachLink" data-fileext="zip" data-fileid="130403" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=130403&amp;key=86c91c9481b20025761b8dd04840728a" rel="">jsonreportgeneratormaterial.zip</a>
</p>
]]></description><guid isPermaLink="false">2149</guid><pubDate>Thu, 04 Feb 2016 11:49:25 +0000</pubDate></item><item><title>How to display a custom error message in JasperReports Server</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-display-custom-error-message-jasperreports-server/</link><description><![CDATA[<h2>
	Problem
</h2>

<p>
	Although you can configure the server to <a href="https://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v790/hiding-stack-trace-messages" rel="">hide stack traces</a>, you might want to display a user-friendly message when there are any errors on the server, for example when you run a report and its data source is unavailable.
</p>

<h2>
	Solution 6.4 and later
</h2>

<p>
	On 6.4 and later versions, set <em>generic.error.message</em> as per the documentation linked above.
</p>

<h2>
	Solution 6.3 and earlier
</h2>

<p>
	On 6.3 and earlier versions, a simple way to accomplish the above is editing <strong><em>.../WEB-INF/jsp/modules/system/errorPage.jsp</em></strong>, which does <u>not</u> require you to restart the server.
</p>

<p>
	For example, this is an excerpt of the content you will find by default on 6.2.0:
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted">
 </pre>

<div>
	
		<h3>
			 
		</h3>

		<div>
			  
		</div>
	
</div>

<div>
	<h3>
		 
	</h3>

	<div>
		 
	</div>
	[/code]

	<p>
		You might replace that with something like this:
	</p>

	<pre class="ipsCode prettyprint lang-html prettyprinted">
 </pre>

	<div>
		
			<h3>
				 
			</h3>

			<div>
				  
			</div>
		
	</div>

	<div>
		<h3>
			An unexpected issue occurred
		</h3>

		<div>
			Please contact support@example.com if the issue persists.
		</div>
		[/code]

		<p>
			Unless you are already hiding the stack traces as per the documentation linked above, you might also want to remove all this part:
		</p>

		<pre class="ipsCode prettyprint lang-html prettyprinted">                     
                            
                                
                                
                                    
                                        </pre><div class="swipeScroll" style="height:480px;border-top:solid 1px #ccc;padding-top:12px;"><div style="padding-bottom:350px;"><h3></h3>
<div style="white-space:normal;">${stackTrace}</div></div>
                                        </div>
                                    
                                
                            
                    


		<div style="height:480px;border-top:solid 1px #ccc;padding-top:12px;">
			<div style="padding-bottom:350px;">
				<h3>
					 
				</h3>

				<div style="white-space:normal;">
					${stackTrace}
				</div>
			</div>
		</div>
	</div>
	[/code]

	<p>
		It is recommended to back up the original <strong><em>errorPage.jsp</em></strong> before making any changes and to keep track of the customization via <em>change management</em>.
	</p>
</div>
]]></description><guid isPermaLink="false">2148</guid><pubDate>Wed, 03 Feb 2016 17:46:40 +0000</pubDate></item><item><title>No column headers get printed when there is no data in the adhoc report while exporting it into the CSV format.</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/no-column-headers-get-printed-when-there-no-data-adhoc-report-while-exporting-it-csv-format/</link><description><![CDATA[
<p><img src="https://media.invisioncic.com/i328763/monthly_2023_10/column_headers_rendered.jpg.a2a3d8f78823c1a56e1dc0918fa29287.jpg" /></p>
<p>
	<br />
	<strong><span style="font-size:14px;">Problem Statement:</span></strong>
</p>

<p>
	<span style="font-size:14px;">Why is there no header in an export (in CSV format) from Ad Hoc Report when there is no data?</span>
</p>

<p>
	<strong><span style="font-size:14px;">Solution:</span></strong>
</p>

<p>
	<span style="font-size:14px;">By default, there is no data in the adhoc report, export of the report appears to be empty without headers. It is an expected behaviour.</span>
</p>

<p>
	<span style="font-size:14px;">However, you want to get the column headers for the no data, we can achieve it using the certain modifications.</span>
</p>

<p>
	<span style="font-size:14px;">Please follow the below steps for more details:</span>
</p>

<p>
	<span style="font-size:14px;">    1. Edit any of the report templates in Jaspersoft Studio. For reference, I have edited the Actual size template. It can be found at the public/Template Repository.<br />
	    2. Edit the When No Data Type Property to "All Section No Detail". Please refer to the attached screenshot (Edit_Report_Property.jpg) for more details.<br />
	    3. Publish this report template to the JasperReports Server to reflect the Changes.<br />
	    4. On the JasperReports Server, create the Report for the existing ad hoc view.<br />
	    5. When you load the report, you can see that only column headers will get rendered on the screen. Please refer to Column_headers_rendered.jpg for more details.<br />
	    6. When you exported this ad hoc view report into csv format, you will find that only column headers got printed. Please see the attached CSV file for reference. <br />
	    </span><br />
	<em><span style="font-size:11px;">Ref Case: #02192705    </span></em>
</p>

<p>
	<a class="ipsAttachLink" data-fileext="csv" data-fileid="130933" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=130933&amp;key=58105520cd240b77517e5701dccdda8a" rel="">report_with_column_headers.csv</a>
</p>
]]></description><guid isPermaLink="false">4591</guid><pubDate>Thu, 12 Oct 2023 20:13:14 +0000</pubDate></item><item><title>Invoking a DB procedure with Arraylist as an input parameter</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/invoking-db-procedure-arraylist-input-parameter/</link><description><![CDATA[<h3>
	Requirement: 
</h3>

<p>
	Can we invoke an Oracle DB procedure where the input parameter or the DB procedure is an array (a table from a DB perspective)? The Class type here is set as Collection. 
</p>

<h3>
	Resolution: 
</h3>

<p>
	<strong>Short answer:</strong> The use of arrays is not standard and not supported in JasperReports when working with stored procedures input parameters. At this point the user would have two options:
</p>

<p>
	1. Create a custom QueryExecuter extending the JRJdbcQueryExecuter
</p>

<p>
	2. Modify the stored procedure accepting data in a different format other than an array 
</p>

<p>
	Both options are not trivial.
</p>

<p>
	<strong>More detailed answer:</strong> There is no way today in JasperReports to pass an array as an input parameter of a stored procedure. The java.sql.Array type is designed to be implemented by a specific JDBC driver and used to read data from a ResultSet more than set a stored procedure input parameter.
</p>

<p>
	Anyway, this article describes the procedure to set an array of custom table records as input parameters for a stored procedure:
</p>

<p>
	<a href="https://forums.oracle.com/ords/apexds/post/how-to-pass-a-array-of-object-to-oracle-stored-procedure-9728" rel="external nofollow">https://forums.oracle.com/ords/apexds/post/how-to-pass-a-array-of-object-to-oracle-stored-procedure-9728</a>
</p>

<p>
	The process requires several steps that are very Oracle-specific, like the creation of the array to be passed to the stored procedure, based on the specific array type:
</p>

<p>
	StructDescriptor structDescriptor = new StructDescriptor(
</p>

<p>
	"APPS.DEPARTMENT_TYPE", connection);e s
</p>

<p>
	 
</p>

<p>
	STRUCT priceStruct = new STRUCT(structDescriptor, connection, dep);
</p>

<p>
	 
</p>

<p>
	STRUCT[] priceArray = { priceStruct };
</p>

<p>
	 
</p>

<p>
	ArrayDescriptor arrayDescriptor = ArrayDescriptor.createDescriptor(
</p>

<p>
	"APPS.DEPT_ARRAY", connection);
</p>

<p>
	 
</p>

<p>
	ARRAY array = new ARRAY(arrayDescriptor, connection, priceArray); 
</p>

<p>
	and the assignment of the parameter to the OracleCallableStatement:
</p>

<p>
	((OracleCallableStatement) callStatement).setArray(1, array); 
</p>

<p>
	Please note that there is no setArray() method on standard java.sql.CallableStatement, to confirm that this would work only in Oracle.
</p>

<p>
	The plsql query executer today simply adds the ability to use a cursor returned as an output parameter from an Oracle Stored Procedure to read the data for the report. Other databases return this cursor directly without requiring an output parameter, without requiring a specific feature.
</p>

<p>
	If the user decides to implement a custom query executer, the user would have to add support for Array type of parameters and implement the code to translate the Collection of objects into the exact STRUCT format required, as per the example provided above.
</p>
]]></description><guid isPermaLink="false">4572</guid><pubDate>Mon, 04 Sep 2023 01:15:45 +0000</pubDate></item><item><title>How To Use PostgreSQL JSON data in Ad Hoc View</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-use-postgresql-json-data-ad-hoc-view/</link><description><![CDATA[<h2>
	Issue Description
</h2>

<p>
	Customer has a requirement to create an Ad Hoc View based on PostgreSQL datasource which included JSON data type.
</p>

<p>
	When he adds the JSON field into Ad Hoc View Table as a Column, an error appears:
</p>

<pre>Exception executing database query. Please contact your administrator.  See application log for additional details. 42883 ERROR: could not identify an equality operator for type json[/code]</pre>

<p>
	Is there a way to use PostgreSQL JSON data in Ad Hoc View?
</p>

<hr />
<h2>
	Resolution
</h2>

<p>
	The error caused by ORDER BY clause added to generated SQL like
</p>

<pre>select "id","info"from "public"."orders_json"order by "info" nulls firstlimit 1000[/code]</pre>

<p>
	which can not be applied to JSON object directly.
</p>

<p>
	There is an enhancement request to implement support for JSON nested fields in Ad Hoc Views and Domains, internal #JS-33110
</p>

<p>
	Until the request implemented, a possible workaround is to create a Domain derived table to 'convert' JSON type into Text data like:
</p>

<pre>select "id", "info"::Text from "public"."orders_json"[/code]</pre>

<p>
	and then use derived table field to create an Ad Hoc View. The data will be displayed like
</p>

<pre>{ "customer": "John Doe", "items": {"product": "Beer","qty": 6}}[/code]</pre>

<p>
	Solution tested with TIBCO JasperReports<sup>®</sup> Server v.7.2.0
</p>

<hr />
<p>
	<em><strong>AS-20200501, case 01852384</strong></em>
</p>
]]></description><guid isPermaLink="false">3789</guid><pubDate>Fri, 01 May 2020 12:37:07 +0000</pubDate></item><item><title>Removing the Gear icon within charts from JRS while rendering the adhoc reports on UI.</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/removing-gear-icon-within-charts-jrs-while-rendering-adhoc-reports-ui/</link><description><![CDATA[
<p><img src="https://media.invisioncic.com/i328763/monthly_2023_10/gear_icon_removed.jpg.81410d8150d57423334bc917d882c1ee.jpg" /></p>
<p>
	<u><strong><span style="font-size:16px;">Problem Statement:</span></strong></u>
</p>

<p>
	<br />
	<span style="font-size:14px;">When the user views the report on the UI in the format of a chart, they can see the gear icon. It allows you to change the visualisation type during runtime. How do I remove it?</span>
</p>

<p>
	<u><strong><span style="font-size:16px;">Solution:</span></strong></u><br />
	<br />
	<span style="font-size:14px;">Please add the below line to the jasperreports.properties file. This file is found in the &lt;jasperserver-pro&gt;/WEB-INF/classes directory.<br />
	    com.jaspersoft.jasperreports.highcharts.interactive=false</span>
</p>

<p>
	<span style="font-size:14px;">-- Before you make the changes, please stop the server, make the changes, save it, and restart the server.</span>
</p>

<p>
	<span style="font-size:14px;">Once you made the changes, you could see the gear icon is removed successfully. </span>
</p>

<p>
	 
</p>

<p>
	<span style="font-size:10px;">Ref Case: #02213742</span>
</p>
]]></description><guid isPermaLink="false">4580</guid><pubDate>Tue, 10 Oct 2023 19:03:02 +0000</pubDate></item><item><title>Hiding the Apache Tomcat version in the case of an HTTP 404 error page</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/hiding-apache-tomcat-version-case-http-404-error-page/</link><description><![CDATA[
<p><img src="https://media.invisioncic.com/i328763/monthly_2023_10/hide_tomcat_version.jpg.5788a0b4386c13903c4eff382901956e.jpg" /></p>
<p>
	 
</p>

<p>
	<span style="font-size:14px;"><strong>Problem:</strong><br />
	When a 404 error occurs on Tomcat, it is disclosing the Tomcat version. How can users hide it?</span>
</p>

<p>
	<span style="font-size:14px;"><strong>Solution:</strong><br />
	Please perform the below steps to hide the tomcat version in case of 404 error:<br />
	     <br />
	    1. Stop the Tomcat Server.</span>
</p>

<p>
	<span style="font-size:14px;">    2. Navigate to the Tomcat/lib folder.<br />
	    3. Within the lib folder, please create the nested subfolders as org --&gt; apache --&gt; catalina --&gt; util<br />
	    4. Within the Tomcat/lib/org/apache/catalina/util folder, create a file named 'ServerInfo.properties'.<br />
	    5. Edit this new file and add the below line:</span>
</p>

<p>
	<span style="font-size:14px;">        <em>server.info=Application Server</em></span>
</p>

<p>
	<span style="font-size:14px;">    6. Save the file and restart Tomcat.</span>
</p>

<p>
	<span style="font-size:14px;">Once you restarted the server, instead of the Tomcat version, you could see the message as 'Application Server'. Please refer to the attached screenshot for more details.</span>
</p>

<p>
	<strong><em><span style="font-size:11px;">Ref Case: #02205570</span></em></strong>
</p>
]]></description><guid isPermaLink="false">4589</guid><pubDate>Thu, 12 Oct 2023 19:38:09 +0000</pubDate></item><item><title>Is it possible to change the number of days before the license expiration warning appears?</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/it-possible-change-number-days-license-expiration-warning-appears/</link><description><![CDATA[<h3>
	Requirement: 
</h3>

<p>
	Is it possible to change the number of days before expiration via configuration for the expiration warning that comes up 15 days before a license is about to expire?
</p>

<h3>
	Resolution:
</h3>

<p>
	This value is hardcoded in the JasperServer LicenseManager code. However, this is not exposed due to its sensitive nature. If you still want to change the value you can contact Jaspersoft support who can assist you with the same. 
</p>
]]></description><guid isPermaLink="false">4604</guid><pubDate>Wed, 01 Nov 2023 06:49:16 +0000</pubDate></item><item><title>Getting error  'contextPath needs to be an absolute path'</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/getting-error-contextpath-needs-be-absolute-path/</link><description><![CDATA[<h3>
	Error Description: 
</h3>

<p>
	While running a studio report that contains a sub-report and a logo in the subreport. When this report is published to JasperServer and run we get an error - 
</p>

<p>
	 'contextPath needs to be an absolute path'
</p>

<h3>
	Solution: 
</h3>

<p>
	One possible reason for this error is, that the standard setup is to keep report resources like subreports and images in the JRS repository and not on the server filesystem. So when resources are kept in the FileSystem and not the repository this error is seen. 
</p>

<p>
	To resolve this, we would need to add the subreport in the repository instead of the file system. 
</p>
]]></description><guid isPermaLink="false">4603</guid><pubDate>Wed, 01 Nov 2023 06:35:11 +0000</pubDate></item><item><title>Highcharts.xsd Not Loading in Jaspersoft Studio</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/highchartsxsd-not-loading-jaspersoft-studio/</link><description><![CDATA[<table border="0" cellpadding="0" cellspacing="0" style="width:100%;">
	<tbody>
		<tr>
			<td style="width:50%;text-align:left;vertical-align:middle;">
				<h2>
					Issue:
				</h2>

				<p>
					When generating reports in Jaspersoft Studio when using a highchart, you may get the following error:<br />
					 
				</p>
			</td>
			<td style="width:50%;text-align:left;vertical-align:middle;">
				[toc]
			</td>
		</tr>
	</tbody>
</table>

<pre style="padding:1em;background-color:#F8F8F8;line-height:1.3;font-size:12px;">net.sf.jasperreports.engine.JRRuntimeException: Unknown entity <a href="http://jaspersoft.com/schema/highcharts.xsd%C2%A0," rel="external nofollow">http://jaspersoft.com/schema/highcharts.xsd ,</a> not loading. at net.sf.jasperreports.engine.xml.JRXmlDigester.resolveEntity (JRXmlDigester.java:232) at com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity (EntityResolverWrapper.java:110) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity (XMLEntityManager.java:1081) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument (XMLSchemaLoader.java:654) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar (XMLSchemaValidator.java:2431) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement (XMLSchemaValidator.java:1768) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement (XMLSchemaValidator.java:741) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement (XMLNSDocumentScannerImpl.java:374) com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl at $ FragmentContentDriver.next (XMLDocumentFragmentScannerImpl.java:2784) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (XMLDocumentScannerImpl.java:602) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (XMLNSDocumentScannerImpl.java:112) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:505) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:842) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:771) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1213) com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl at $ JAXPSAXParser.parse (SAXParserImpl.java:643) at org.apache.commons.digester.Digester.parse (Digester.java:1892) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML (JRXmlLoader.java:298) at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML (JRXmlLoader.java:285) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:274) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:219) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:194) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:185) at net.sf.jasperreports.engine.JasperCompileManager.compile (JasperCompileManager.java:288) at net.sf.jasperreports.engine.JasperCompileManager.compileReport (JasperCompileManager.java:575) at com.cybersaint.report.listener.ReportOneReceiver.receiveMessage (ReportOneReceiver.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.springframework.util.MethodInvoker.invoke (MethodInvoker.java:280) at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.invokeListenerMethod (MessageListenerAdapter.java:372) at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.onMessage (MessageListenerAdapter.java:298) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener (AbstractMessageListenerContainer.java:1414) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener (AbstractMessageListenerContainer.java:1337) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener (AbstractMessageListenerContainer.java:1324) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener (AbstractMessageListenerContainer.java:1303) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute (SimpleMessageListenerContainer.java:785) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute (SimpleMessageListenerContainer.java:769) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access at $ 700 (SimpleMessageListenerContainer.java:77) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer at $ AsyncMessageProcessingConsumer.run (SimpleMessageListenerContainer.java:1010) at java.lang.Thread.run (Thread.java:748) [/code]</pre>

<h2>
	Solution:
</h2>

<p>
	This is due to Highcharts only available in the commercial version of Jaspersoft Studio and JasperReports Server. Jaspersoft Studio will automatically disable the commercial features if a commercial license is not applied within 30 days of installation. If you have a commercial license, you can point you current active license to Jaspersoft Studio.
</p>

<hr />
<p>
	<em><strong>ref: 01585054</strong></em>
</p>
]]></description><guid isPermaLink="false">3028</guid><pubDate>Mon, 25 Jun 2018 20:11:58 +0000</pubDate></item><item><title>org.apache.catalina.LifecycleException during upgrade to JRS v8.0</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/orgapachecatalinalifecycleexception-during-upgrade-jrs-v80/</link><description><![CDATA[<p>
	<strong>Problem Description:</strong>
</p>

<p>
	If you see the following error during upgrading to v8.0, try the solution below.
</p>

<p>
	22-Apr-2022 01:37:54.192 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [standardEngine[Catalina].StandardHost[localhost].StandardContext[/jasperserver]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering. at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2205) at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2164) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1083) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5130) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 10 more
</p>

<p>
	<strong>Solution:</strong>
</p>

<p>
	Add &lt;absolute-ordering /&gt; in web.xml right under &lt;display-name&gt;: &lt;display-name&gt;JasperServer UI application&lt;/display-name&gt; &lt;absolute-ordering /&gt;
</p>
]]></description><guid isPermaLink="false">4292</guid><pubDate>Wed, 27 Apr 2022 18:43:20 +0000</pubDate></item></channel></rss>
