<?xml version="1.0"?>
<rss version="2.0"><channel><title>Knowledge Base: Best Practices</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/page/26/?d=6</link><description>Knowledge Base: Best Practices</description><language>en</language><item><title>HTML5 Chart Series Colouring by Value</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/html5-chart-series-colouring-value/</link><description><![CDATA[<h2>
	Issue Question:
</h2>

<p>
	Using HTML5 charts in JasperReports version 5.x., how do I color my chart series based upon the values in my dataset without ordering my query?   For example, an answer of "no" should be RED, "yes" should be green, like:
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="JPG" data-fileid="87137" href="//media.invisioncic.com/i328763/monthly_2013_08/hc_color_series_capture.JPG.e24c71dbcdc80bf836beb526e433e8d7.JPG" rel=""><img alt="hc_color_series_capture.JPG.e24c71dbcdc80bf836beb526e433e8d7.JPG" class="ipsImage ipsImage_thumbnailed" data-fileid="87137" style="height: auto;" src="//media.invisioncic.com/i328763/monthly_2013_08/hc_color_series_capture.JPG.e24c71dbcdc80bf836beb526e433e8d7.JPG" loading="lazy"></a>
</p>

<h2>
	Resolution:
</h2>

<p>
	You can set series color as an axis level property, then in the Advanced Properties of your measure, add a Series Property Contributor with the name "color", which is the highcharts series property name, and specify a bucket property value of [axis level name].[property name].
</p>

<p>
	See the attached example, hc_series_color.jrxml, suitable for version 5.1 or higher, and reference our sample "foodmart" database as your datasource.
</p>

<p>
	<a class="ipsAttachLink" data-fileid="130057" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=130057&amp;key=ecda83bef0d08cac0e3196c7f375aaed" data-fileext="txt" rel="">hc_series_color.jrxml.txt</a>
</p>

<hr>
<p>
	Ref. Case #00034523
</p>

<p><a class="ipsAttachLink" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=130183&amp;key=c59fe28bf0fa624fae22865716d72e46" data-fileext="jrxml" data-fileid="130183" data-filekey="c59fe28bf0fa624fae22865716d72e46">hc_series_color.jrxml</a></p>]]></description><guid isPermaLink="false">1180</guid><pubDate>Tue, 20 Aug 2013 23:21:40 +0000</pubDate></item><item><title>How to use Customizer Class to change the behavior of Multi Axis chart</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-use-customizer-class-change-behavior-multi-axis-chart/</link><description><![CDATA[<table cellpadding="0" cellspacing="0" style="width:100%;"><tbody><tr><td><p>In this article I want to describe how to customize the standard behavior of Multi Axis chart.</p><h2>Example 1:</h2><p>We have a Multi Axis chart which in turn contains a stacked area chart and a couple of line charts in the order that is shown on the picture below:</p></td><td style="text-align:left;vertical-align:middle;">[toc]</td></tr></tbody></table><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/charts_disposition.png.1039d4d12a5d9ab86b49d3fc294c4f06.png" data-fileid="86396" data-fileext="png" rel=""><img data-fileid="86396" class="ipsImage ipsImage_thumbnailed" alt="charts_disposition.png.1039d4d12a5d9ab86b49d3fc294c4f06.png" src="//media.invisioncic.com/i328763/monthly_2013_02/charts_disposition.png.1039d4d12a5d9ab86b49d3fc294c4f06.png" loading="lazy"></a></p><p>You may ask - so what? What kind of issue may cause such disposition of the sub charts in Multi Axis chart?</p><p>Lets execute this report and check the results of this execution:</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/overlapping_1.png.a9947b4a960ab3748d0aec9656fb446c.png" data-fileid="86397" data-fileext="png" rel=""><img data-fileid="86397" class="ipsImage ipsImage_thumbnailed" alt="overlapping_1.png.a9947b4a960ab3748d0aec9656fb446c.png" src="//media.invisioncic.com/i328763/monthly_2013_02/overlapping_1.png.a9947b4a960ab3748d0aec9656fb446c.png" loading="lazy"></a></p><p>As you can see from the picture below some parts of Stacked Area chart overlap the Line charts, but you can still clearly interpret the information that was shown in the chart.</p><h2>Example 2:</h2><p>Stacked area charts are filled in with the values that are very close to the maximum values and they fill almost all the space in the chart:</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/overlapping_2.png.05cd2d79e351b953ddfb4653efca8caa.png" data-fileid="86398" data-fileext="png" rel=""><img data-fileid="86398" class="ipsImage ipsImage_thumbnailed" alt="overlapping_2.png.05cd2d79e351b953ddfb4653efca8caa.png" src="//media.invisioncic.com/i328763/monthly_2013_02/overlapping_2.png.05cd2d79e351b953ddfb4653efca8caa.png" loading="lazy"></a></p><p>Such visualization of the data is not so convenient becuse it's not possible to analyze the information that was represented with the Line Charts.</p><p>What can we do to change the behavior of the Line Charts in this situation?</p><p>One of the possible solutions is to write the Java code that implements the Customizer class that should change the behavior of the Line Charts(I mean show them infront of Stacked Area chart).</p><p>Below I quote the source code of such class (MultiAxisOrderCustomizer.java) which was kindly provided to me by one of our leading developers:</p><pre class="ipsCode prettyprint lang-auto prettyprinted">import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.DatasetRenderingOrder;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.XYPlot;

import net.sf.jasperreports.engine.JRAbstractChartCustomizer;
import net.sf.jasperreports.engine.JRChart;

public class MultiAxisOrderCustomizer extends JRAbstractChartCustomizer {
    @Override
    public void customize(JFreeChart chart, JRChart jasperChart) {
        Plot plot = chart.getPlot();
        if (plot instanceof CategoryPlot) {
            ((CategoryPlot) plot).setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
        } else if (plot instanceof XYPlot) {
            ((XYPlot) plot).setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
        }
    }
}
</pre><p>To use this Customizer Class in the report</p><ol><li><p>give the path to this class in iReport designer</p></li><li><p>fill in the name of this class in the Multi Axis chart/Customizer Class property</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/iReport_setup.png.fc8b8dc8936b938e14c2d850decdbfed.png" data-fileid="86400" data-fileext="png" rel=""><img data-fileid="86400" class="ipsImage ipsImage_thumbnailed" alt="iReport_setup.png.fc8b8dc8936b938e14c2d850decdbfed.png" src="//media.invisioncic.com/i328763/monthly_2013_02/iReport_setup.png.fc8b8dc8936b938e14c2d850decdbfed.png" loading="lazy"></a></p></li></ol><p>Let's check the behavior of the charts after the we have applied the adjustmens that should integrate the MultiAxisOrderCustomizer in our report:</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/report_runtime.png.bf8297085d5fd3186576eeb750e4edad.png" data-fileid="86401" data-fileext="png" rel=""><img data-fileid="86401" class="ipsImage ipsImage_thumbnailed" alt="report_runtime.png.bf8297085d5fd3186576eeb750e4edad.png" src="//media.invisioncic.com/i328763/monthly_2013_02/report_runtime.png.bf8297085d5fd3186576eeb750e4edad.png" loading="lazy"></a></p><p>In the picture above the two line charts are shown in front of Stacked Area chart.</p><h2>How to compile the source code (Windows 7)</h2><ol><li><p>Download Java JDK from the Oracle site</p></li><li><p>Run the windows console by executing the cmd command</p></li><li><p>In the windows command line, define the JAVA_HOME variable. You can do this by executing the command that I quote below</p><pre class="ipsCode prettyprint lang-javascript prettyprinted">set JAVA_HOME=c:&lt;path to Java JDK&gt;java
</pre></li><li><p>Add JAVA_HOME variable to the windows PATH variable</p><pre class="ipsCode prettyprint lang-javascript prettyprinted">set PATH=%JAVA_HOME%bin
</pre></li><li><p>Compile the <em><span style="color:#696969;">MultiAxisOrderCustomizer</span></em> (to compile this file you need two Java libraries: <em><span style="color:#696969;">jfreechart.jar</span></em> and <span style="color:#696969;"><em>jasperreports.jar</em></span>)</p><p>In my test environment was installed JasperReports Server v5.0. This distribution contains both libraries in its lib folder.</p><p>I gave the path to these libraries in javac compiler via the -classpath key as shown below:</p><pre class="ipsCode prettyprint lang-javascript prettyprinted">javac -classpath C:jaspersjrs_500apache-tomcatwebappsjasperserver-proWEB-INFlibjfreechart-1.0.12.jar;C:jaspersjrs_500apache-tomcatwebappsjasperserver-proWEB-INFlibjasperreports-5.0.0.jar MultiAxisOrderCustomizer.java
</pre><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/console_output.png.202f97dacca12770a1069d6d30ce8c35.png" data-fileid="86402" data-fileext="png" rel=""><img data-fileid="86402" class="ipsImage ipsImage_thumbnailed" alt="console_output.png.202f97dacca12770a1069d6d30ce8c35.png" src="//media.invisioncic.com/i328763/monthly_2013_02/console_output.png.202f97dacca12770a1069d6d30ce8c35.png" loading="lazy"></a></p><p>If everything is ok you should find <span style="color:#696969;"><em>MultiAxisOrderCustomizer.class</em></span> file in the same directory with <em><span style="color:#696969;">MultiAxisOrderCustomizer.java</span></em> file.</p></li></ol><p>Please find in the attachment, <a href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=86404" data-fileid="86404" data-fileext="zip" rel="">files.zip</a>:</p><ul><li>MultipleAxisChartReport.jrxml report (this report is based on Sugarcrm database that is supplied with JasperReports Server)</li><li>MultiAxisOrderCustomizer.java</li><li>MultiAxisOrderCustomizer.class</li><li>jfreechart-1.0.12.jar</li><li>jasperreports-5.0.0.jar</li></ul><p>Thats all. Thank you for your attention to this article :).</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/overlapping_2.png.a2eacfdee2fdb55d5db27b401f82ff30.png" data-fileid="86399" data-fileext="png" rel=""><img data-fileid="86399" class="ipsImage ipsImage_thumbnailed" alt="overlapping_2.png.a2eacfdee2fdb55d5db27b401f82ff30.png" src="//media.invisioncic.com/i328763/monthly_2013_02/overlapping_2.png.a2eacfdee2fdb55d5db27b401f82ff30.png" loading="lazy"></a></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/console_output.png.c799c15455d86d158ee5366a6db4cd23.png" data-fileid="86403" data-fileext="png" rel=""><img data-fileid="86403" class="ipsImage ipsImage_thumbnailed" alt="console_output.png.c799c15455d86d158ee5366a6db4cd23.png" src="//media.invisioncic.com/i328763/monthly_2013_02/console_output.png.c799c15455d86d158ee5366a6db4cd23.png" loading="lazy"></a></p>
<p><a class="ipsAttachLink" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=130113&amp;key=1763a97153ada709ca4b0581e3bfaea3" data-fileext="zip" data-fileid="130113" data-filekey="1763a97153ada709ca4b0581e3bfaea3">files.zip</a></p>]]></description><guid isPermaLink="false">940</guid><pubDate>Thu, 28 Feb 2013 17:45:03 +0000</pubDate></item><item><title>How to change default summary function in Domain Designer?</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-change-default-summary-function-domain-designer/</link><description><![CDATA[<table cellpadding="0" cellspacing="0" style="width:100%;"><tbody><tr><td style="text-align:left;vertical-align:middle;width:50%;"><h2>Issue:</h2><p>In some use cases default aggregation function in domain designer is set to "None". In some rare cases, if you need to edit many fields, you may want to change the default aggregation function selected in UI:</p></td><td style="text-align:left;vertical-align:middle;">[toc]</td></tr></tbody></table><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_07/defaultAggregate.png.c13f88ae202331b85d012dc6d53bc005.png" data-fileid="87115" data-fileext="png" rel=""><img data-fileid="87115" class="ipsImage ipsImage_thumbnailed" alt="defaultAggregate.png.c13f88ae202331b85d012dc6d53bc005.png" src="//media.invisioncic.com/i328763/monthly_2013_07/defaultAggregate.png.c13f88ae202331b85d012dc6d53bc005.png" loading="lazy"></a></p><hr><h2>Resolution:</h2><p>In order to change it, find file /domain.designer.display.js. Locate the lines:</p><pre class="ipsCode prettyprint lang-javascript prettyprinted">if (!item.isParent()) {
    metanode.extra['dataType'] = item.param.extra.JavaType,
    metanode.extra['defaultAgg'] = 'none',
    metanode.extra['defaultMask'] = 'none'
}
</pre><p>Change metanode.extra['defaultAgg'], for example, to this:</p><pre class="ipsCode prettyprint lang-javascript prettyprinted">metanode.extra['defaultAgg'] = 'Average',
</pre><p>You will need to refresh your page.</p><p>Note that this is only a UI setting, and won't change your domain. It is relevant only when selecting Measures.</p><p> </p><p> </p>]]></description><guid isPermaLink="false">1162</guid><pubDate>Mon, 29 Jul 2013 10:54:45 +0000</pubDate></item><item><title>How to execute the Oracle Stored Procedure in jasper report in Web Application environment</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-execute-oracle-stored-procedure-jasper-report-web-application-environment/</link><description><![CDATA[<p>This article builds on top of the following article: <a href="/node/802118" rel="">How to execute the Oracle Stored Procedure in jasper report in iReport editor environment</a></p><p>As a new developer who is on a learning curve of using Jasper Reports in web applications, you will discover that there is very limited information about more advanced features of Jasper Reports like calling stored procedures and using ORACLE_REF_CURSOR sa result set.</p><p>And the above linked article does a great job in describing how you go about building report which calls stored procedure and uses ref cursor.</p><p>However once you take this report and deploy it to your web application - you will learn that it will not work in the web application environment.</p><p>This article is the result of hours of research and trial and error attempts to make it work. And I share it with the hope that it will save time and trouble for others going the same route.</p><p>Here are the steps you need to take to make Jasper report work in your web application:</p><ol><li><p>Download JasperReports Library from <a href="http://sourceforge.net/projects/jasperreports/files/jasperreports/" rel="external nofollow">http://sourceforge.net/projects/jasperreports/files/jasperreports/</a></p></li><li><p>Copy jasperreports-{version}.jar, iText-{version}.js1.jar, commons-digester-{version}.jar and groovy-all-{version}.jar under your web application lib folder (WEB-INF/lib).</p></li><li><p>Download JasperReports Extension Library from <a href="http://www.java2s.com/Code/Jar/j/Downloadjasperreportsextensions353jar.htm" rel="external nofollow">http://www.java2s.com/Code/Jar/j/Downloadjasperreportsextensions353jar.htm</a>;</p></li></ol><p>Then unzip and copy jasperreports-extensions-3.5.3.jar under your web application lib folder (WEB-INF/lib).</p><p><em><strong>NOTE:</strong></em> You will need this extension library in order to execute plsql calls to stored procedure and without this extension your report which calls stored procedure will not work.</p><p>Then as an example of web application code to create and return PDF report will look something like this:</p><pre class='ipsCode prettyprint lang-auto prettyprinted'>try {
   // Custom code to get DB Connection
   Connection conn = getDataSource().getConnection();

   // This will be output PDF stream
   ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

   // You will need to specify relative path to your Jasper report:
   URL fileUrl = getClass().getClassLoader().getResource("path to report.jasper");

   JasperReport jasperReport = (JasperReport) JRLoader.loadObject(fileUrl);

   /* This line sets correct factory to parse and process PLSQL procedure calls.
      The PlSqlQueryExecuterFactory class is located in jasperreports-extensions-3.5.3.jar */

   jasperReport.setProperty( "net.sf.jasperreports.query.executer.factory.plsql"
                            ,"com.jaspersoft.jrx.query.PlSqlQueryExecuterFactory");

   /* You may need to execute following line just once in your application.
     You can try to move it into initialization or static code block.
     Also you may notice that line below is marked as deprecated. 
     However in my case the export to pdf fails without this line being executed. */

   JRProperties.setProperty( JRQueryExecuterFactory.QUERY_EXECUTER_FACTORY_PREFIX+"plsql"
                           ,"com.jaspersoft.jrx.query.PlSqlQueryExecuterFactory");

   /* Prepare Jasper print and exporter objects in lines below */

   JasperPrint print = JasperFillManager.fillReport(jasperReport, params, conn);
   JRExporter exporter = new JRPdfExporter();
   exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);
   exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
   exporter.exportReport();     // Generate PDF report
   return outputStream;         // Return stream result to your application code
                                // to wrap in response object.
}
catch (Exception ex) {
   log.severe("Exception loading pdf: " + ex.getMessage());
}
</pre><p>This should be all you need. If you find this article useful - please mark it as such.</p><p>- Eugene Luzgin (<a href="mailto:eluzgin@gmail.com" rel="">eluzgin@gmail.com</a>)</p>]]></description><guid isPermaLink="false">1040</guid><pubDate>Mon, 29 Apr 2013 21:04:29 +0000</pubDate></item><item><title>URLs to access JasperReports Server content</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/urls-access-jasperreports-server-content/</link><description><![CDATA[<p></p><h2>Premise:</h2><p>You have a functioning JasperResports Server. You want to access content from it without using the JasperResports Server web UI.</p><h2>Possibilities:</h2><p>To run a report with just a url and not using web services, you can do something like this:</p><p style="margin-left:40px;"><a href="http://gazelle.jaspersoft.com:8090/jasperserver-pro/flow.html?_flowId=viewReportFlow&amp;reportUnit=/reports/Heartbeat/DatasourceDatabases" rel="external nofollow">http://gazelle.jaspersoft.com:8090/jasperserver-pro/flow.html?_flowId=viewReportFlow&amp;reportUnit=/reports/Heartbeat/DatasourceDatabases</a></p><p><a href="http://localhost:8080/jasperserver-pro/flow.html?_flowId=viewReportFlow&amp;reportUnit=/reports/samples/myreport&amp;param1=value1&amp;param2=value2" rel="external nofollow">http://localhost:8080/jasperserver-pro/flow.html?_flowId=viewReportFlow&amp;reportUnit=/reports/samples/myreport¶m1=value1¶m2=value2</a></p><p><a href="http://localhost:8080/jasperserver-pro/flow.html?_flowId=dashboardRuntimeFlow&amp;dashboardResource=/supermart/SupermartDashboard30" rel="external nofollow">http://localhost:8080/jasperserver-pro/flow.html?_flowId=dashboardRuntimeFlow&amp;dashboardResource=/supermart/SupermartDashboard30</a></p><p>To access previously generated content, you can use something like this:</p><p style="margin-left:40px;"><a href="http://localhost:8080/jasperserver-pro/fileview/fileview/contents/AllAccounts.pdf" rel="external nofollow">http://localhost:8080/jasperserver-pro/fileview/fileview/contents/AllAccounts.pdf</a></p><p>(that's right, "fileview" is in the url twice)</p><h2>Anonymous Access:</h2><p>The urls above will of course only work for a logged in user. It's somewhat common to want to expose some set of reports to anonymous users. A page detailing how to do this can be found at:  <a href="/wiki/allow-anonymous-access-reports" rel="">Allow Anonymous Access to Reports</a></p>]]></description><guid isPermaLink="false">84</guid><pubDate>Tue, 27 Apr 2010 16:58:46 +0000</pubDate></item><item><title>Change default value for data chooser adhoc report (domains)</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/change-default-value-data-chooser-adhoc-report-domains/</link><description><![CDATA[<h2>Issue Description:</h2><p>I want to put domains as a default value when i create an adhoc report and choose its data source, but presently a topic has this default value.</p><hr /><h2>Resolution:</h2><p>modify <em><strong><span style="color:#696969;">&lt;js-install&gt;/scripts/adhoc.start.js</span></strong></em></p><p>In the <span style="color:#696969;"><strong><em>initialize</em></strong></span> section of <strong><em><span style="color:#696969;">adhocStart()</span></em></strong>, there is a switch statement that specifies the <strong><em><span style="color:#696969;">default</span></em></strong>  behavior:</p><pre class='ipsCode prettyprint lang-auto prettyprinted'>    /**
     * This is for the initialization of ad Hoc's start page
     */
    initialize : function(){
        dialogs.popup.show($("sourceDialog"), true);
        //get the topic path
        var options;
        var UNSPECIFIED_TOPIC ="unspecifiedTopic";
        if(!defaultTopic){
            this.DefaultTopicsPath = defaultTopicDir + UNSPECIFIED_TOPIC;
        }else{
            this.DefaultTopicsPath = defaultTopicDir + defaultTopic;
        }

        if(!isNotNullORUndefined(this.TopicsTreeContainerId)){
            return;
        }

        switch (window.launchType) {
            case this.DOMAIN_LAUNCH_TYPE:
                this.hideRealmTree(this.DOMAIN);
                this.getDomains();
            break;
            case this.OLAP_CONNECTION_LAUNCH_TYPE:
                this.hideRealmTree(this.OLAP_CONNECTION);
                this.getOlapConnections();
            break;
            default:
                // Fall back to Adhoc Topic
                this.getTopics();
        }
        this.initializeHandlers();
    },

</pre><p>Modify the switch statement to look like this:</p><pre class='ipsCode prettyprint lang-auto prettyprinted'>        switch (window.launchType) {
            case this.DOMAIN_LAUNCH_TYPE:
                this.hideRealmTree(this.DOMAIN);
                this.getDomains();
            break;
            case this.OLAP_CONNECTION_LAUNCH_TYPE:
                this.hideRealmTree(this.OLAP_CONNECTION);
                this.getOlapConnections();
            break;
            default:
                // Fall back to Adhoc Topic
                // this.getTopics();
                this.hideRealmTree(this.DOMAIN);
                this.getDomains();
        }
</pre><p>Restart JasperReports Server</p><p> </p><hr /><p><i><b>Ref. Case #00032221 </b></i></p>]]></description><guid isPermaLink="false">954</guid><pubDate>Wed, 13 Mar 2013 12:58:37 +0000</pubDate></item><item><title>Adding authentication filters and using profile attributes</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/adding-authentication-filters-and-using-profile-attributes/</link><description><![CDATA[<p></p><h2>Introduction</h2><p>The problems we're addressing are:</p><ul><li>How to create a custom authentication filter</li><li>How to create profile attributes with the custom filter</li><li>How to call up the profile attribute when creating a custom data source - when we pull up the attribute values, then we'll be able to take those values and do any extra processing.</li></ul><h2>Overview of Solution</h2><ul><li>Create the custom authentication filter<ul><li>Have it read the request parameters from the URL</li><li>Add the profile attribute values for the parameters used in the User DTO objects</li></ul></li><li>Execute the report<ul><li>Call the report via a URL</li><li>Have the custom data source use the profile attribute values to do extra processing</li></ul></li></ul><h2>Create the custom authentication filter class</h2><ul><li>Have it implement javax.servlet.Filter and org.springframework.beans.factory.InitializingBean</li><li>Implement the doFilter method</li><li>Have it create the profile attributes based on the request parameters<ul><li>Check if the parameter contains values necessary for a User DTO object</li><li>If so, then create a profile attribute based on that key-value pair<p> </p></li></ul><pre class='ipsCode prettyprint lang-auto prettyprinted'>package example.cds.auth;

   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import java.io.IOException;
   import java.util.Iterator;
   import java.util.Map;
   import java.util.Set;
   
   import javax.servlet.Filter;
   import javax.servlet.FilterChain;
   import javax.servlet.FilterConfig;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   
   import org.springframework.beans.factory.InitializingBean;
   import org.springframework.security.Authentication;
   import org.springframework.security.context.SecurityContextHolder;
   
   import com.jaspersoft.jasperserver.api.metadata.user.domain.ProfileAttribute;
   import com.jaspersoft.jasperserver.api.metadata.user.domain.impl.client.MetadataUserDetails;
   import com.jaspersoft.jasperserver.api.metadata.user.service.ProfileAttributeService;
   import com.jaspersoft.jasperserver.api.metadata.user.service.impl.ProfileAttributeServiceImpl;
   
   public class SimpleAuthFilter implements Filter, InitializingBean {
   
       private static Log log = LogFactory.getLog(SimpleAuthFilter.class);
       private static final String [] userAttribs = {"teacherId", "userType","schoolId", "districtId"};
       private ProfileAttributeService profileAttributeService;
   
       public ProfileAttributeService getProfileAttributeService() {
           return profileAttributeService;
       }
   
       public void setProfileAttributeService(
           ProfileAttributeService profileAttributeService) {
           this.profileAttributeService = profileAttributeService;
       }
   
       @Override
       public void afterPropertiesSet() throws Exception {
           // TODO Auto-generated method stub
       }
   
       @Override
       public void destroy() {
           // TODO Auto-generated method stub
       }
   
       @Override
       public void doFilter(ServletRequest request,
                            ServletResponse response,
                            FilterChain chain)
              throws IOException, ServletException {
           // TODO Auto-generated method stub
   
           HttpServletRequest req = (HttpServletRequest) request;
           HttpServletResponse res = (HttpServletResponse) response;
   
           MetadataUserDetails user = null;
           Authentication auth = SecurityContextHolder.getContext().getAuthentication();
           if (auth != null &amp;&amp; auth.getPrincipal() != null) {
               if (auth.getPrincipal() instanceof MetadataUserDetails) {
                   user = (MetadataUserDetails) auth.getPrincipal();
                   Map&lt;String, String[]&gt; map = req.getParameterMap();
   
                   // if teacherId, userType, schoolType or districtId in param map
                   // then add them to profile attribute
                   processReqParams(map, user);
               } else {
                   log.debug("The authentication object was not of the correct type: "
                             + auth.getPrincipal().getClass().getName());
               }
           }
   
           chain.doFilter(req, res);
       }
   
       @Override
       public void init(FilterConfig arg0) throws ServletException {
           // TODO Auto-generated method stub
       }
   
       // This particular method could be greatly improved; for example it could
       // first check for the existence of those attributes before trying to
       // create them, but this is meant as an example
       private void processReqParams(Map&lt;String, String[]&gt; map, MetadataUserDetails user) {
           Set keys = map.keySet();
           Iterator i = keys.iterator();
           while (i.hasNext()) {
               Object o = i.next();
               String key = (String) o;
               String value = (String) map.get(o)[0];
               log.debug("key = " + key + ", value = " + value);
               if (isFromUserDTO(key) == true &amp;&amp; value != null) {
   
                   // Create the profile attribute
                   if (profileAttributeService == null) {
                       log.debug("profileAttributeService is null :(");
                   } else {
                       log.debug("profileAttributeService is not null");
                   }
                   ProfileAttribute attrib = profileAttributeService.newProfileAttribute(null);
                   attrib.setPrincipal(user);
                   attrib.setAttrName(key);
                   attrib.setAttrValue(value);
                   profileAttributeService.putProfileAttribute(null, attrib);
   
               } else {
                   log.debug("The key is not in the UserDTO or the value is null");
               }
           }
       }
   
       private boolean isFromUserDTO(String key) {
           boolean isFromUserDTO = false;
   
           for (String s : userAttribs) {
               if (key.equals(s)) {
                   isFromUserDTO = true;
                   break;
               }
           }
           return isFromUserDTO;
       }
   }
</pre></li></ul><h2>Modify the Spring configuration file</h2><p>Modify the applicationContext-security-web.xml file in the /jasperserver-pro/WEB-INF directory. Add the bean definition and add the bean id to the filterChainProxy. For example, the bean ID definition will look like this:</p><pre class='ipsCode prettyprint lang-xml prettyprinted'>&lt;bean id="SimpleAuthFilter" class="example.cds.auth.SimpleAuthFilter"&gt;
    &lt;property name="profileAttributeService"&gt;
        &lt;ref bean="profileAttributeService" /&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</pre><p>Adding the bean ID to the filterChainProxy will look like this:</p><pre class='ipsCode prettyprint lang-xml prettyprinted'>/**=httpSessionContextIntegrationFilter
    , ${bean.loggingFilter}
    , ${bean.userPreferencesFilter}
    , ${bean.authenticationProcessingFilter}
    , ${bean.userPreferencesFilter}
    , SimpleAuthFilter,${bean.basicProcessingFilter}
    , requestParameterAuthenticationFilter
    , JIAuthenticationSynchronizer
    , anonymousProcessingFilter
    , exceptionTranslationFilter
    , filterInvocationInterceptor
    , switchUserProcessingFilter
</pre><h2>How to add profile attributes</h2><p>I added profile attributes in the processReqParams method above, and it's an example of how to programmatically add profile attributes for a logged-in user. The method calls up the profileAttributeService that was defined for the SimpleAuthFilter bean, which allows us to manipulate profile attributes via the engine. You can verify that the attributes have been written to the database by consulting the <strong>jiprofileattributes</strong> table.</p><h2>How to pull up the profile attributes</h2><p>Once the profile attributes are stored, we can go ahead and pull them up when creating the custom data source object. The process is to:</p><ul><li>Call up the data source constructor</li><li>Within the constructor, call up the current user object</li><li>Get that user's profile attributes</li><li>Do any extra processing at this point with the profile attribute values</li><li>Below you'll find an example of how to pull up the profile attributes data. It's a modified version of the CustomDataSource class that our products ships with, which you can find in the <strong>samples</strong> directory.<p> </p><p></p><pre class='ipsCode prettyprint lang-auto prettyprinted'>public CustomDataSource() {
    MetadataUserDetails user = null;
    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
    if (auth != null &amp;&amp; auth.getPrincipal() != null) {
        if (auth.getPrincipal() instanceof MetadataUserDetails) {
            user = (MetadataUserDetails) auth.getPrincipal();
            // if teacherId, userType, schoolType or districtId in param map
            // then add them to profile attribute
            List attribs = user.getAttributes();
            int size = attribs.size();
            if (size &gt; 0) {
                Iterator i = attribs.iterator();
                while (i.hasNext()) {
                    //String attrib = (String) i.next();
                    ProfileAttributeImpl attrib = (ProfileAttributeImpl) i.next();
                    String attribName = attrib.getAttrName();
                    String attribValue = attrib.getAttrValue();
                    LOG.debug("Attrib: Name = " + attribName + ", Value = " +
                              attribValue);
                }
            }
        } else {
            LOG.debug("The authentication object was not of the correct type: " +
                      auth.getPrincipal().getClass().getName());
        }
    }
}
</pre></li></ul><h2>How to call the report via a URL</h2><p>You can construct a URL such as the one below:</p><p style="margin-left:40px;"><a href="http://localhost:8080/jasperserver-pro/flow.html?_flowId=viewReportFlow&amp;standAlone=true&amp;the_city_distinct=Dallas&amp;userType=teacher&amp;_flowId=viewReportFlow&amp;ParentFolderUri=%2Fpublic&amp;reportUnit=%2Fpublic%2FsampleCDS_Report" rel="external nofollow"><span style="color:#696969;"><em>http://localhost:8080/jasperserver-pro/flow.html?_flowId=viewReportFlow&amp;standAlone=true&amp;the_city_distinct=Dallas&amp;userType=teacher&amp;_flowId=viewReportFlow&amp;ParentFolderUri=%2Fpublic&amp;reportUnit=%2Fpublic%2FsampleCDS_Report </em></span></a></p><p>This URL is based on the Custom data source example that ships with the product:</p><ul><li>"the_city_distinct" is a value that gets fed into an input control. I changed the input control to "not mandatory" and the report executes without bringing up the pop-up window asking the user to populate a value for this parameter</li><li>"userType" is a parameter key I used to simulate an attribute we wish to work with</li><li>You can also add j_username and j_password parameters to perform the authentication as well.</li></ul>]]></description><guid isPermaLink="false">297</guid><pubDate>Thu, 17 Nov 2011 02:50:48 +0000</pubDate></item><item><title>Changing Java options on Windows bundled version of JasperReports Server</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/changing-java-options-windows-bundled-version-jasperreports-server/</link><description><![CDATA[<p>When running Tomcat (standalone) on windows, Java options can typically be set in either service.bat or setenv.bat.  However, if Tomcat is installed as a service (which it is if you've used the bundled installer to install JasperReports Server), you should follow these steps to modify the JVM settings:</p><ol><li><p>Navigate to</p><pre class='ipsCode prettyprint lang-auto prettyprinted'>&lt;jrs_install&gt;/jasperreports-server-&lt;version&gt;/apache-tomcat/bin/
</pre><div></div><p></p></li><li><p>Locate the 'tomcat6w.exe' file and rename it to jasperreportsTomcat.exe.  This needs to match the name of the service.</p></li><li><p>Now simply double click and run the file (you may need to right-click &gt; 'Run as administrator').  This will bring up the Tomcat properties page.</p></li><li><p>Java options can be added/modified/removed in the 'Java' tab.  Once done, restart the service and the settings should take effect.</p></li></ol><p>In versions 5.0.1 and later, you can log in as superuser and run the diagnostic report in /Public/Diagnostic as a quick way to see the current java options and confirm they've taken effect.</p><p>NOTE:  The 32 bit JVM is limited to 2GB total memory.  If you are running the 32 bit version, you will have to be sure your heap and permgen memory do not exceed 2GB.</p>]]></description><guid isPermaLink="false">909</guid><pubDate>Wed, 30 Jan 2013 16:00:04 +0000</pubDate></item><item><title>IBM JVM Garbage Collection Tuning</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/ibm-jvm-garbage-collection-tuning/</link><description><![CDATA[<p></p><h2>Introduction</h2><p>This tutorial covers basic performance diagnostic and tuning techniques for IBM JVM garbage collection. The tutorial focuses on basic memory problems and present command line settings that act as a starting point for improving garbage collection performance when running JasperReports Server.</p><h3>Product Version</h3><p>The tutorial works with any version that works with Java 5.0 or later.</p><h3>Objectives</h3><p>This guide will enable you to:</p><ul><li><a href="#Diagnosing_Memory_Problems" rel="">Diagnose memory problems</a></li><li><a href="#AddingModifying_JVM_Command_Line_Options" rel="">Add/Modify JVM command line options to improve garbage collection performance</a></li><li><a href="#Increasing_Heap_Space_and_Perm_Gen_Space" rel="">Increase heap space and perm gen space as needed</a></li></ul><h3>Pre-Requisites</h3><ul><li>Basic administration of common J2EE web or application servers (tomcat, JBoss, GlassFish)</li><li>Required permissions to shutdown and restart the server and edit config files</li></ul><p><em><strong>Assumption: </strong></em>Use of bundled Tomcat included with JasperReports Server. Adapt as needed for other application servers and platforms.</p><h2>Diagnosing Memory Problems</h2><p>Overview of diagnosing memory problems:</p><ul><li>Launch JConsole</li><li>Have users use JasperReports Server or simulate load with QA tool</li><li>Watch memory usage</li></ul><table align="center" border="1" cellpadding="1" cellspacing="1" width="100%"><tbody><tr><td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td><td><strong>Action</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">1</td><td>Edit <strong>{js-install}/apache-tomcat/bin/setenv.bat</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">2</td><td><p>Add the following JVM options to the <strong>JAVA_OPTS</strong> variable:</p><ul><li>Dcom.sun.management.jmxremote </li><li>Dcom.sun.management.jmxremote.port=9004 </li><li>Dcom.sun.management.jmxremote.authenticate=false </li><li>Dcom.sun.management.jmxremote.ssl=false</li></ul></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">3</td><td>Restart JasperReports Server</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">4</td><td>Launch the <strong>&lt;java-home&gt;/bin/JConsole.exe application</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">5</td><td><p>Click the <strong>Remote</strong> tab and enter the following values:</p><ul><li><strong>Host or ip:</strong> {servername} (localhost if running locally)</li><li><strong>Port:</strong> 9004</li><li><strong>Username and Password:</strong> {leave blank}</li></ul></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">6</td><td>Click the <strong>Memory</strong> tab</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">7</td><td>Either have users use JasperReports Server or use a load testing tool (such as LoadRunner) to simulate peak load conditions</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">8</td><td><p>Observe the memory usage characteristics. Normal usage will look like this:</p><p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/graph1.jpg.ba44d50c4b23b119b08529c085a7de44.jpg" data-fileid="86754" data-fileext="jpg" rel=""><img data-fileid="86754" class="ipsImage ipsImage_thumbnailed" alt="graph1.jpg.ba44d50c4b23b119b08529c085a7de44.jpg" src="//media.invisioncic.com/i328763/monthly_2013_05/graph1.jpg.ba44d50c4b23b119b08529c085a7de44.jpg" loading="lazy"></a></strong></p><p>Whereas a situation where garbage collection is inadequate or nonexistent will look like this:</p><p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/garbagecollection2.jpg.2d489db3f064c646d5fd16c5913a1330.jpg" data-fileid="86755" data-fileext="jpg" rel=""><img data-fileid="86755" class="ipsImage ipsImage_thumbnailed" alt="garbagecollection2.jpg.2d489db3f064c646d5fd16c5913a1330.jpg" src="//media.invisioncic.com/i328763/monthly_2013_05/garbagecollection2.jpg.2d489db3f064c646d5fd16c5913a1330.jpg" loading="lazy"></a></strong></p><p>If the “valleys” of the memory usage graph don’t return to a baseline, this is an indication of either a memory leak or garbage collection problem.</p><p>See the <strong>Adding/Modifying JVM Command Line Options</strong> section below.</p><p> </p></td></tr></tbody></table><p></p><h2>Adding/Modifying JVM Command Line Options</h2><p>Change garbage collection algorithm in use:</p><ul><li>Add/Modify JVM settings</li><li>Restart JasperReports Server</li><li>Watch memory usage</li></ul><table align="center" border="1" cellpadding="1" cellspacing="1" width="100%"><tbody><tr><td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td><td><strong>Action</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">1</td><td>Edit <strong>{js-install}/apache-tomcat/bin/setenv.bat</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">2</td><td><p>Add the following JVM options to the <strong>JAVA_OPTS</strong> variable, where (n) is between 1 and the number of processors on the server:</p><ul><li><strong>Xgcpolicy:optavgpause </strong></li><li><strong>Xgcthreads(n)</strong></li></ul></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">3</td><td>Restart JasperReports Server</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">4</td><td>Either have users use JasperReports Server or use a load testing tool (such as LoadRunner) to simulate peak load conditions</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">5</td><td>Watch the <strong>&lt;js-install&gt;apache-tomcatwebappsjasperserver-proWEB-INFlogsjasperserver.log</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">6</td><td>Watch for OutOfMemoryExceptions</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">7</td><td>If an error occurs change the JVM heap space setting. See <strong>Increasing Heap Space and Perm Gen Space</strong> section below.</td></tr></tbody></table><p></p><h2>Increasing Heap Space and Perm Gen Space</h2><p>Change JVM Heap and Perm Gen Settings:</p><ul><li>Add/Modify JVM settings</li><li>Restart JasperReports Server</li><li>Watch memory usage</li></ul><table align="center" border="1" cellpadding="1" cellspacing="1" width="100%"><tbody><tr><td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td><td><strong>Action</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">1</td><td>Edit <strong>&lt;js-install&gt;/apache-tomcat/bin/setenv.bat</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">2</td><td><p>Set the <strong>Xms</strong> and <strong>Xmx</strong> options to higher values in the <strong>JAVA_OPTS</strong> variable.</p><p>For better performance, set the <strong>Xms </strong>and<strong> Xmx</strong> options to the same value.</p></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">3</td><td>Restart JasperReports Server</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">4</td><td>Either have users use the system or use a load testing tool (such as LoadRunner) to simulate peak load conditions</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">5</td><td>Watch the <strong>&lt;js-install&gt;apache-tomcatwebappsjasperserver-proWEB-INFlogsjasperserver.log</strong></td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">6</td><td>If the errors persist, repeat steps 2-5 until the errors disappear</td></tr><tr><td style="text-align:center;vertical-align:middle;width:50px;">7</td><td>If the errors persist after reaching the maximum allowable heap sizes (usually around 1.3 gb), consider migrating to 64 bit hardware or use additional server hardware in a cluster with a load-balancing appliance.</td></tr></tbody></table><p></p><h3>What's Next?</h3><p>For additional information, refer to the following:</p><ul><li><a href="/documentation" rel="">JasperReports Server Ultimate Guide</a></li><li>JasperReports Server Pro Admin Guide, located in the <strong>&lt;js-install&gt;docs</strong> folder.</li><li>Using <a href="http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html" rel="external nofollow">JConsole</a></li></ul><h4>Written by</h4><p>This tutorial was written by Steve Park, Professional Services Consultant, June 2009</p><p></p><p></p>]]></description><guid isPermaLink="false">1062</guid><pubDate>Fri, 17 May 2013 18:57:52 +0000</pubDate></item><item><title>How to compile JasperReports 5.0.0 commercial library in the Windows 7 environment</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-compile-jasperreports-500-commercial-library-windows-7-environment/</link><description><![CDATA[<p>Hello, everyone</p><p>In this article I want to describe how to compile the JasperReports library 5.0.0 and a couple of complex moments that may interrupt this process.</p><p>The most important moment related to the version of the Sun Java JDK that should be used to compile the library and then the samples that are supplied with it(I needed to compile htmlcomponent (&lt;jasperreports-pro-5.0.0&gt;jasperreportsdemosampleshtmlcomponent)).</p><p>In my first test I tried to compile JasperReports 5.0.0 commercial library with the Sun Java 1.6 Jdk (output of the java -version command is shown below)</p><pre class="ipsCode prettyprint lang-auto prettyprinted">java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
</pre><div></div><p></p><p>but this process was interrupted with the error that is shown on the picture below:</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/screenshot_of_the_exception(1).png.d4a66282ec2f16745851c5244a10cd1f.png" data-fileid="86410" data-fileext="png" rel=""><img data-fileid="86410" class="ipsImage ipsImage_thumbnailed" alt="screenshot_of_the_exception(1).png.d4a66282ec2f16745851c5244a10cd1f.png" src="//media.invisioncic.com/i328763/monthly_2013_03/screenshot_of_the_exception(1).png.d4a66282ec2f16745851c5244a10cd1f.png" loading="lazy"></a></p><p>The full text of the error message:</p><pre class="ipsCode prettyprint lang-auto prettyprinted">[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] jasperssourcesjasperreports-pro-5.0.0jasperreportssrcnetsfjasperreportsrepoFileRepositoryPersistenceServiceFactory.java:[89,30] type parameters of M cannot be determined; no unique maximal instance exists for type variable M with upper bounds M,net.sf.jasperreports.repo.PersistenceService

[ERROR] jasperssourcesjasperreports-pro-5.0.0jasperreportssrcnetsfjasperreportsrepoDefaultRepositoryPersistenceServiceFactory.java:[86,30] type parameters of M cannot be determined; no unique maximal instance exists for type variable M with upper bounds M,net.sf.jasperreports.repo.PersistenceService
[INFO] 2 errors
</pre><div></div><p></p><p>This error is related to the bug that exists in this version of Sun Java JDK (<a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954" rel="external nofollow">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954</a>) and according to the information from their site it was fixed in 1.6.0_43.</p><p><strong>To solve the issue related to this bug I downloaded the latest version of the Sun Java.</strong></p><p>Below I quote the output of the java -version command:</p><pre class="ipsCode prettyprint lang-auto prettyprinted">java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
</pre><div></div><p></p><p>With this version of the Sun Java JasperReports 5.0.0 commercial library and htmlcomponent.jar was compiled without any errors.</p><p>Let's do all these steps in the "sources" folder</p><p>Below I list the steps that should be done to compile the JasperReports 5.0.0 commercial library from the Windows 7 command line:</p><ol><li>download JasperReports 5.0.0 commercial library from the support portal</li><li>unzip it into the sources folder c:jasperssourcesjasperreports-pro-5.0.0</li><li>download and install Java JDK from the Oracle site (Java Platform (JDK) 7u17 is the most modern version for the moment of this arcticle creation).<br><a href="http://http//www.oracle.com/technetwork/java/javase/downloads/index.html" rel="external nofollow">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a></li><li>download apache-maven build tool from the <a href="http://maven.apache.org/download.cgi" rel="external nofollow">http://maven.apache.org/download.cgi</a> url (I've downloaded 3.0.5 version of this program)</li></ol><p>We need it to build JasperReports library</p><ol><li>unzip apache-maven in the sources folder c:jasperssourcesapache-maven-3.0.5</li><li>download apache-ant build tool from the <a href="http://ant.apache.org/bindownload.cgi" rel="external nofollow">http://ant.apache.org/bindownload.cgi</a> (I've downloaded 1.8.4 version of this program)</li></ol><p>We need apache-ant to build the samples in the c:jasperssourcesjasperreports-pro-5.0.0jasperreportsdemosamples folder</p><ol><li>unzip apache-ant in the sources folder c:jasperssourcesapache-ant-1.8.4</li><li>run Windows command line by executing the cmd.exe program</li><li>define the system variables that should describe the path to the binaries of the javac, mvn, ant and cmd programs and allocate some memory for apache-maven build tool:</li></ol><pre class="ipsCode prettyprint lang-auto prettyprinted">set JAVA_HOME=C:Program FilesJavajdk1.7.0_17
set ANT_HOME=c:jasperssourcesapache-ant-1.8.4
set M2_HOME=c:jasperssourcesapache-maven-3.0.5
set MAVEN_OPTS=-XX:PermSize=512m -XX:MaxPermSize=512m -Xms512m -Xmx512m
set PATH=%JAVA_HOME%bin;%M2_HOME%bin;%ANT_HOME%bin;C:WindowsSystem32
</pre><div></div><p></p><p>and check that these programs(I mean java, mvn, ant and cmd) are available from the command line.</p><p>You can do this by typing the commands that I list below from the command line where the system variables that I list below have been executed:</p><pre class="ipsCode prettyprint lang-auto prettyprinted">java -version
mvn -version
ant -version
</pre><div></div><p></p><p>Each command should produce the output that desribes its version</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/define_java_variables.png.40bc913dcfd40e04f657688b13edae8a.png" data-fileid="86411" data-fileext="png" rel=""><img data-fileid="86411" class="ipsImage ipsImage_thumbnailed" alt="define_java_variables.png.40bc913dcfd40e04f657688b13edae8a.png" src="//media.invisioncic.com/i328763/monthly_2013_03/define_java_variables.png.40bc913dcfd40e04f657688b13edae8a.png" loading="lazy"></a></p><p> </p><p>After we confirmed that our environment has been successfully configured let's try to compile the JasperReports library:</p><p>1. navigate to the jasperreports subfolder and compile the community version of the JasperReports library</p><pre class="ipsCode prettyprint lang-auto prettyprinted">cd jasperreports
mvn clean install
</pre><div></div><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step1.png.73f5556c383f87f3c9ddbfff45bd3270.png" data-fileid="86412" data-fileext="png" rel=""><img data-fileid="86412" class="ipsImage ipsImage_thumbnailed" alt="jasperreports_step1.png.73f5556c383f87f3c9ddbfff45bd3270.png" src="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step1.png.73f5556c383f87f3c9ddbfff45bd3270.png" loading="lazy"></a></p><p>This builds and installs the JasperReports Community Edition JAR into your local Maven repository and makes it available to the<br>subsequent build steps, which require it as a build dependency. The resulting JasperReports Community Edition JAR file can be found<br>under the &lt;jasperreports-install&gt;/jasperreports/target folder.</p><p>2. return to the main folder of the library distribution and compile the license-related dependencies that are shipped with<br>JasperReports Professional and Developer editions.</p><pre class="ipsCode prettyprint lang-auto prettyprinted">cd ..
mvn clean install
</pre><div></div><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step2.png.dc1d082484c3de52a44b12d91e780834.png" data-fileid="86413" data-fileext="png" rel=""><img data-fileid="86413" class="ipsImage ipsImage_thumbnailed" alt="jasperreports_step2.png.dc1d082484c3de52a44b12d91e780834.png" src="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step2.png.dc1d082484c3de52a44b12d91e780834.png" loading="lazy"></a></p><p>3. the third step in building JasperReports Professional or Developer editions is the creation of the JasperReports Fusion Component JAR file.</p><pre class="ipsCode prettyprint lang-auto prettyprinted">cd jasperreports-fusion
mvn clean install
</pre><div></div><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step3.png.a7a92004793e5f4e11c2ded0db5555a1.png" data-fileid="86414" data-fileext="png" rel=""><img data-fileid="86414" class="ipsImage ipsImage_thumbnailed" alt="jasperreports_step3.png.a7a92004793e5f4e11c2ded0db5555a1.png" src="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step3.png.a7a92004793e5f4e11c2ded0db5555a1.png" loading="lazy"></a></p><p>This creates and installs (into the local Maven repository) the JasperReports Fusion JAR file that you can also find under the /jasperreports-fusion/target folder of the current package.</p><p>4. the last step in building JasperReports Professional or Developer editions is the creation of the JasperReports HighCharts Component JAR file.</p><p>This is achieved by launching the following Maven build command in the /jasperreports-highcharts subfolder</p><pre class="ipsCode prettyprint lang-auto prettyprinted">cd ..
cd jasperreports-highcharts
</pre><div></div><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step4.png.feaff6e33fdb31e2c020fc6791d08ff6.png" data-fileid="86415" data-fileext="png" rel=""><img data-fileid="86415" class="ipsImage ipsImage_thumbnailed" alt="jasperreports_step4.png.feaff6e33fdb31e2c020fc6791d08ff6.png" src="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step4.png.feaff6e33fdb31e2c020fc6791d08ff6.png" loading="lazy"></a></p><p>This creates and installs (into the local Maven repository) the JasperReports HighCharts JAR file that you can also find under the<br>/jasperreports-highcharts/target folder of the current package.</p><p>5. Let's try to compile the htmlcomponent library(this compoment may be useful in your report)</p><pre class="ipsCode prettyprint lang-auto prettyprinted">cd ..
cd jasperreports/demo/samples/htmlcomponent
ant clean jar
</pre><div></div><p></p><p>As you can see from the screenshot below the htmlcomponent.jar file has been successfully compiled</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step5.png.fc258c9f14a23deb0a8dc7388080a235.png" data-fileid="86416" data-fileext="png" rel=""><img data-fileid="86416" class="ipsImage ipsImage_thumbnailed" alt="jasperreports_step5.png.fc258c9f14a23deb0a8dc7388080a235.png" src="//media.invisioncic.com/i328763/monthly_2013_03/jasperreports_step5.png.fc258c9f14a23deb0a8dc7388080a235.png" loading="lazy"></a></p><p>In this article we configured the build environment and compiled JasperReports 5.0.0 commercial library and one of the components that is supplied together with library in the jasperreports/demo/samples folder. You can also find the steps that were described in this article in the readme that is supplied with the JasperReports 5.0.0 library.</p><p>I've attached the readme file to this how-to.</p><p>Thank you for your attention to this article.</p>
<p><a class="ipsAttachLink" href="https://community.jaspersoft.com/applications/core/interface/file/attachment.php?id=130116&amp;key=b8e12b61e1610963885757c8733195bc" data-fileext="txt" data-fileid="130116" data-filekey="b8e12b61e1610963885757c8733195bc">readme.txt</a></p>]]></description><guid isPermaLink="false">949</guid><pubDate>Thu, 07 Mar 2013 13:58:09 +0000</pubDate></item><item><title>Conversion of data in text format to number format in downloaded excel sheet</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/conversion-data-text-format-number-format-downloaded-excel-sheet/</link><description><![CDATA[<h2>Issue:</h2><p>[toc on_off::hide=1]</p><p>While downloading an Excel sheet using <span style="color:#696969;"><em>JExcelApiExporter</em></span> object. We are able to get the data in text format.</p><p>Is there any way to get the data in number format so that it can be used in excel sheet formula?</p><hr /><h2>Resolution:</h2><p>In JasperReports Server's file:</p><p style="margin-left:40px;"><em><span style="color:#696969;">WEB-INF/applicationContext.xml </span></em></p><p>There is a bean named "<span style="color:#696969;"><em>xlsExportParameters</em></span>", please</p><ol><li>change the "<em><span style="color:#696969;">detectCellType</span></em>" property's value to "<span style="color:#696969;"><em>true</em></span>",</li><li>save the file and</li><li>restart JasperReports Server.</li></ol><hr /><p><strong><em>Ref. Case #00020702</em></strong> -- 14:33, 22 June 2011 (UTC)  </p>]]></description><guid isPermaLink="false">226</guid><pubDate>Wed, 22 Jun 2011 14:33:36 +0000</pubDate></item><item><title>Advanced formatting with new HTML5 charts</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/advanced-formatting-new-html5-charts/</link><description><![CDATA[<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/BlogHeader.jpg.ba607cb5566d745b9b1fe0115d1776eb.jpg" data-fileid="86378" data-fileext="jpg" rel=""><img data-fileid="86378" class="ipsImage ipsImage_thumbnailed" alt="BlogHeader.jpg.ba607cb5566d745b9b1fe0115d1776eb.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/BlogHeader.jpg.ba607cb5566d745b9b1fe0115d1776eb.jpg" loading="lazy"></a></p><p>Advanced formatting with new HTML5 charts. Jaspersoft’s new HTML5 Pro charts allow you to create dynamic, visually appealing interactive content.</p><p>Advanced options can help you get the most out of them.</p><p>iReport Professional version5.0 introduced Jaspersoft’s new HTML5 charting library.</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport1.jpg.7daad8091a525b65a5877bb2c55c9b45.jpg" data-fileid="86379" data-fileext="jpg" rel=""><img data-fileid="86379" class="ipsImage ipsImage_thumbnailed" alt="IReport1.jpg.7daad8091a525b65a5877bb2c55c9b45.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport1.jpg.7daad8091a525b65a5877bb2c55c9b45.jpg" loading="lazy"></a></p><p>This entirely new set of interactive charts is not only visually attractive, it combines advanced chart capabilities with a rich set of supported user interactions including the ability to change the chart type on the fly. Let’s take a look at some of these new features as they appear when creating your content in iReport and when rendered on the JasperReports Server.</p><p>Below is an example of a simple and rather plain HTML5 chart.</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport2.jpg.0aa2b5da0daf16d2917fb8461f43a240.jpg" data-fileid="86380" data-fileext="jpg" rel=""><img data-fileid="86380" class="ipsImage ipsImage_thumbnailed" alt="IReport2.jpg.0aa2b5da0daf16d2917fb8461f43a240.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport2.jpg.0aa2b5da0daf16d2917fb8461f43a240.jpg" loading="lazy"></a></p><p>The standard default settings provide a clean and readable, if not exciting, default set of visual settings. The most commonly used settings and rendering options can be accessed through the Chart Settings menu. This setting dialog can be access via the HTML5 Chart context menu (right click on the chart while it’s the active component in the designer). While these cover most of the settings required to customize the look and feel of many charts there are more sophisticated settings that can only be configured using the Advanced Options dialog.</p><p>Click the Show Advanced Options button located to the lower right of the Chart Setting dialog.</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport3.jpg.609deab5e6f808b69af87a99312eb8ee.jpg" data-fileid="86381" data-fileext="jpg" rel=""><img data-fileid="86381" class="ipsImage ipsImage_thumbnailed" alt="IReport3.jpg.609deab5e6f808b69af87a99312eb8ee.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport3.jpg.609deab5e6f808b69af87a99312eb8ee.jpg" loading="lazy"></a></p><p>For a list of the available options, consult the Highcharts API reference at <a href="http://api.highcharts.com/highcharts" rel="external nofollow">http://api.highcharts.com/highcharts</a>. By expanding the available options, the hierarchy of settings can be viewed. When setting a Property Name, access a nested setting using the “.” character.</p><p>Another example modifies the yAxis label for a chart:</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/ScreenShot2013-02-24at5_13_53PM.png.3f5440c6342455d6446960c4bcef0da5.png" data-fileid="86382" data-fileext="png" rel=""><img data-fileid="86382" class="ipsImage ipsImage_thumbnailed" alt="ScreenShot2013-02-24at5_13_53PM.png.3f5440c6342455d6446960c4bcef0da5.png" src="//media.invisioncic.com/i328763/monthly_2013_02/ScreenShot2013-02-24at5_13_53PM.png.3f5440c6342455d6446960c4bcef0da5.png" loading="lazy"></a></p><p>When entering an advanced setting, be sure to differentiate between a value and an expression. In general, a numeric setting can be considered a value and other types, an expression. Setting parameters must be either be of a native Java type or explicitly cast to a Java language construct. Note the setting in the example below: the gradient definition is explicitly cast to an array and returned as a list.</p><p>Currently iReport does not allow a Javascript function as a setting. Functions are first class constructs in Javascript without an analog in Java. As a result, they will be interpreted as strings and surrounded with quotes.</p><p>As an example, when setting a plot area a gradient resulting in the background in the chart to the left.</p><p>Note the JSON formatted settings in the Javascript constructor.</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport5.jpg.015f070e9f381819ec1a2eca6a6cefe0.jpg" data-fileid="86383" data-fileext="jpg" rel=""><img data-fileid="86383" class="ipsImage ipsImage_thumbnailed" alt="IReport5.jpg.015f070e9f381819ec1a2eca6a6cefe0.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport5.jpg.015f070e9f381819ec1a2eca6a6cefe0.jpg" loading="lazy"></a></p><p>To configure the same settings using iReport, two settings must be added via the Advanced Options dialog. The first is featured in next example dialog. The gradient setting is nested within the chart and background color settings and is therefore defined as chart.backgroundColor.linearGradient. As noted previously, all settings must be cast, either explicitly or implicitly to a Java data type. The gradient takes an array as a parameter and therefore must explicitly be returned as a list, using the static java.util.Arrays.asList method.</p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport6.jpg.c53b9edbaec517aa467597d7621352c3.jpg" data-fileid="86384" data-fileext="jpg" rel=""><img data-fileid="86384" class="ipsImage ipsImage_thumbnailed" alt="IReport6.jpg.c53b9edbaec517aa467597d7621352c3.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport6.jpg.c53b9edbaec517aa467597d7621352c3.jpg" loading="lazy"></a><p>To render the gradient, a second setting must be added to define stops - chart.backgroundColor.stops. This setting requires an array of arrays and is expressed through the nested use of java.util.Arrays.</p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport7.jpg.61418d06eaaa9d41116c9281dc69f20e.jpg" data-fileid="86385" data-fileext="jpg" rel=""><img data-fileid="86385" class="ipsImage ipsImage_thumbnailed" alt="IReport7.jpg.61418d06eaaa9d41116c9281dc69f20e.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport7.jpg.61418d06eaaa9d41116c9281dc69f20e.jpg" loading="lazy"></a><p>Boolean values must also be explicitly returned as a Java Boolean class using the static field Boolean.TRUE (or Boolean.FALSE).</p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/IReport8.jpg.091dc0db8c95838046bd324f0f742317.jpg" data-fileid="86386" data-fileext="jpg" rel=""><img data-fileid="86386" class="ipsImage ipsImage_thumbnailed" alt="IReport8.jpg.091dc0db8c95838046bd324f0f742317.jpg" src="//media.invisioncic.com/i328763/monthly_2013_02/IReport8.jpg.091dc0db8c95838046bd324f0f742317.jpg" loading="lazy"></a><p>Below is the finished chart, customized through the use of advanced options followed by the source JRXML.</p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_02/ScreenShot2013-02-24at5_16_11PM.png.ee7a7911cc48cd3b7f5656989388fa85.png" data-fileid="86387" data-fileext="png" rel=""><img data-fileid="86387" class="ipsImage ipsImage_thumbnailed" alt="ScreenShot2013-02-24at5_16_11PM.png.ee7a7911cc48cd3b7f5656989388fa85.png" src="//media.invisioncic.com/i328763/monthly_2013_02/ScreenShot2013-02-24at5_16_11PM.png.ee7a7911cc48cd3b7f5656989388fa85.png" loading="lazy"></a><pre class="ipsCode prettyprint lang-auto prettyprinted">
&lt;!--?xml version="1.0" encoding="UTF-8"?--&gt;
&lt;jasperreport bottommargin="20" columnwidth="984" leftmargin="20"
              name="ChartingNumber1" pageheight="842" pagewidth="1024"
              rightmargin="20" topmargin="20"
              uuid="b805407a-9ca3-4b37-945a-37e767cd090f"
              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"&gt;
    &lt;property name="ireport.zoom" value="1.0" /&gt;
    &lt;property name="ireport.x" value="0" /&gt;
    &lt;property name="ireport.y" value="0" /&gt;
    &lt;querystring&gt;
        &lt;!--[CDATA[
            SELECT sum(store_sales) store_sales, sum(store_cost) store_cost,  store_type
              FROM "public"."sales_fact_1998" sales
              JOIN "public"."store" store  ON (sales.store_id = store.store_id)
             GROUP BY store_type]]--&gt;
    &lt;/querystring&gt;
    &lt;field class="java.math.BigDecimal" name="store_sales" /&gt;
    &lt;field class="java.math.BigDecimal" name="store_cost" /&gt;
    &lt;field class="java.lang.String" name="store_type" /&gt;
    &lt;title /&gt;

    &lt;summary&gt;
        &lt;band height="300" splittype="Stretch"&gt;
            &lt;componentelement&gt;
                &lt;reportelement height="300"
                               uuid="2b74e453-cd88-476e-ae4b-786bd34d8383" width="800" x="0" y="0" /&gt;
                &lt;hc:chart type="Column" xmlns:hc="http://jaspersoft.com/highcharts"
                          xsi:schemalocation="http://jaspersoft.com/highcharts
                                              http://jaspersoft.com/schema/highcharts.xsd"&gt;
                &lt;hc:chartsetting name="default"&gt;
                    &lt;hc:chartproperty name="xAxis.labels.rotation" value="45" /&gt;
                    &lt;hc:chartproperty name="credits.href" value="http://www.jaspersoft.com" /&gt;
                    &lt;hc:chartproperty name="credits.text" value="Jaspersoft" /&gt;
                    &lt;hc:chartproperty name="chart.shadow"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="chart.showAxes"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="chart.borderRadius"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[3]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="chart.zoomType" value="xy" /&gt;
                    &lt;hc:chartproperty name="chart.plotShadow"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="subtitle.style.color" value="#FFFFFF" /&gt;
                    &lt;hc:chartproperty name="legend.borderRadius"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[3]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="tooltip.useHTML"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="plotOptions.column.selected"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="tooltip.borderColor" value="#006666" /&gt;
                    &lt;hc:chartproperty name="chart.backgroundColor.linearGradient"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[java.util.Arrays.asList(0,0,500,500)]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="chart.backgroundColor.stops"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[java.util.Arrays.asList(
                                            java.util.Arrays.asList(0, "#b5bdc8"),
                                            java.util.Arrays.asList(0.36,"#828c95"),
                                            java.util.Arrays.asList(1,"#28343b"))]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="xAxis.labels.style.color"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA["#FFFFFF"]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="legend.floating"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="legend.align"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA["center"]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="legend.shadow"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="legend.y"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[-200]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="colors"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[java.util.Arrays.asList(
                                               "#AA4643","#89A54E","#3D96AE",
                                               "#80699B","#4572A7","#DB843D",
                                               "#92A8CD","#A47D7C","#B5CA92")]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="title.style.color" value="#CCCCCC" /&gt;
                    &lt;hc:chartproperty name="title.text" value="A More Sophisticated and Interesting Chart" /&gt;
                    &lt;hc:chartproperty name="tooltip.shared"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="legend.backgroundColor" value="#FFFFFF" /&gt;
                    &lt;hc:chartproperty name="exporting.enabled"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA[Boolean.TRUE]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;hc:chartproperty name="xAxis.labels.style.fontSize" value="11" /&gt;
                    &lt;hc:chartproperty name="yAxis.title.text"&gt;
                        &lt;hc:propertyexpression&gt;
                            &lt;!--[CDATA["Dollars"]]--&gt;
                        &lt;/hc:propertyexpression&gt;
                    &lt;/hc:chartproperty&gt;
                    &lt;multiaxisdata&gt;
                        &lt;multiaxisdataset&gt;
                            &lt;dataaxis axis="Rows"&gt;
                                &lt;axislevel name="Store Type"&gt;
                                    &lt;labelexpression&gt;
                                        &lt;!--[CDATA["Store32Type"]]--&gt;
                                    &lt;/labelexpression&gt;
                                    &lt;axislevelbucket class="java.lang.Comparable"&gt;
                                        &lt;bucketexpression&gt;
                                            &lt;!--[CDATA[$F{store_type}]]--&gt;
                                        &lt;/bucketexpression&gt;
                                    &lt;/axislevelbucket&gt;
                                &lt;/axislevel&gt;
                            &lt;/dataaxis&gt;
                            &lt;dataaxis axis="Columns"&gt;
                                &lt;multiaxismeasure calculation="Nothing"
                                                  class="java.lang.Number"
                                                  name="Store Sales"&gt;
                                    &lt;labelexpression&gt;
                                        &lt;!--[CDATA["Sales"]]--&gt;
                                    &lt;/labelexpression&gt;
                                    &lt;valueexpression&gt;
                                        &lt;!--[CDATA[$F{store_sales}]]--&gt;
                                    &lt;/valueexpression&gt;
                                &lt;/multiaxismeasure&gt;
                                &lt;multiaxismeasure calculation="Nothing"
                                                  class="java.lang.Number"
                                                  name="Cost"&gt;
                                    &lt;labelexpression&gt;
                                        &lt;!--[CDATA["Cost"]]--&gt;
                                    &lt;/labelexpression&gt;
                                    &lt;valueexpression&gt;
                                        &lt;!--[CDATA[$F{store_cost}]]--&gt;
                                    &lt;/valueexpression&gt;
                                &lt;/multiaxismeasure&gt;
                            &lt;/dataaxis&gt;
                        &lt;/multiaxisdataset&gt;
                    &lt;/multiaxisdata&gt;
                    &lt;hc:series name="f" /&gt;
                    &lt;hc:series name="S" /&gt;
                    &lt;hc:series name="St" /&gt;
                    &lt;hc:series name="Sto" /&gt;
                    &lt;hc:series name="Stor" /&gt;
                    &lt;hc:series name="Store" /&gt;
                    &lt;hc:series name="Store " /&gt;
                    &lt;hc:series name="Store s" /&gt;
                    &lt;hc:series name="Store sa" /&gt;
                    &lt;hc:series name="Store sal" /&gt;
                    &lt;hc:series name="Store sale" /&gt;
                    &lt;hc:series name="Store sales" /&gt;
                    &lt;hc:series name="Store ales" /&gt;
                    &lt;hc:series name="Store Sales" /&gt;
                &lt;/hc:chartsetting&gt;
            &lt;/hc:chart&gt;
        &lt;/componentelement&gt;
    &lt;/band&gt;
&lt;/summary&gt;
</pre><div></div><p></p>]]></description><guid isPermaLink="false">934</guid><pubDate>Fri, 22 Feb 2013 19:51:52 +0000</pubDate></item><item><title>How to increase the User Attribute value field length (JasperReports Server 5.0.1)</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-increase-user-attribute-value-field-length-jasperreports-server-501/</link><description><![CDATA[<p>Profile attributes may be useful if you need to the add additional level of security to your data.</p><p>Below I quote a short description of this feature from <a href="/documentation/jasperreports-server-user-guide" rel="">JasperReports Server User Guide</a> -&gt; <a href="/documentation/jasperreports-server-user-guide/advanced-domain-features" rel="">Advanced Domain Features</a> -&gt; <a href="/documentation/jasperreports-server-user-guide/domel-syntax" rel="">The DomEL Syntax</a> -&gt; <a href="/documentation/jasperreports-server-user-guide/profile-attributes" rel="">Profile Attributes</a> :</p><p><span style="color:#696969;"><em>'A profile attribute is a name-value pair inserted in a user object, such as a user or role. It is ordinarily used to extend the object’s standard access grants, but it has other uses, as well. It can be added to objects by database tools or custom code</em></span>'</p><p>The field length of this attribute in JasperReports Server Repository and JasperReports Server user interface is restricted to 255 characters. Some of the solutions require the length of this field that is longer then the length that is adjusted by default.</p><p>To increase the length of the Profile Attribute field three steps should be done (JasperReports Server v5.0.1):</p><ol><li>The length of this field should be increased in the JasperReports Server Repository</li><li>The length of this field should be increased in<em> <span style="color:#696969;">&lt;jasperserver-pro&gt;</span></em>WEB-INFapplicationContext-rest-services.xml</li><li>The length of this field should be increased in <span style="color:#696969;"><em>&lt;jasperserver-pro&gt;</em></span>scriptsattributes.model.js</li></ol><p>Below I provide the detailed description that shows how to do this:</p><ol><li><p>I use PostgreSQL as the JasperReports Repository. The value related to the Profile Attribute field is stored in jiprofileattribute table and is named attrvalue.</p><p>Plese refer to the screenshot below on which is shown sequense of commands that was used to increase the length of the attrvalue field.</p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_04/postgre_sql_alter_column.png.be025cc362998dfcaea9017a44b9f427.png" data-fileid="86512" data-fileext="png" rel=""><img data-fileid="86512" class="ipsImage ipsImage_thumbnailed" alt="postgre_sql_alter_column.png.be025cc362998dfcaea9017a44b9f427.png" src="//media.invisioncic.com/i328763/monthly_2013_04/postgre_sql_alter_column.png.be025cc362998dfcaea9017a44b9f427.png" loading="lazy"></a></li><li><p>Open the file, <em><span style="color:#696969;">&lt;jasperserver-pro&gt;</span>WEB-INFapplicationContext-rest-services.xml</em>, and change the numeric value according to the changes that were done in the <em>jiprofileattribute</em> table</p><pre class="ipsCode prettyprint lang-auto prettyprinted">&lt;property name="maxLengthAttrValue"&gt;
    &lt;value type="int"&gt;7000&lt;/value&gt;
&lt;/property&gt;</pre><div></div><p></p></li><li><p>Open the file, <em><span style="color:#696969;">&lt;jasperserver-pro&gt;</span>scriptsattributes.model.js</em>, and change the value MAX_LENGTH_OF_VALUE to the value that you want.</p><pre class="ipsCode prettyprint lang-auto prettyprinted">exports.settings = {
    MAX_LENGTH_OF_NAME: 255,
    MAX_LENGTH_OF_VALUE: 7000
}</pre><div></div><p></p></li></ol><p>To apply the changes that have been done the application server should be restarted.</p><p>Thank you for your attention to this article.</p><p>Alex</p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_04/postgre_sql_alter_column.png.4e51b0f7dafd411e5b94680a96c09f0f.png" data-fileid="86513" data-fileext="png" rel=""><img data-fileid="86513" class="ipsImage ipsImage_thumbnailed" alt="postgre_sql_alter_column.png.4e51b0f7dafd411e5b94680a96c09f0f.png" src="//media.invisioncic.com/i328763/monthly_2013_04/postgre_sql_alter_column.png.4e51b0f7dafd411e5b94680a96c09f0f.png" loading="lazy"></a></p>]]></description><guid isPermaLink="false">1004</guid><pubDate>Tue, 16 Apr 2013 08:40:53 +0000</pubDate></item><item><title>Driving Reports from Development to Production</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/driving-reports-development-production/</link><description><![CDATA[<p></p><h2>Introduction</h2><p>Using import/export scripts allows you to export and import content from the JasperServer repository. This tutorial utilizes import and export scripts to mass upload reports from a development environment to a production environment.</p><p>Additionally, it showcases how to take advantage of the JasperServer plugin for iReport. This tutorial can be used in any development and production environment; especially in situations where both development and production environments are using different technologies.</p><h3>Objectives</h3><p>This tutorial will enable you to:</p><ul>	<li><a href="#Locating_and_Configuring_js-import_and_js-export_Scripts" rel="">Locate and configure js-import / js-export scripts</a>	</li><li><a href="#Exporting_Reports" rel="">Export your reports</a></li>	<li><a href="#Importing_Reports_into_Production_Within_the_Same_Organization" rel="">Import your reports into a production environment for the same organization</a></li>	<li><a href="#Importing_Reports_into_Production_Environment_for_a_Different_Organization" rel="">Import your reports into a production environment for a different organization</a></li></ul><h2>Locating and Configuring js-import and js-export Scripts</h2><p>First, we need to configure the js-import and js-export scripts to connect to the JasperServer repository. The scripts are located in the <strong>/scripts </strong>directory.</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>				<p>Check your jasperserver configuration in this file : <strong>apache-tomcatwebappsjasperserver-proMETA-INFcontext.xml</strong></p>				<p>Search for the following lines, which contain information about the repository database:</p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image01.png.48c670a882efc8eaf0851d98326f19ea.png" data-fileid="86876" data-fileext="png" rel=""><img data-fileid="86876" class="ipsImage ipsImage_thumbnailed" alt="image01.png.48c670a882efc8eaf0851d98326f19ea.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image01.png.48c670a882efc8eaf0851d98326f19ea.png" loading="lazy"></a></strong></p>				<p>Obtain the following information:</p>				<ul>					<li><strong>Driver : com.mysql.jdbc.Driver</strong></li>					<li><strong>Database URL : jdbc:mysql://127.0.0.1:3306/jasperserver?useUnicode=true&amp;characterEncoding=UTF-8</strong></li>					<li><strong>Username : jasperdb</strong></li>					<li><strong>Password : password</strong></li>				</ul>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<p>With the information you obtained above, configure the import/export scripts by editing the file :</p>				<p><strong>scriptsconfigjs.jdbc.properties</strong></p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image02.png.6e592e0880e0be70edba4bb176d45949.png" data-fileid="86878" data-fileext="png" rel=""><img data-fileid="86878" class="ipsImage ipsImage_thumbnailed" alt="image02.png.6e592e0880e0be70edba4bb176d45949.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image02.png.6e592e0880e0be70edba4bb176d45949.png" loading="lazy"></a></strong></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>				<p>The first line configures the hibernate dialect used by the scripts.</p>				<p>If you are not using MySQL refer to the section 12.2 page 80 on the <strong>JasperServer-Pro-Install-Guide.pdf</strong> located in the <strong>docs </strong>folder.</p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>				<p>Configure the driver, url, username, and password according to the values you obtained in Step 1.</p>				<p><strong><em>Best Practice:</em> </strong>To avoid confusion, a best practice is to use the js-export script on your development server and the js-import script on your production server.</p>			</td>		</tr>	</tbody></table><h2>Exporting Reports</h2><p><strong><em>Assumption</em></strong>: The demo samples that are provided with the installer are deployed on the development server. The production server is installed without the samples.</p><p><strong><em>Best Practice:</em></strong> Maintain the same folder tree structure between production and other environments (for instance development or test).</p><p>	By maintaining the same folder structure, you will avoid having to perform one-offs to upload reports.</p><p><strong><em>Example: </em></strong>Export all reports within the <strong>organization_1/reports/samples</strong> folder</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>				<p>In a terminal (or under cmd on windows) go to your <strong>scripts</strong> directory</p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<p>Type the following command :</p>				<p><strong>js-export –uris /organizations/organization_1/reports/samples –output-zip organization_1_reports_samples.zip</strong></p>				<p><strong>--uris</strong> = indicates witch folder to extract</p>				<p><strong>--output-zip</strong> = create a zip file with the specified name containing the export<em>.</em></p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image03.png.d225a49f552e35d51eec04297a73354b.png" data-fileid="86880" data-fileext="png" rel=""><img data-fileid="86880" class="ipsImage ipsImage_thumbnailed" alt="image03.png.d225a49f552e35d51eec04297a73354b.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image03.png.d225a49f552e35d51eec04297a73354b.png" loading="lazy"></a></strong></p>				<p><strong><em>Result</em></strong>: The reports within the specified folder are exported along with any dependencies (such as graphics, connections) into a zip file.</p>			</td>		</tr>	</tbody></table><h2>Importing Reports into Production Within the Same Organization</h2><p>Reports and dependencies are now safely stored in a zip file. Next, re-import them. The easiest import scenario is categorized by having the same folder structure in development and production environments. First, create the organization in the production environment then upload your reports.</p><p><strong><em>Note</em>:</strong> If you wish to test import/export in a single JasperServer instance reinitialize the repository prior to this step. The initialization scripts are located in the <strong>scripts folder</strong>.</p><p><strong><em>Example: </em></strong>For MySQL, run the <strong>scriptsMySQLjasper_init.bat</strong> <a href="http://www.jaspersoft.com/download/importing-reports-production-tutorial-download" rel="external nofollow"><strong>(Download here)</strong></a>, and then continue with the steps listed below.</p><p>Create the organization in the production environment.</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>Login as <strong>superuser</strong> in your production server.</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>Go to<strong> Manage &gt; Organizations</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>Select the root folder then click the <strong>Create Organization</strong> button</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>				<p>Fill the form according to the organization settings you had from development (the organization_id must be the same)</p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image04.png.0bb819944d8e924fceef8feddae95a7e.png" data-fileid="86882" data-fileext="png" rel=""><img data-fileid="86882" class="ipsImage ipsImage_thumbnailed" alt="image04.png.0bb819944d8e924fceef8feddae95a7e.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image04.png.0bb819944d8e924fceef8feddae95a7e.png" loading="lazy"></a></strong></p>				<p><strong><em>In our sample: </em></strong></p>				<p>Organization name = Organization</p>				<p>Organization_id = organization_1</p>			</td>		</tr>	</tbody></table><p><strong><em>Note:</em></strong> <strong>organization_1</strong> is an organization that is created by default.</p><p>Once we have our organization correctly configured, then we can upload the reports using the js-import tool.</p><p><strong><em>Example: </em></strong>In our example, make sure you have copied <strong>organization_1_reports_samples.zip </strong>into the <strong>scripts</strong> directory</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>In a terminal (or under cmd on windows) go to your <strong>scripts</strong> directory</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<p>Type the following command :</p>				<p><strong>js-import --input-zip organization_1_reports_samples.zip</strong></p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image05.png.882493150a8693b210aa99d20c7ef9b7.png" data-fileid="86884" data-fileext="png" rel=""><img data-fileid="86884" class="ipsImage ipsImage_thumbnailed" alt="image05.png.882493150a8693b210aa99d20c7ef9b7.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image05.png.882493150a8693b210aa99d20c7ef9b7.png" loading="lazy"></a></strong></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>				<p><strong><em>Result</em></strong>: The reports and dependencies are uploaded in the organization</p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image06.png.e0ffdcbf59859442e9d05c9431077b0d.png" data-fileid="86886" data-fileext="png" rel=""><img data-fileid="86886" class="ipsImage ipsImage_thumbnailed" alt="image06.png.e0ffdcbf59859442e9d05c9431077b0d.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image06.png.e0ffdcbf59859442e9d05c9431077b0d.png" loading="lazy"></a></strong></p>			</td>		</tr>	</tbody></table><h2>Importing Reports into Production Environment for a Different Organization</h2><p><strong><em>Assumption</em>:</strong> You already have an organization within your production environment, which differs from the development (in our example you do not have an organization using organization_1 as id).</p><p>In our example, the organization id we wish to upload our reports to is <strong>demo</strong>. This is not a best practice but a common case where development and production do not share same organization structure.</p><p>Js-Import and Js-Export scripts don’t provide a mechanism for specifying the organization id. Essentially, this limitation requires that you perform the transformation manually.</p><p>Below are the steps for defining the transformation.</p><p><strong><em>Best Practice:</em></strong> Use a text editor such as Notepad++ to find and replace characters strings from multiple files at the same time.</p><p>Notepad ++ is a free text editor that can be downloaded <a href="http://notepad-plus.sourceforge.net/uk/download.php" rel="external nofollow">here</a>.</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>Unzip the exported file <strong>organization_1_reports_samples.zip</strong> ,and open the contents (we later refer to it simply as the <strong>export folder</strong>)</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>Open<strong> Notepad++</strong> or your favorite text editor</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>				<p>Search and drag and drop all .xml files (reports) from your export folder into Notepad++</p>				<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image07_preview.png.148bd44fab8d518bf45047e19c3d87f2.png" data-fileid="86887" data-fileext="png" rel=""><img data-fileid="86887" class="ipsImage ipsImage_thumbnailed" alt="image07_preview.png.148bd44fab8d518bf45047e19c3d87f2.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image07_preview.png.148bd44fab8d518bf45047e19c3d87f2.png" loading="lazy"></a></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>				<p>Go to<strong> Search &gt; Replace, </strong>and then specify the following:</p>				<p>· Find what<strong>: /organizations/organization_1</strong> (the original organization id)</p>				<p>· Replace with: <strong>/organizations/demo </strong>(the target organization id)</p>				<p>Then click <strong>Replace in all opened documents</strong></p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image08_preview.png.fbb96ca6a919cf4960c4255a15afe187.png" data-fileid="86889" data-fileext="png" rel=""><img data-fileid="86889" class="ipsImage ipsImage_thumbnailed" alt="image08_preview.png.fbb96ca6a919cf4960c4255a15afe187.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image08_preview.png.fbb96ca6a919cf4960c4255a15afe187.png" loading="lazy"></a></strong></p>				<p><strong><em>Result :</em></strong> The export folder is now specified as <strong>Demo</strong>, rather than organization_1</p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>				<p>Create a zip file containing the export folder with the newly modified files.</p>				<p><strong><em>Important</em></strong>: The root of your zip file should contain the folder <strong>resources</strong> and the file <strong>index.xml</strong></p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image09_preview.png.f0ad2e08dfd3dce722f92f9c5a1cb822.png" data-fileid="86891" data-fileext="png" rel=""><img data-fileid="86891" class="ipsImage ipsImage_thumbnailed" alt="image09_preview.png.f0ad2e08dfd3dce722f92f9c5a1cb822.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image09_preview.png.f0ad2e08dfd3dce722f92f9c5a1cb822.png" loading="lazy"></a></strong></p>				<p>Name the zip file <strong>demo_reports_samples.zip</strong></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">6</td>			<td>In a terminal (or under cmd on windows) go to your <strong>scripts</strong> directory</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">7</td>			<td>				<p>Type the following command :</p>				<p><strong>js-import --input-zip demo_1_reports_samples.zip</strong></p>				<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image10_0.png.90e65b6e6c8d79b720c06d427c62be1b.png" data-fileid="86893" data-fileext="png" rel=""><img data-fileid="86893" class="ipsImage ipsImage_thumbnailed" alt="image10_0.png.90e65b6e6c8d79b720c06d427c62be1b.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image10_0.png.90e65b6e6c8d79b720c06d427c62be1b.png" loading="lazy"></a></p>				<p><strong><em>Result</em></strong>: The reports are now uploaded in the demo organization</p>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image11_0.png.37dc896130cfb3e697154a957d569d62.png" data-fileid="86895" data-fileext="png" rel=""><img data-fileid="86895" class="ipsImage ipsImage_thumbnailed" alt="image11_0.png.37dc896130cfb3e697154a957d569d62.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image11_0.png.37dc896130cfb3e697154a957d569d62.png" loading="lazy"></a></strong></p>			</td>		</tr>	</tbody></table><h3>Written by</h3><p>This tutorial was written by Guillaume Autier, Sales Engineer, June 2009.</p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image01.png.5c7fd5c68a32e2366c497739b9af519c.png" data-fileid="86877" data-fileext="png" rel=""><img data-fileid="86877" class="ipsImage ipsImage_thumbnailed" alt="image01.png.5c7fd5c68a32e2366c497739b9af519c.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image01.png.5c7fd5c68a32e2366c497739b9af519c.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image02.png.4b79e505dec949d4b19a001ef8001fb5.png" data-fileid="86879" data-fileext="png" rel=""><img data-fileid="86879" class="ipsImage ipsImage_thumbnailed" alt="image02.png.4b79e505dec949d4b19a001ef8001fb5.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image02.png.4b79e505dec949d4b19a001ef8001fb5.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image03.png.0e8f1921ddb3d1bcc8115af38f176af2.png" data-fileid="86881" data-fileext="png" rel=""><img data-fileid="86881" class="ipsImage ipsImage_thumbnailed" alt="image03.png.0e8f1921ddb3d1bcc8115af38f176af2.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image03.png.0e8f1921ddb3d1bcc8115af38f176af2.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image04.png.b7d5e2c36b84956ad6fad6615017bd95.png" data-fileid="86883" data-fileext="png" rel=""><img data-fileid="86883" class="ipsImage ipsImage_thumbnailed" alt="image04.png.b7d5e2c36b84956ad6fad6615017bd95.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image04.png.b7d5e2c36b84956ad6fad6615017bd95.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image05.png.22cd8cbcef19402cc81d3480ab842179.png" data-fileid="86885" data-fileext="png" rel=""><img data-fileid="86885" class="ipsImage ipsImage_thumbnailed" alt="image05.png.22cd8cbcef19402cc81d3480ab842179.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image05.png.22cd8cbcef19402cc81d3480ab842179.png" loading="lazy"></a></p><p></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image07_preview.png.6f50fcc939fd39357ffc59b5ee5fa769.png" data-fileid="86888" data-fileext="png" rel=""><img data-fileid="86888" class="ipsImage ipsImage_thumbnailed" alt="image07_preview.png.6f50fcc939fd39357ffc59b5ee5fa769.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image07_preview.png.6f50fcc939fd39357ffc59b5ee5fa769.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image08_preview.png.67456d007ddfc9b13399c86302b52560.png" data-fileid="86890" data-fileext="png" rel=""><img data-fileid="86890" class="ipsImage ipsImage_thumbnailed" alt="image08_preview.png.67456d007ddfc9b13399c86302b52560.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image08_preview.png.67456d007ddfc9b13399c86302b52560.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image09_preview.png.0bb5bfdd44fab6de3be860b7773cc0a9.png" data-fileid="86892" data-fileext="png" rel=""><img data-fileid="86892" class="ipsImage ipsImage_thumbnailed" alt="image09_preview.png.0bb5bfdd44fab6de3be860b7773cc0a9.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image09_preview.png.0bb5bfdd44fab6de3be860b7773cc0a9.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image10_0.png.a5da5db9772c5142d8660c1cdc06a507.png" data-fileid="86894" data-fileext="png" rel=""><img data-fileid="86894" class="ipsImage ipsImage_thumbnailed" alt="image10_0.png.a5da5db9772c5142d8660c1cdc06a507.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image10_0.png.a5da5db9772c5142d8660c1cdc06a507.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/image11_0.png.093eec7724a8d404b9a378423031cada.png" data-fileid="86896" data-fileext="png" rel=""><img data-fileid="86896" class="ipsImage ipsImage_thumbnailed" alt="image11_0.png.093eec7724a8d404b9a378423031cada.png" src="//media.invisioncic.com/i328763/monthly_2013_05/image11_0.png.093eec7724a8d404b9a378423031cada.png" loading="lazy"></a></p>]]></description><guid isPermaLink="false">1072</guid><pubDate>Mon, 20 May 2013 23:26:41 +0000</pubDate></item><item><title>Creating Multi-Axis Charts in iReport Designer</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/creating-multi-axis-charts-ireport-designer/</link><description><![CDATA[<h2>Introduction</h2><p>Charting data that have widely differing values can be difficult using a single data axis. By using two or more axes, the data can be more easily understood. iReport Designer includes built-in support for multi-axis charts through the use of the JFreeChart package.</p><h3>Product Versions</h3><p>iReport Designer Professional 3.5.0 was used to create this tutorial.nIt should work identically in later versions of iReport Designer Professional and iReport Designer Community Edition. The concepts apply to older versions of iReport Designer, but the user interface differs.</p><h3>Objectives</h3><p>This guide will enable you to:</p><ul>	<li><a href="#Creating_a_New_Report" rel="">Create a new report</a>	</li><li><a href="#Creating_a_Simple_Line_Chart" rel="">Create a simple line chart </a></li>	<li><a href="#Creating_a_Multi-Axis_Chart" rel="">Create a more useful multi-axis chart</a></li>	<li><a href="#Combining_a_Bar_Chart_with_a_Line_Chart" rel="">Combine a bar chart with a line chart</a></li></ul><h3>Pre-Requisites</h3><p>Familiarity with iReport Designer is helpful.</p><h2>Creating a New Report</h2><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td>				<p>To create a new report, set these report properties:</p>				<ul>					<li>Dimensions 400 x 200 pixels</li>					<li>Title band takes up the entire 200 pixels. All other bands are zero pixels.</li>					<li>Report language: Groovy</li>				</ul>				<p>A new empty report with sample SQL query to get started is available <a href="http://www.jaspersoft.com/download/multi-axis-chart-1" rel="external nofollow">here</a>.</p>				<p><strong><em>Note</em></strong>: The SQL query in the sample report returns some hard-coded sample data; it does not refer to any tables in the database. This way it can be used with any valid SQL datasource. It has been tested with MySQL and PostgreSQL, but it should also work with most other database technologies.</p>			</td>		</tr>	</tbody></table><h2>Creating a Simple Line Chart</h2><p>Follow these steps to create a simple line chart.</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step </strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>Drag the <strong>Chart tool </strong>into the report.<br>				<a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_1.png.2ca04acf4e70e6353154e0f5b586036a.png" data-fileid="86843" data-fileext="png" rel=""><img data-fileid="86843" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_1.png.2ca04acf4e70e6353154e0f5b586036a.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_1.png.2ca04acf4e70e6353154e0f5b586036a.png" loading="lazy"></a></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<ol>					<li>Select the <strong>Line</strong> chart style</li>					<li>Resize the chart to cover the full area</li>				</ol>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>Right-click the chart and select <strong>Chart Data</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>Add 3 Series: <strong>Sales</strong>, <strong>Issues</strong>, and <strong>Bugs</strong><br>				<strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_2.png.4b073563e7b33c863f95ed6d664f60ad.png" data-fileid="86845" data-fileext="png" rel=""><img data-fileid="86845" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_2.png.4b073563e7b33c863f95ed6d664f60ad.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_2.png.4b073563e7b33c863f95ed6d664f60ad.png" loading="lazy"></a></strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>The definition of each series should follow this model:<br>				<a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_3.png.a39fced2ee8de862e76c4dfa522b5214.png" data-fileid="86847" data-fileext="png" rel=""><img data-fileid="86847" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_3.png.a39fced2ee8de862e76c4dfa522b5214.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_3.png.a39fced2ee8de862e76c4dfa522b5214.png" loading="lazy"></a></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">6</td>			<td>				<p>In preview mode the report now looks like this:<br>					<a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_4.png.2f9b4bf8c7d4448bbce123267966f572.png" data-fileid="86849" data-fileext="png" rel=""><img data-fileid="86849" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_4.png.2f9b4bf8c7d4448bbce123267966f572.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_4.png.2f9b4bf8c7d4448bbce123267966f572.png" loading="lazy"></a></p>				<p><strong><em>Note:</em></strong> Line charts do have limitations:</p>				<ul>					<li>While the line chart looks reasonably good for the sales numbers, the issues are harder to read.</li>					<li>The bug count is too small to read at all.</li>				</ul>				<p>The problem is that the number of bugs filed is roughly 1000 times smaller. This discrepancy in scale makes the chart less useful.</p>			</td>		</tr>	</tbody></table><h2>Creating a Multi-Axis Chart</h2><p>Follow these steps to create a multi-axis chart.</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>				<p>To avoid having to re-type the series information, open the <strong>Chart Data</strong> dialog again and copy all three series</p>				<p><span>http://www.jaspersoft.com/sites/default/files/images/JEM_MultiAxisChart_5.png</span></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<ol>					<li>Delete the <strong>Line chart</strong></li>					<li>Drag the <strong>Chart tool</strong> into the report again</li>					<li>Select the <strong>Multi Axis</strong> chart type</li>				</ol>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>				<ol>					<li>You are immediately prompted to choose a chart for the primary axis</li>					<li>Choose <strong>Line</strong> chart</li>				</ol>				<p><strong><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_6.png.dfcf74d21207da85ff620f8ea4a6f258.png" data-fileid="86850" data-fileext="png" rel=""><img data-fileid="86850" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_6.png.dfcf74d21207da85ff620f8ea4a6f258.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_6.png.dfcf74d21207da85ff620f8ea4a6f258.png" loading="lazy"></a></strong></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>In the <strong>Report Inspector</strong> panel find the <strong>Multi Axis</strong> chart and set the <strong>Chart Data</strong> for the child <strong>Line Chart</strong><br>				<a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_7.png.b345c75a89bc1e12edbea4c4db0bf4f5.png" data-fileid="86851" data-fileext="png" rel=""><img data-fileid="86851" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_7.png.b345c75a89bc1e12edbea4c4db0bf4f5.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_7.png.b345c75a89bc1e12edbea4c4db0bf4f5.png" loading="lazy"></a></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>On the <strong>Details</strong> tab paste in the series that were previously copied</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">6</td>			<td>If you run the report now it should look exactly as before</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">7</td>			<td>				<p>Remove the <strong>Issues</strong> and <strong>Bugs </strong>series</p>				<ul>					<li>Copy them first so you don't need to retype in the next step</li>				</ul>				<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_8.png.22d002560aad906eefca710ec92daa4b.png" data-fileid="86852" data-fileext="png" rel=""><img data-fileid="86852" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_8.png.22d002560aad906eefca710ec92daa4b.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_8.png.22d002560aad906eefca710ec92daa4b.png" loading="lazy"></a></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">8</td>			<td>				<ol>					<li>Right-click the <strong>Multi Axis</strong> chart and choose <strong>Add Axis </strong>chart</li>					<li>Choose another <strong>Line</strong> chart</li>				</ol>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">9</td>			<td>				<ol>					<li>Paste the <strong>Issues </strong>and <strong>Bugs</strong> series into this new line chart</li>					<li>Previewing the report now shows the sales axis on the left with the issues and bugs axis on the right.						<ul>							<li>The fact that new issues are increasing more quickly than new sales is now readily apparent.</li>						</ul>					</li>				</ol>				<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_9.png.90a94737b82abe10639ae396b97949ab.png" data-fileid="86854" data-fileext="png" rel=""><img data-fileid="86854" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_9.png.90a94737b82abe10639ae396b97949ab.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_9.png.90a94737b82abe10639ae396b97949ab.png" loading="lazy"></a></p>			</td>		</tr>	</tbody></table><h2>Combining a Bar Chart with a Line Chart</h2><p>The use of two different axes makes it easier to see the trends. However, the lines have a tendency to overlap since both charts will rise to the same height. Combining a bar chart with a line chart is a good solution to this issue.</p><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>Edit the chart data in the first line chart. Copy the <strong>Sales</strong> series</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>Delete the first line chart</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>Right-click the <strong>Multi Axis</strong> chart and add a new <strong>Bar</strong> chart</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>Edit the bar chart data and paste the series</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>The combined use of bar and line charts makes the data easier to understand quickly</td>		</tr>	</tbody></table><h3>What's Next?</h3><p>These sample charts may be improved in many ways:</p><ul>	<li>The axes should be labeled more clearly</li>	<li>A chart title makes it easier for a viewer to understand it quickly</li></ul><p>The report can now be deployed to JasperReports Server for use in a dashboard or to be scheduled for regular delivery.</p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_1.png.2c971c4b6cd1d7b69e49812fa7ce529d.png" data-fileid="86844" data-fileext="png" rel=""><img data-fileid="86844" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_1.png.2c971c4b6cd1d7b69e49812fa7ce529d.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_1.png.2c971c4b6cd1d7b69e49812fa7ce529d.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_2.png.7d00ceb41394e5e2db26618e3cdc7835.png" data-fileid="86846" data-fileext="png" rel=""><img data-fileid="86846" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_2.png.7d00ceb41394e5e2db26618e3cdc7835.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_2.png.7d00ceb41394e5e2db26618e3cdc7835.png" loading="lazy"></a></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_3.png.64297ca0bf3220bbe8b28fcf4def1d2f.png" data-fileid="86848" data-fileext="png" rel=""><img data-fileid="86848" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_3.png.64297ca0bf3220bbe8b28fcf4def1d2f.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_3.png.64297ca0bf3220bbe8b28fcf4def1d2f.png" loading="lazy"></a></p><p></p><p></p><p></p><p></p><p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_8.png.e059208151b8c8078208b7edce0b2e0a.png" data-fileid="86853" data-fileext="png" rel=""><img data-fileid="86853" class="ipsImage ipsImage_thumbnailed" alt="JEM_MultiAxisChart_8.png.e059208151b8c8078208b7edce0b2e0a.png" src="//media.invisioncic.com/i328763/monthly_2013_05/JEM_MultiAxisChart_8.png.e059208151b8c8078208b7edce0b2e0a.png" loading="lazy"></a></p><p></p>]]></description><guid isPermaLink="false">1069</guid><pubDate>Mon, 20 May 2013 21:12:55 +0000</pubDate></item><item><title>Sun OpenJDK JVM Garbage Collection Tuning</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/sun-openjdk-jvm-garbage-collection-tuning/</link><description><![CDATA[<h2>Introduction</h2><p>This tutorial covers basic performance diagnostic and tuning techniques for Sun and OpenJDK JVM garbage collection. The tutorial focuses on basic memory problems and command line settings for improving garbage collection performance when running JasperReports Server.</p><h3>Objectives</h3><p>This guide will enable you to:</p><ul>	<li><a href="#Diagnosing_Memory_Problems" rel="">Diagnose memory problems</a>	</li><li><a href="#Adding_and_Modifying_JVM_Command_Line_Options" rel="">Add/Modify JVM command line options to improve garbage collection performance</a></li>	<li><a href="#Increase_Heap_Space_And_Perm_Gen_Space" rel="">Increase heap space and perm gen space as needed</a></li></ul><h3>Pre-Requisites</h3><ul>	<li>Basic administration of common J2EE web or application servers ( Tomcat, JBoss, GlassFish )</li>	<li>Required permissions to shutdown and restart the server and edit config files</li>	<li>Java 5.0 or later</li></ul><p><em><strong>Assumption:</strong></em> Use of bundled Tomcat included with JasperReports Server</p><h2>Diagnosing Memory Problems</h2><p>Steps for diagnosing memory problems and monitoring memory usage:</p><ul>	<li>Launch JConsole</li>	<li>Ask users to use JasperReports Server or simulate load with QA tool</li>	<li>Watch memory usage</li></ul><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>				<p>Open the file <strong>/apache-tomcat/bin/setenv.bat</strong></p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<p>Add the following JVM options to the JAVA_OPTS variable:</p>				<ul>					<li>Dcom.sun.management.jmxremote </li>					<li>Dcom.sun.management.jmxremote.port=9004 </li>					<li>com.sun.management.jmxremote.authenticate=false </li>					<li>Dcom.sun.management.jmxremote.ssl=false </li>					<li>verbose:gc </li>					<li>XX:+PrintGCDetails </li>					<li>XX:+PrintGCTimeStamps </li>					<li>XX:-TraceClassUnloading</li>					<li>Xloggc:"apache-tomcatwebappsjasperserver-proWEB_INFlogsgc.log"</li>				</ul>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>Restart JasperReports Server</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>Launch the <strong>/bin/JConsole.exe application</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>Click the <strong>Remote</strong> tab and enter the following values:				<ul>					<li><strong>Host or ip:</strong>  (localhost if running locally)</li>					<li><strong>Port:</strong> 9004</li>					<li><strong>Username and Password:</strong> </li>				</ul>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">6</td>			<td>Click the <strong>Memory</strong> tab</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">7</td>			<td>Either have users use JasperReports Server or use a load testing tool (such as LoadRunner) to simulate peak load conditions.</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">8</td>			<td>				<p>Observe the memory usage characteristics. Normal usage will look like this:</p>				<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/graph1.jpg.81fed7ee436ced85e80f3ccc1a124409.jpg" data-fileid="86752" data-fileext="jpg" rel=""><img data-fileid="86752" class="ipsImage ipsImage_thumbnailed" alt="graph1.jpg.81fed7ee436ced85e80f3ccc1a124409.jpg" src="//media.invisioncic.com/i328763/monthly_2013_05/graph1.jpg.81fed7ee436ced85e80f3ccc1a124409.jpg" loading="lazy"></a></p>				<p>Whereas a situation where garbage collection is inadequate or nonexistent will look like this:</p>				<p><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2013_05/garbagecollection2.jpg.9a05328848a8214d116478bb85a556a7.jpg" data-fileid="86753" data-fileext="jpg" rel=""><img data-fileid="86753" class="ipsImage ipsImage_thumbnailed" alt="garbagecollection2.jpg.9a05328848a8214d116478bb85a556a7.jpg" src="//media.invisioncic.com/i328763/monthly_2013_05/garbagecollection2.jpg.9a05328848a8214d116478bb85a556a7.jpg" loading="lazy"></a></p>				<p>If the “valleys” of the memory usage graph don’t return to a baseline and memory usage is increasing over time, then there is either a memory leak or garbage collection problem.</p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">9</td>			<td>Open the <strong>apache-tomcatwebappsjasperserver-proWEB-INFlogsgc.log</strong> file</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">10</td>			<td>Look for messages that start with<strong> </strong><strong>GC failed</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">11</td>			<td>				<p>If garbage collection failures occur right before system crashes, it might be helpful to try using another garbage collection algorithm.</p>				<p><br>					See the <strong>Adding/Modifying JVM Command Line Options</strong> section below.</p>			</td>		</tr>	</tbody></table><h2>Adding and Modifying JVM Command Line Options</h2><p>Overview to change garbage collection algorithm in use:</p><ul>	<li>Add or Modify JVM settings</li>	<li>Restart JasperReports Server</li>	<li>Watch memory usage</li></ul><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>Open /apache-tomcat/bin/setenv.bat</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>Add the following JVM options to the <strong>JAVA_OPTS</strong> variable:				<ul>					<li>XX:+UseConcMarkSweepGC </li>					<li>XX:+CMSIncrementalMode </li>					<li>XX:+CMSIncrementalPacing </li>					<li>XX:CMSIncrementalDutyCycleMin=0  (5.0 JVM only)</li>					<li>XX:CMSIncrementalDutyCycle=10  (5.0 JVM only)</li>				</ul>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>Restart JasperReports Server</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>Either have users use JasperReports Server or use a load testing tool (such as LoadRunner) to simulate peak load conditions.</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>Watch the <strong>apache-tomcatwebappsjasperserver-proWEB-INFlogsgc.log and apache-tomcatwebappsjasperserver-proWEB-INFlogsjasperserver.log</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">6</td>			<td>Watch for OutOfMemoryExceptions and PermGenSpace errors</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">7</td>			<td>If either occurs, change the JVM heap space settings. See the <strong>Increase Heap Space And Perm Gen Space</strong> section below.</td>		</tr>	</tbody></table><h2>Increase Heap Space And Perm Gen Space</h2><table align="center" border="1" cellpadding="1" cellspacing="1" style="margin:15px;" width="100%">	<tbody>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;"><strong>Step</strong></td>			<td><strong>Action</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">1</td>			<td>Open <strong>/apache-tomcat/bin/setenv.bat</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">2</td>			<td>				<p>If the error is an OutOfMemoryException, set the <strong>Xms</strong> and <strong>Xmx</strong> options to higher values in the <strong>JAVA_OPTS</strong> variable.</p>				<p><br>					For better performance, set the <strong>Xms</strong> and <strong>Xmx</strong> options to the same value.</p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">3</td>			<td>				<p>If the error is a PermGenSpace error, set the <strong>XX:PermSize</strong> and <strong>XX:MaxPermSize</strong> options to higher values in the <strong>JAVA_OPTS</strong> variable.</p>				<p>For better performance, set the <strong>XX:PermSize</strong> and <strong>XX:MaxPermSize</strong> options to the same value</p>			</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">4</td>			<td>Restart JasperReports Server</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">5</td>			<td>Either have users use the system or use a load testing tool (such as LoadRunner) to simulate peak load conditions.</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">6</td>			<td>Watch the <strong>apache-tomcatwebappsjasperserver-proWEB-INFlogsgc.log and apache-tomcatwebappsjasperserver-proWEB-INFlogsjasperserver.log</strong></td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">7</td>			<td>If the errors persist, repeat steps 2-6 until the errors disappear.</td>		</tr>		<tr>			<td style="text-align:center;vertical-align:middle;width:50px;">8</td>			<td>				<p>If the errors persist after reaching the maximum allowable heap sizes (usually around 1.3 gb), consider migrating to 64 bit hardware or use additional server hardware in a cluster with a load-balancing appliance.</p>			</td>		</tr>	</tbody></table><h3>What's Next?</h3><p>For additional information, refer to the following:</p><ul>	<li><a href="/documentation" rel="">JasperReports Server Ultimate Guide</a>	</li><li>JasperReports Server Professional Administrator Guide, located in the <strong>docs</strong> folder</li>	<li><a href="http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html" rel="external nofollow">Tuning Garbage Collection with the Java 5.0 Virtual Machine</a></li></ul><h4>Written By</h4><p>This tutorial was written by Steve Park, Professional Services Consultant, June 2009.</p><p></p><p></p>]]></description><guid isPermaLink="false">1061</guid><pubDate>Fri, 17 May 2013 18:07:06 +0000</pubDate></item><item><title>Steps to add JRQueryExecuterFactory to JasperReports Server</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/steps-add-jrqueryexecuterfactory-jasperreports-server/</link><description><![CDATA[<p>This article assumes that you've already implemented a custom query executor and you only need to add it to JasperReports Server.</p><h2>Adding JRQueryExecuterFactory</h2><p>To add a custom JRQueryExecuterFactory to JasperReports Server all you have to do is add it into jasperreports.properties file under the /Jasperserver-pro/WEB-INF/classes/ folder as follows:</p><p style="margin-left:40px;"><em><span style="color:#696969;">net.sf.jasperreports.query.executer.factory.sql=<br />	com.jaspersoft.commons.util.JSControlledJdbcQueryExecuterFactory</span></em></p><p>where last part of the key - sql - is a language your executer is going to understand.  </p>]]></description><guid isPermaLink="false">68</guid><pubDate>Tue, 04 Aug 2009 23:47:22 +0000</pubDate></item><item><title>Stop Subreports showing on Excluded Bands for CSV or XLS</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/stop-subreports-showing-excluded-bands-csv-or-xls/</link><description><![CDATA[<p></p><h2>Issue Description:</h2><p>[toc on_off::hide=1]</p><p>What is involved with stopping a Sub-Report displaying data on an excluded band? We have tried both of the below without success:</p><p style="margin-left:40px;"><em><span style="color:#696969;">&lt;property name="net.sf.jasperreports.export.csv.exclude.origin.subreport.repo:sub1-myreport.jrxml" value="detail"/&gt;</span></em></p><p>	&lt;property name="net.sf.jasperreports.export.csv.exclude.origin.subreport.sub1-myreport.jrxml" value="detail"/&gt;</p><hr /><h2>Resolution:</h2><p>Please find below a sample on having a subreport named "AddressReport" have its two bands, columnHeader and detail, excluded from the CSV export. In addition, please note the "AddressReport" is the name of the subreport in its own JRXML, independent of the name/subreport expression in the master report.</p><p style="margin-left:40px;"><em><span style="color:#696969;">&lt;property name="net.sf.jasperreports.export.csv.exclude.origin.report.mysubreport0" value="AddressReport"/&gt;</span></em></p><p>	&lt;property name="net.sf.jasperreports.export.csv.exclude.origin.band.mysubreport0" value="columnHeader"/&gt;</p><p>	&lt;property name="net.sf.jasperreports.export.csv.exclude.origin.report.mysubreport1" value="AddressReport"/&gt;</p><p>	<em><span style="color:#696969;">&lt;property name="net.sf.jasperreports.export.csv.exclude.origin.band.mysubreport1" value="detail"/&gt;</span></em></p><hr /><p><strong><em>Ref. Case #00027832</em></strong> -- 06:06, 10 August 2012 (UTC)</p><p> </p>]]></description><guid isPermaLink="false">510</guid><pubDate>Fri, 10 Aug 2012 06:06:32 +0000</pubDate></item><item><title>How to Make sure your logging levels are appropriate</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-make-sure-your-logging-levels-are-appropriate/</link><description><![CDATA[<h2>Making sure your logging levels are appropriate</h2><p>[toc on_off::hide=1]</p><p>Take a look at your log4j.properties file (located in <em><span style="color:#696969;">/jasperserver-pro/WEB-INF</span></em> directory), and make sure that the log4j.rootLogger property isn't accidentally set to DEBUG; when it's set to DEBUG, the application will slow down significantly as it logs debugging statements to the <em><span style="color:#696969;">/jasperserver-pro/WEB-INF/logs/jasperserver.log</span></em> file (file I/O is notoriously slow).</p><h2>See Also</h2><ul>	<li><a href="/node/200740" rel="">How to Produce Clean Log Files for Troubleshooting</a>	</li><li><a href="/node/200631" rel="">Log4j.properties - JasperReports Server</a></li></ul>]]></description><guid isPermaLink="false">992</guid><pubDate>Thu, 04 Apr 2013 17:11:07 +0000</pubDate></item><item><title>Regular expression testing for ESAPI security configuration.</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/regular-expression-testing-esapi-security-configuration/</link><description><![CDATA[<p>Our security framework relies on regular expressions for validation rules which restrict certain inputs and values.  The validation rules can be modified and tools exist to help developers test the regular expressions with their necessary inputs.  One useful tool is <a href="http://www.regexplanet.com/advanced/java/index.html." rel="external nofollow">http://www.regexplanet.com/advanced/java/index.html.</a>  Here we highlight an example usage.</p><p>Below is a commonly used validation rule which ensures only sanctioned, secure SQL statements are allowed into the application for execution.<br>	Validator.ValidSQL=^s*((?i)select)s+[^;]+$ </p><p>To test via the regexplanet.com site, enter your expression into the "Regular Expression:" field.   When you enter the string, you must exclude any escaping backslashs which are present because these are strings passed to our java application, so try:<br>	^s*((?i)select)s+[^;]+$</p><p><span style="font-size:14px;"><span style="color:rgb(105,105,105);"><span style="font-family:arial, helvetica, sans-serif;"><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2012_12/expression_field.jpg.a50b77b02c3b2283cf516a3ef65b4c84.jpg" data-fileid="86178" data-fileext="jpg" rel=""><img data-fileid="86178" class="ipsImage ipsImage_thumbnailed" alt="expression_field.jpg.a50b77b02c3b2283cf516a3ef65b4c84.jpg" src="//media.invisioncic.com/i328763/monthly_2012_12/expression_field.jpg.a50b77b02c3b2283cf516a3ef65b4c84.jpg" loading="lazy"></a></span></span></span></p><p> </p><p>Next list various inputs, sql statements in this case, which you feel are potentially problematic.  These can be things you want to ensure are excluded, or they can be input values from your legacy system that you want to ensure match our validation rules:</p><p> </p><p><span style="font-size:14px;"><span style="color:rgb(105,105,105);"><span style="font-family:arial, helvetica, sans-serif;"><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2012_12/inputs.JPG.da68875ab4401882916f35651935cebd.JPG" data-fileid="86179" data-fileext="JPG" rel=""><img data-fileid="86179" class="ipsImage ipsImage_thumbnailed" alt="inputs.JPG.da68875ab4401882916f35651935cebd.JPG" src="//media.invisioncic.com/i328763/monthly_2012_12/inputs.JPG.da68875ab4401882916f35651935cebd.JPG" loading="lazy"></a></span></span></span></p><p> </p><p>Lastly, hit the test button to find your results.  If your required input value does not match, then you need to modify the regular expression.   Our example here uses SQL statements, but this applies to any of the validation rules used throughout our validation.properties configuration file.   Note that the results page outputs the "Java string" as it would need to be formatted in the valiation.properties file.</p><p><span style="font-size:14px;"><span style="color:rgb(105,105,105);"><span style="font-family:arial, helvetica, sans-serif;"><a class="ipsAttachLink ipsAttachLink_image" href="//media.invisioncic.com/i328763/monthly_2012_12/results.JPG.924561e461b4262669a28db2ebc3bce1.JPG" data-fileid="86180" data-fileext="JPG" rel=""><img data-fileid="86180" class="ipsImage ipsImage_thumbnailed" alt="results.JPG.924561e461b4262669a28db2ebc3bce1.JPG" src="//media.invisioncic.com/i328763/monthly_2012_12/results.JPG.924561e461b4262669a28db2ebc3bce1.JPG" loading="lazy"></a></span></span></span></p><p> </p><p>For more information on the security framework see article: <a href="/node/200915" rel="">Jaspersoft 4.5.0 Security Changes and Configuration</a></p><hr style="color:rgb(170,170,170);background-color:rgb(170,170,170);border:0px;margin:0.2em 0px;font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;"><p><span style="font-size:14px;"><span style="color:rgb(105,105,105);"><span style="font-family:arial, helvetica, sans-serif;"><i><b>Ref. Case #00029994 </b></i></span></span></span></p>]]></description><guid isPermaLink="false">860</guid><pubDate>Thu, 13 Dec 2012 22:59:26 +0000</pubDate></item><item><title>How can we control barcode font, justification, position</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-can-we-control-barcode-font-justification-position/</link><description><![CDATA[<p>[toc on_off::hide=1]</p><h2>Issue Description:</h2><p>How can we control the justification of the barcode (left/right etc) or the position within the cell.</p><hr /><h2>Resolution:</h2><p>Barcodes use the font from the style associated to the report element. Note though that fonts from font extensions will not work, you need to use a font that's installed in the system/JVM. That's due to a limitation of the Barcode4J API.</p><p>Setting the horizontal alignment in the style associated to the element affects the position of the barcode.</p><hr style="color:rgb(170,170,170);background-color:rgb(170,170,170);border:0px;margin:0.2em 0px;font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;" /><p style="font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;background-color:rgb(255,255,255);"><i><b>Ref. Case #00027903 </b></i></p>]]></description><guid isPermaLink="false">724</guid><pubDate>Wed, 24 Oct 2012 14:43:52 +0000</pubDate></item><item><title>Topics not showing in the 'Add New Report' - topics</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/topics-not-showing-add-new-report-topics/</link><description><![CDATA[<p>This article describes how to change your default topic folder.</p><h2 style="font-size:17px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgb(0,51,102);line-height:1.1;color:rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);"><span><b>Issue Description:</b></span></h2><p>[toc on_off::hide=1]</p><p>I've created a topic following these steps:<br />	1. Add new report<br />	2. Select the event manager domain in the event manager folder.<br />	3. Selected the 'events' which are now under 'Selected fields'.<br />	4. Click on 'save as topic' and put it in the myfolder/manager-topics/ folder.<br />	5. I then clicked table, added a few fields, and then saved.<br />	<br />	I can see the topic in the folder of type 'Domain Topic'. It's not showing up when I want to create 'Add new Report' and select topics. I've done it even as superuser in case it was a permissions issue.<br />	<br />	What makes a topic appear in this list?</p><hr style="color:rgb(170,170,170);background-color:rgb(170,170,170);border:0px;margin:0.2em 0px;font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;" /><p><a style="color:rgb(0,51,102);background-image:none;background-color:rgb(255,255,255);font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;" rel=""></a></p><h2 style="font-size:17px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgb(0,51,102);line-height:1.1;color:rgb(0,0,0);font-family:Arial, Helvetica, sans-serif;background-color:rgb(255,255,255);"><span><b>Resolution:</b></span></h2><p style="font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;background-color:rgb(255,255,255);">for topics to be considered topics they should be put into Adhoc Components/topics folder of the repository. In all other location they'll be considered ordinary reports (since they are a simple JRXML).</p><p style="font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;background-color:rgb(255,255,255);">The folder where topics are to be stored to be considered as topics is defined as a search pattern. By default everything with the path %/adhoc/topics will be used. If you want to modify this you need to change these configurations:<br />	<br />	file: applicationContext-adhoc.xml<br />	bean: adhocEngineService<br />	properties: realmsURI, realmsURIParentSQLPatternList<br />	<br />	If they should be allowed to save their domain topics in the home folder then you'd need to extend<br />	<br />	file: applicationContext-semanticLayer.xml<br />	bean: slConfig<br />	properties: saveTopicURIPatternList</p><hr style="color:rgb(170,170,170);background-color:rgb(170,170,170);border:0px;margin:0.2em 0px;font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;" /><p style="font-family:Arial, Helvetica, sans-serif;font-size:13px;line-height:19.5px;background-color:rgb(255,255,255);"><i><b>Ref. Case #00028126 </b></i></p>]]></description><guid isPermaLink="false">723</guid><pubDate>Wed, 24 Oct 2012 14:38:45 +0000</pubDate></item><item><title>iReport Designer Tutorials</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/ireport-designer-tutorials/</link><description><![CDATA[<h2>Jaspersoft tutorials</h2><ul>	<li><a href="http://www.jaspersoft.com/jaspersoft-tutorials" rel="external nofollow">Free Jaspersoft Tutorials</a></li></ul><h2>Video tutorials (iReport 3.5.x)</h2><ul>	<li><a href="http://digilander.libero.it/gioppoluca/How-tos/teiid/teiid.html" rel="external nofollow">iReport and TEIID</a> Teiid is part of JBoss. It's a data virtualization system that allows applications to use data from multiple, heterogenous data stores. This demo shows a single report created in iReport accessing data in MySQL and Oracle.</li></ul><h2>Community provided tutorials</h2><p><strong>Tutorials in Spanish provided by Alfonso Blanco Criado about iReport 3.0 (old version)</strong></p><ol>	<li><a href="http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=subreport" rel="external nofollow">Subinformes con iReport</a>	</li><li><a href="http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=graficosiReport" rel="external nofollow">Gráficos con iReport</a></li>	<li><a href="http://www.adictosaltrabajo.om/tutoriales/tutoriales.php?pagina=ireportMultilanguage" rel="external nofollow">Exportar PDF multiidioma con iReport</a></li>	<li><a href="http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=jReportHtml" rel="external nofollow">Informes con código HTML</a></li>	<li><a href="http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=ireportXml" rel="external nofollow">Usar un DataSource XML para crear informes con iReport</a></li>	<li><a href="http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=odbcIreport" rel="external nofollow">Informes con fuente de datos ODBC</a></li></ol><p><strong>Tutorial in Brazilian Portuguese provided by </strong><b>Flávio Araújo</b><strong> about iReports 3.5.0 and NetBeans 6.5</strong></p><ul>	<li><a href="http://flaviowd.wordpress.com/2009/04/26/tutorial-gerando-relatorios-com-jasperreports-e-ireports-no-netbeans/" rel="external nofollow">Gerando Relatórios Com JasperReports e iReports no Netbeans</a></li></ul><p> </p><p> </p>]]></description><guid isPermaLink="false">532</guid><pubDate>Mon, 03 Aug 2009 18:42:14 +0000</pubDate></item><item><title>Custom query executors: How to run import/export scripts when using them?</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/custom-query-executors-how-run-importexport-scripts-when-using-them/</link><description><![CDATA[<p></p><h2>The problem</h2><p>[toc on_off::hide=1]</p><p>If you are on this page that probably means that you have implemented a custom query executor and that you may have an error like this doing your import from the Buildomatic (using the js-export.bat):</p><p style="margin-left:40px;"><em><span style="color:#696969;">2012-06-25 06:26:28,761 ERROR BaseExportImportCommand:45 - com.jaspersoft.jasperserver.api.JSExceptionWrapper:</span></em></p><p>	net.sf.jasperreports.engine.JRRuntimeException: No query executer factory registered for the 'XXX' language. com.jaspersoft.jasperserver.api.JSExceptionWrapper:</p><p>	net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: No query executer factory registered for the 'XXX' language. at</p><p>	net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:247) at</p><p>	net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230) at</p><p>	net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)</p><p>where XXX is the custom query language.</p><h2>The Solution</h2><p>Prior to run js-export.bat you need to add the customization in the Buildomatic's sub-folder conf_source/iePro so that the query executor language can be identified. It should also include jasperreports.properties where it needs to be configured to use soap query executor language.</p><p> </p>]]></description><guid isPermaLink="false">498</guid><pubDate>Thu, 26 Jul 2012 15:20:54 +0000</pubDate></item><item><title>Excel Export Layout not Aligned Correctly</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/excel-export-layout-not-aligned-correctly/</link><description><![CDATA[<p></p><h2>Issue:</h2><p>[toc on_off::hide=1]</p><p>If the Excel export layout does not align correctly, you can try changing the default properties.</p><p>The default properties are set to a more data centric view.</p><hr /><h2>Resolution:</h2><p>Try these properties for a more layout centric Excel export of a report.</p><p style="margin-left:40px;"><em><span style="color:#696969;">&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.collapse.row.span" rel="external nofollow">net.sf.jasperreports.export.xls.collapse.row.span</a>" value="false"&gt;&lt;/property&gt;</span></em></p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.create.custom.palette" rel="external nofollow">net.sf.jasperreports.export.xls.create.custom.palette</a>" value="true"&gt;&lt;/property&gt;</p><p>	<em><span style="color:#696969;">&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.detect.cell.type" rel="external nofollow">net.sf.jasperreports.export.xls.detect.cell.type</a>" value="true"&gt;&lt;/property&gt;</span></em></p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.font.size.fix.enabled" rel="external nofollow">net.sf.jasperreports.export.xls.font.size.fix.enabled</a>" value="true"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.ignore.cell.background" rel="external nofollow">net.sf.jasperreports.export.xls.ignore.cell.background</a>" value="false"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.ignore.cell.border" rel="external nofollow">net.sf.jasperreports.export.xls.ignore.cell.border</a>" value="false"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.ignore.graphics" rel="external nofollow">net.sf.jasperreports.export.xls.ignore.graphics</a>" value="false"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.image.border.fix.enabled" rel="external nofollow">net.sf.jasperreports.export.xls.image.border.fix.enabled</a>" value="true"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.remove.empty.space.between.columns" rel="external nofollow">net.sf.jasperreports.export.xls.remove.empty.space.between.columns</a>" value="false"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.remove.empty.space.between.rows" rel="external nofollow">net.sf.jasperreports.export.xls.remove.empty.space.between.rows</a>" value="false"&gt;&lt;/property&gt;</p><p>	&lt;property name="<a href="http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.white.page.background" rel="external nofollow">net.sf.jasperreports.export.xls.white.page.background</a>" value="true"&gt; &lt;/property&gt;</p><hr /><p><strong><em>Ref. Case #00020803</em></strong> -- 14:15, 1 September 2011 (UTC)</p><p> </p><p> </p>]]></description><guid isPermaLink="false">248</guid><pubDate>Thu, 01 Sep 2011 14:15:13 +0000</pubDate></item></channel></rss>
