<?xml version="1.0"?>
<rss version="2.0"><channel><title>Knowledge Base: Best Practices</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/page/27/?d=6</link><description>Knowledge Base: Best Practices</description><language>en</language><item><title>How to center Login dialog with themes</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/how-center-login-dialog-themes/</link><description><![CDATA[<p></p><h2>Issue:</h2><p>[toc on_off::hide=1]</p><p>If you are having trouble trying to center the login dialog in the Jasperserver welcome page, try the following solution. You would do this by using overrides_custom.css. Refer to Chapter 11.1<em>, Changing the UI With Themes,</em> of the <em>Jasperserver Ultimate Guide</em> for more information about <strong><em>overrides_custom.css</em></strong>.</p><hr /><h2>Resolution:</h2><p style="margin-left:40px;"><em><span style="color:#696969;">loginPage #copy {</span></em></p><p>	    display: none;</p><p>	}</p><p style="margin-left:40px;"><em><span style="color:#696969;">loginPage #loginForm {</span></em></p><p>	    position: static;</p><p>	}</p><p style="margin-left:40px;"><em><span style="color:#696969;">loginPage .login {</span></em></p><p>	    position: relative;</p><p>	    width: 250px;</p><p>	    float:none;</p><p>	    margin-left:auto;</p><p>	    margin-right:auto;</p><p>	}</p><hr /><p><strong><em>Ref. Case #00023797</em></strong> -- 23:48, 13 January 2012 (UTC)</p><p> </p><p> </p>]]></description><guid isPermaLink="false">338</guid><pubDate>Fri, 13 Jan 2012 23:48:02 +0000</pubDate></item><item><title>Example using vmc push</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/example-using-vmc-push/</link><description><![CDATA[<p></p><table style="width:100%;">	<tbody>		<tr>			<td style="text-align:left;vertical-align:top;width:50%;">				<h2>Example of deploying JasperReports Server to Cloud Foundry using vmc</h2>				<p>This example shows JasperReports Server being deployed to cloudfoundry.com. Exactly the same steps apply when deploying to Micro Cloud Foundry.</p>			</td>			<td style="text-align:center;vertical-align:middle;width:50%;">				<p style="margin-left:40px;">[toc]</p>			</td>		</tr>	</tbody></table><p style="margin-left:40px;"><span style="color:#696969;"><em>$ vmc target <a href="http://api.cloudfoundry.com" rel="external nofollow">http://api.cloudfoundry.com</a></em></span></p><p>	Successfully targeted to <a href="http://api.cloudfoundry.com" rel="external nofollow">http://api.cloudfoundry.com</a></p><p style="margin-left:40px;"><span style="color:#696969;"><em>$ vmc login</em></span></p><p>	Attempting login to <a href="http://api.cloudfoundry.com" rel="external nofollow">http://api.cloudfoundry.com</a></p><p>	<span style="color:#696969;"><em>Email: mdahlman@jaspersoft.com</em></span></p><p>	Password: ****************</p><p>	Successfully logged into <a href="http://api.cloudfoundry.com" rel="external nofollow">http://api.cloudfoundry.com</a></p><pre class='ipsCode prettyprint lang-auto prettyprinted'>
$ vmc list
+---------------------+----+---------+--------------------------------------+-------------------------------------------+
| Application         | #  | Health  | URLS                                 | Services                                  |
+---------------------+----+---------+--------------------------------------+-------------------------------------------+
| jaspersoft-bus-data | 1  | RUNNING | jaspersoft-bus-data.cloudfoundry.com | mongodb-data, postgresql-data, mysql-data |
+---------------------+----+---------+--------------------------------------+-------------------------------------------+
</pre><p>This application has my business data. We will deploy JRS in order to perform Business Intelligence on these data sources.</p><p style="margin-left:40px;"><span style="color:#696969;"><em>$ vmc push </em></span></p><p style="margin-left:40px;"><span style="color:#696969;"><em>Would you like to deploy from the current directory? [Yn]: y</em></span></p><p>	Application Name: jaspersoft-421</p><p>	Application Deployed URL [jaspersoft-421.cloudfoundry.com]: Detected a Java Web Application, is this correct? [Yn]: y</p><p>	Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]: 1G</p><p>	Creating Application: OK</p><p>	Would you like to bind any services to 'jaspersoft-421'? [yN]: y</p><p>	Would you like to use an existing provisioned service? [yN]: n</p><p>	The following system services are available 1: mongodb 2: mysql 3: postgresql 4: rabbitmq 5: redis</p><p>	Please select one you wish to provision: 2</p><p>	Specify the name of the service [mysql-8520e]: jrs-repo</p><p>	## JasperReports Server expects this name by default.</p><p>	Creating Service: OK</p><p>	## It is specified in WEB-INF/data-services.properties</p><p>	Binding Service [jrs-repo]: OK</p><p>	Uploading Application: Checking for available resources: OK</p><p>	Processing resources: OK</p><p>	Packing application: OK</p><p>	Uploading (15K): OK</p><p>	Push Status: OK</p><p>	Staging Application: OK</p><p>	Starting Application: OK</p><h3>Additional Notes</h3><ul>	<li><strong>Repository Database</strong> - JasperReports Server supports both PostgreSQL and MySQL as repository databases to hold its metadata. Only MySQL is supported as a repository at this time in the CloudFoundry distribution.</li>	<li><strong>Business Database</strong>    - JasperReports Server can perform reporting and analysis on any JDBC data source as well as on custom data sources. </li></ul>]]></description><guid isPermaLink="false">573</guid><pubDate>Mon, 23 Apr 2012 22:37:36 +0000</pubDate></item><item><title>Compare previous row and change color</title><link>https://community.jaspersoft.com/knowledgebase/best-practices/compare-previous-row-and-change-color/</link><description><![CDATA[<p></p><table style="width:100%;">	<tbody>		<tr>			<td style="text-align:left;vertical-align:middle;width:50%;">				<h2>Issue:</h2>				<p>The following is an example on how to compare the previous row with the current row and change the text color of the current row display based on the comparison.</p>			</td>			<td style="text-align:center;vertical-align:middle;width:50%;">[toc]</td>		</tr>	</tbody></table><h2>Resolution:</h2><ol start="1" style="list-style-type:lower-alpha;">	<li>		<p>SET up conditional styling</p>		<p><span style="color:#696969;"><em>&lt;style name="conditionxyz"&gt;</em></span></p><p>			    &lt;conditionalStyle&gt;</p><p>			        &lt;conditionExpression&gt;&lt;![CDATA[$V{delta_code}!=0]]&gt;&lt;/conditionExpression&gt;</p><p>			        &lt;style forecolor="#CCFFCC"/&gt;</p><p>			     &lt;/conditionalStyle&gt;</p><p>			&lt;/style&gt;</p>	</li><li>		<p>SET up the variables</p>		<p><span style="color:#696969;"><em>&lt;variable name="code" class="java.lang.String" resetType="Report" calculation="Nothing"&gt;</em></span></p><p>			    &lt;variableExpression&gt;&lt;![CDATA[$F{CODE}]]&gt;&lt;/variableExpression&gt;</p><p>			&lt;/variable&gt;</p><p>			&lt;variable name="init_code" class="java.lang.String" resetType="Report" calculation="Nothing"&gt;</p><p>			     &lt;variableExpression&gt;&lt;![CDATA[$V{code}]]&gt;&lt;/variableExpression&gt;</p><p>			&lt;/variable&gt;</p><p>			&lt;variable name="delta_code" class="java.lang.Integer" resetType="Report" calculation="Nothing"&gt;</p><p>			     &lt;variableExpression&gt;&lt;![CDATA[($V{code}==$V{init_code}) ? new Integer(1) : new Integer(0)]]&gt;&lt;/variableExpression&gt;</p><p>			&lt;/variable&gt;</p>	</li>	<li>		<p>SET up the display expression</p>		<p><span style="color:#696969;"><em>&lt;textField&gt;</em></span></p><p>			     &lt;reportElement style="conditionxyz" x="220" y="1" width="70" height="20"/&gt;</p><p>			     &lt;textElement/&gt;</p><p>			     &lt;textFieldExpression class="java.lang.String"&gt;&lt;![CDATA[$F{CODE}]]&gt;&lt;/textFieldExpression&gt;</p><p>			&lt;/textField&gt;</p>	</li></ol><hr /><p><strong><em>Ref. Case #00026893</em></strong> -- 19:22, 22 June 2012 (UTC)  </p>]]></description><guid isPermaLink="false">458</guid><pubDate>Fri, 22 Jun 2012 19:22:00 +0000</pubDate></item></channel></rss>
