Jaspersoft BI Tools

iReport,Jaspersoft Design Studio,Jaspersoft Server, Schema Workbench,Analysis,Dashboards, Self Service BI, Domains,Topics,Ad-Hoc Reports, Jaspersoft ETL, Embedding BI,HTML-5 charts, Fusion Charts,JFree Charts,Drill down reports , Drill down Dashboards,Visualize.js, Performance Tuning, D3 Charts, Jaspersoft Customization

Tuesday, May 06, 2014

Do you work with multiple databases in BI - Quick info of drivers details of leading databases & client tools info


Hi guys,

Not a big effort but keeping all info together for quick check of driver details in blog site...

Oracle 10g
Driver class
oracle.jdbc.driver.OracleDriver
URL
jdbc:oracle:thin:@localhost:1521:orcl where orcl is SID
User Name/password
system/manager
Download driver at

PostgreSQL
Driver class
org.postgresql.Driver
URL
jdbc:postgresql://localhost:5432/foodmart
User Name/password
postgres/postgres
Download driver at

MySQL
Driver class
com.mysql.jdbc.Driver
URL
jdbc:mysql://localhost:3306/foodmart 
User Name/password
root/password
Download driver at

MS-SQL Server
Driver class
com.microsoft.sqlserver.jdbc.SQLServerDriver
or
MSSQLServer (com.merant.datadirect.jdbc.sqlserver.SQLServerDriver)
URL
jdbc:sqlserver://localhost:1433/DatabaseName
User Name/password
Username/password for ms-sql server

net.sourceforge.jtds.jdbc.Driver

Syntax:
jdbc:jtds:sqlserver://<host>:<port>/<database_name>
Eg:
jdbc:jtds:sqlserver://127.0.0.1:1433/test
Download driver at


Open source database client Tools
DB Visulizer
Squerriel

Thank you
Sadakar
BI developer

Saturday, May 03, 2014

Change font color based on Condition in Jasper iReport – Work out with Styles


Change font color based on Condition in Jasper iReport – Work out with Styles

Some times you may get a requirement to show the values in colored based on a condition.
This we can achieve using Styles in jasper iReport.

Example : A scenario
Print values in green color if value(s)>=30  and print values in red color if value(s)<30

1) Take a simple query which gives you some numeric values( in this case it is BigDecimal).
2) From the Report Inspector, right click on Report ->Properties -> Language ->Groovy (it is by default, but you need to check).
3) From the same Report Inspector, Click on Styles and add two conditional styles.
4) In the first one write below condition in condition Expression : $F{storesales}>=30 and select fore color as green [22,180,51]
5) In the second conditional style write below condition : $F{storesales}<30 and select the fore color as red [242,41,98]
6) select the field on the detail band ( you can do the same on table component or cross tab component) and go to the properties of it and give style as style1 ( style1 is the name of the style given, you can give your own name).
7) Save the report and see the preview.

Eg JRXML file :
Click this link to download

Sample output :

 
Other References :
1) http://stackoverflow.com/questions/8754448/change-text-field-data-color-foreground-color-based-on-condition-in-jasperrepo

2) Supermart Performance Dashboard in Professional jasper server.

3) http://darkbytetechscrapbook.blogspot.in/2011/12/ireport-changing-text-colour-based-on.html