Embedding BI Reports (Jasper Reports/ Jasper Server/ Pentaho Reports/ Pentaho Server)

There are many methods of embedding BI reports, this blog tries to explain the meaning of Embedded BI, different approaches which can be used, their respective advantages and disadvantages

 

A)     What is embedded BI?

Lets say you have developed your entire BI solution which includes reports, dashboards, mashups, analysis etc, the platform which is used can be anything like Jaspersoft or Pentaho. The process of integration of this BI solution with your existing application/software/portal is called Embedded BI.

Embedded BI provides a lot of advantages like ability to add more reports over and above the existing canned reports which your application might provide, the look and feel and customization of all the reports can be changed as per the software/user preference, better visualization, unified application for everything. Biggest advantage can be your product value will increase much more, hence resulting in much more sales and revenue.

a) Embedding using iFrame Method :-

iFrame method of embedding BI reports can be used for embedding Jasper server, Jasper reports and Pentaho server, Pentaho reports. The report pulled in this case is using iframe as a tag. Even though the report is external, but to an end customer he will not be able to recognize the same.

The advantages of using iFrame method is this method is fast and quick to implement. The disadvantages includes it will be difficult to manage user, also in this case there can be cross browser compatibility issues, security is a major issue here.

 

b) Embedding Using webservice:- Webservices can also be used to integrate reports, dashboard, interactive report or/and ad-hoc reports. We can use webservices to accept the information from the Jasper/Pentaho server, this Jasper server can be anywhere ( on Tomcat or any other server). Using webservices we will invoke the response from Jasper Server/Pentaho server. This response can be can be then embedded inside application/software. Jasper server/Pentaho server also supports RESTFUL service (JSON format responses). In this approach there are no or less security related issues.

The disadvantage of this approach is there are no interactive features available of the report which thus results in poor user experience. Also in order to handle and understand the responses from jasper server/Pentaho server, custom coding is required in the application. In case if we had put input controls in the report, the same functionality then needs to be implemented in the application via custom coding. Aside, having many webcalls at times can be resource intensive as well.

The advantage of this approach is webservices approach gives more seamless integration since there is no security issue and no thirdparty calls (like in the case of iframe). Also in this case there are no interbrowser compatibility issues (assuming it is handled by your developer team).

c) Embedding using Jasper/Pentaho Libraries:- In this method we create JRXML/Pentaho report (prpt) files using ireport/Pentaho report designer. Compile these reporting using Java API, and then use this compiled code to generate views using Jasper Server API calls

The advantage of this method is this gives the most seamless integration. Also since all the information is present as a part of the application/server, no third party calls are required.

Disadvantage of this approach is some interactivity is lost in this method. Also the input parameters are also required to be created in the own application via custom coding.

 

Please get in touch at [email protected] for much more details about the respective approach, how to embed the same using these approaches, which was is the best suited to your needs and much more.

Date Input Controls/ Components in Pentaho CDE with a working example

Hello guys…!!!

In this post you will learn about how to create date input controls in CDE.
The dashboard images which I am going to show below are having lots of .css code. I’m not covering all the things but concentrating only on Date input controls in CDE.

My Environment :
BI Server: Pentaho 4.5
CTools: Not found the version numbers of  C-Tools(Unable to check them)– perhaps..! lesser than 13
Database : hsqldb (Comes along with Pentaho installation — A java based small db for servers like pentaho)
NOTE: Images are taken in this post after creating the dashboard, please find the yellow rectangular boxes to understand.

You need to work out @ 3 places in “Components” section.
1. Generic
2. Selects
3. Charts
Explained from step 1 to step 3
You need to work out  @ 1 places in “Data Sources” section. i.e, all in “Properties”
I’m not concentrating on Layout part for this example. So wherever the HtmlObject you find in this example replace them with your working HtmlObjects.

Step 1: Creating parameters
* Design your dashboard as per your requirement ( In the images you can find the sample designs).
 In the “Components” section:
1. Click on components
2. Click on Generic
3. Click on Date parameter
4. Go to properties give the name
eg: param_start_date
5. Click + symbol  per another date parameter
6. Go to properties give the name
eg: param_end_date

Find the  image

Step 2: Creating Date input Components
In the “Components” section
1. Click on Components
2. Click on Selects
3. Click on “Date input Component”
4. Go to Properties give name. eg: start_date in  my example
5. In the properties give HtmlObject. eg: start_date_select
* HtmlObject is the name of the column where you are putting
your dateinput control.
6. Give  Parameter.[It will appear once you try to type]
eg: In step 1, created parameters. So here give “param_start_date”
7. Give Listeners[click on it, you will find the list of Listeners. Click OK]
8. Repeat 3-7 for “end_date” Date input
component.

Step 3:
Find the steps in image.

 
HtmlObject is the place where you are putting your chart.

Step 4: Applying parameters for Chart & Query
            In the “DataSources”
Find the steps in the image
Find the sub sequent image for  Parameters applying for chart & Query.

do same as shown in images.

Step 5:
Save the dashboard and then Click on “Preview” button.
See the images below for sample out put with date input controls.
Preview of the dashboard with out any input controls selection

Preview of the dashboard after selecting date input controls.. find the images below one by one.

Find the image for observing whether the chart becomes dynamic or not with different date input controls.

That’s it.. You are done with date input controls on dashboard.
Thank you for reading this small post.

Sadakar
[email protected]
Helical IT Solutions Pvt. Ltd,
Hyderabad.

Jaspersoft CE v/s EE / Having Jaspersoft EE functionality in Jaspersoft CE

Jaspersoft CE versus EE / Having Jaspersoft EE functionality in Jaspersoft CE

 

Jaspersoft is world’s leading Open source BI software with more than 1.75 million download and usage. It comes in two variants, one is the community edition which is free and the other is the enterprise edition. Via this blog, we would try to understand the differences between the CE and EE. Also, we will make an attempt to understand and have Jaspersoft Enterprise Edition functionality in Jaspersoft Community Edition. Many a times, customers (esp startups and SMEs) dont have the budget or requirement to go for a full license, but they want full functionality which are present in EE, for them we have also discussed possible way outs as well.

 

a) Report Designer: Jaspersoft is known for its pixel perfect reports. This is created by iReport designer (free and open source). This tool helps in creation of complex reports with charts, graphs, tabular data, cross tabs, images etc. These reports can further be downloaded in different formats.

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

b) Adhoc Report designer: Very beneficial for Business user, it gives a pivot kind of functionality, thus an end user can himself drag and drop the fields and create his own report on the fly. He can see this report as either a tabular data, or visualize it in different formats, save this and download this.

 

Availability: Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: In order to use adhoc reporting feature in Jaspersoft Community edition (CE), we can use a best of breed kind of solution. We can use Pentaho SAIKU plugin (its free), using this plugin for adhoc reporting, we can call it inside liferay and have adhoc reporting functionality in Jaspersoft as well.

 

c) Reporting Engine: Jasper reporting engine which is java based is again free and open source. It can fetch data from any kind of data source and provide picture perfect reports which can be seen, download (in different formats), printed.

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

d) Dashboards: A dashboard can be a mix and match of reports, data visualizations, web APIs data, interactive parameters etc. Dashboard functionality is present only in the Jaspersoft EE

 

Availability:  Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: For implementing dashboard inside Jaspersoft Community Edition (Jaspersoft CE), we will have to go ahead with a best of breed solution. What we can do is for dashboards, we can use Pentaho CDE and CDF components. For representation of that, we can either use liferay or Alfresco.

Another alternative is we can call multiple instances of ireports inside liferay, thus creating a dashboard. For this a portlet has to be developed in liferay.

 

e) Interactive report viewing: This lets user to see the columns and perform functions like filter, arrange, sort etc.

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

f) In-memory analysis: In memory basically helps in analyzing, seeing reports dashboards analysis etc on real-time and at a very high speed because it directly dumps all the information in its in-memory and doesn’t access db again and again for any requirement. This results in very high speed and throughput.

 

Availability: Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: Again, to implement In-memory analytics in Jaspersoft Community edition, we will have to use a best of breed solution. We can go with the Pentaho SAIKU plugin (which is free of cost) and liferay usage for representation

 

g) Server Repository: Place to store reports, dashboards, views, mashups, analytics, user profiles etc.

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

h) Report Scheduling / Report Bursting: Email scheduling of the reports (could be time or trigger based).

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

i) Support: Jaspersoft is having multiple level of supports like standard support, premium support but it is only available to enterprise edition customers.

 

Availability: Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: Jaspersoft CE customer, can either will entirely depend on community support or they can come to companies like us (Helical IT Solutions), which have expertise on Jaspersoft and can help out on all the issues.

 

 

j) Mobile Business Intelligence: – Native app supporting iOS and Android platform. Touch-based browser support for iPad. iOS and Android SDK for embedding BI in native mobile app.

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

k) Metadata Layer: Metadata basically means data about data content. Via metadata layer, we create another layer containing information about the database, hence thus implementing data level security.

 

Availability:    Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: For implementing metadata layer in Jaspersoft CE, what we can do is we can use OLAP server (which is present in CE – community edition) to design metadata layer along with implementing role and user based security.

 

l) User access to reports/dashboards and other things: This facility is again present in both the versions of Jaspersoft.

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

m) Data Virtualization: This basically means integrating multiple data sources into a metadata view, and then doing BI work on it. This step reduces the work this involved in ETL.

 

Availability:  Jaspersoft CE: No

Jaspersoft EE: Yes

 

 Alternatives: The entire work of data virtualization can be done by writing ETL jobs and stored procedures. For ETL, Talend or Kettle either of the tool can be used.

n) Data Integration (ETL): ETL stands for extract transform and load. Extract means extracting data from different dbs (big data, columnary databases, graphical databases etc), web APIs etc. After extracting, transform the same according to the business rules and finally load it into the target system which could be a database, data warehouse, data mart etc. Jaspersoft has ETL tool by the name of Talend (also known as Jasper ETL).

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

o) Interactive Visualizations: This basically means very interactive HTML5 charts with animations, hover information, interactivity in terms of selection, zoom in zoom out, interactive legends etc.

 

Availability: Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: These kind of interactive visualizations are not present in Jaspersoft community edition. For enabling that, what can be done is we can design plugin designed like jcharts and openflash (for openflash plugins are already available). One of the very famous example is Pentaho Community edition having interactive charts by CCC components (community chart components). We can also use CCC and thus have best of breed solution.

 

p) OLAP Server: OLAP (online analytical processing) helps in analyzing large amount of data using querying, visualizations, multi lever analysis, slice and dice, filtering etc. OLAP helps users to understand multi-dimensional data from multiple-view point. It consists of mainly three functions – consolidation, drill down, slicing & dicing.

 

Availability: Jaspersoft CE: Yes

Jaspersoft EE: Yes

 

q) Multi-tenancy: This allows single instance support multiple customers, with each customer having his own userid password.

 

Availability: Jaspersoft CE: No

Jaspersoft EE: Yes

 

Alternatives: Multi-tenancy can be implemented in Jaspersoft Community Edition (CE) using Liferay portlet.

 

r) License: Jaspersoft CE has General public license whereas the license is having commercial license. Hence, if a client is Jaspersoft EE client, he does not need to open up his source code to the public, which is not the case with Jaspersoft CE clients.

 

Thanks for reading the blog. Get in touch with me at [email protected], Cell : +91-7893947676

Jaspersoft Default Passwords

1.  Jaspersoft Corporation – Jasper Reports Server
Method    HTTP
User ID : superuser
Password : superuser
Level    Administrator
Doc    http://community.jaspersoft.com/documentation/jasperreports-server-install-guide-community-edition

2.  Jaspersoft Corporation – Jasper Reports Server
Method    HTTP
User ID   : jasperadmin
Password : jasperadmin
Level    Administrator
Doc    http://community.jaspersoft.com/documentation/jasperreports-server-install-guide-community-edition

3.  Jaspersoft Corporation – Jasper Reports Server
Method    HTTP
User ID :   joeuser
Password :   joeuser
Level    User
Doc    http://community.jaspersoft.com/documentation/jasperreports-server-install-guide-community-edition
Notes    Sample data user

4.  Jaspersoft Corporation – Jasper Reports Server
Method    HTTP
User ID   :  demo
Password :   demo
Level    User
Doc    http://community.jaspersoft.com/documentation/jasperreports-server-install-guide-community-edition
Notes    Sample data user

Hire Pentaho Consultants / Hire Pentaho Developers

Hire Pentaho Consultants / Hire Pentaho Developers

Helical IT Solutions, with its deep expertise on Pentaho and being an open source DW BI expert, can help in designing and constructing your BI solution. Helical IT solutions is having experience on end to end Pentaho BI suite right from ETL, data warehousing, C-tools, CDE, CDF, Pentaho Report Designer, Pentaho Schema Workbench, data mining etc. Our in-depth knowledge of both Business Intelligence applications and the Pentaho platform to ensure successful development and deployment of your BI initiatives.

Pentaho Consultant

Helical can help at a number of aspects like

– BI Tool Selection : Based on your requirement, with our deep rooted expertise on a number of BI solutions, we can help you in determining which BI tools would be best suited for you. Whether you actually need to purchase enterprise edition or if your requirement can be fulfilled via community edition by using some tweaks or custom coding or best of breed solution. The tool selection will be done after a thorough analysis of your requirements, present hardware and software, budget, speed of solution delivery required etc.

– Pentaho BI POC :- If your company is still in dilemma to go ahead or not, then we can help you in developing a POC (proof of concept). We help evaluate the open source BI and ETL solution for your environment, demonstrate how it will work, and recommend how you can leverage the technology, even if you have other BI products.

– Pentaho BI Solution Development :- With our technical expertise and domain knowledge of end to end BI solution development in a number of different verticals ( we have executed BI solutions in energy, healthcare, insurance, supply chain, e-commerce, human resource), we can help you in designing and developing the perfect BI solution for you. We will help you in the right KPI parameters selection, reports and dashboards development, OLAP cubes, ETL scripts generation, plugin designing, security implementation, application integration, fetching data etc. For designing the solution for you, we can use any of the below mentioned tool present in the BI suite.

  • Pentaho Business Intelligence Platform
  • Pentaho Data Integration (Kettle)
  • Pentaho Analysis Services (Mondrian)
  • Pentaho Analytics – Agile BI (commercial), Saiku (open source)
  • Pentaho Reporting
  • Pentaho Data Mining (Weka)
  • Pentaho Dashboards

– Pentaho Data Integrator (PDI) – Kettle :- Pentaho BI comes with a powerful ETL (Extract, Transform, Load) suite that allows your existing data to be transformed, summarized and aggregated into a form that puts the business information at your fingertips. At Helical, we have extensive ETL knowledge, employing it both for Business Intelligence purposes and to transform and migrate data between systems, software’s & databases. Having a lot of experience on data warehousing, ETL, data modelling, data mart designing, query optimization etc, our dedicated team can also help you with all of your ETL requirement, creating transformations and jobs etc.

– Training and Documentation :- A software is as good as its end user. In order to make sure that the end user is able to use the developed software pretty well, we will be providing all the necessary training to the end user. Also, the same would be supported by documentation like installation document, troubleshooting document etc.

– Support :- Helical team will be providing 24×7 support to the client, thus ensuring that the solution is up and running always.

Helical provides support and services on the entire Pentaho BI stack, as mentioned below

  • Pentaho Business Intelligence Platform
  • Pentaho Data Integration (Kettle)
  • Pentaho Analysis Services (Mondrian)
  • Pentaho Analytics – Agile BI (commercial), Saiku (open source)
  • Pentaho Reporting
  • Pentaho Data Mining (Weka)
  • Pentaho Dashboards
  • Metadata design and development
  • Performance tuning
  • Application integration

Contact us at [email protected], (+91-7893947676) Pentaho developer

Split Excel output of Jasper Report into multiple sheets

Hi Jasperians …!!!!

A friend posted an interesting query on LinkedIn asking how to split Excel output into multiple sheets… !!! Just worked out and sharing it with you guys..!!!

It’s a sample one.. No parameters, No headers are used…

Greetings..!!! Here are the steps to follow…!!!

Aim: To split the output into multiple sheets in Excel exporting
Solution Way: Printing data in one sheet & a bar chart in another sheet.

I have used the follwoing.
i) iReport Designer : 5.0.4 (Community)
ii) PostgreSQL : 9.2 (foodmart database)

Query I have used:
select  * from employee limit 15

Step 1: 
Open iReport desinger give it to a name and save it to your fav location.

Step 2:
Write the query in query designer area

Step 3:
Remove all the bands from report design area except
Column header, Detail & summury band.

Step 4:
Drag and drop your fav columns to detail band as shown in below figure
Drag and drop a bar chart to the summary band as shown in below figure

Step 5 :
We need to set properties at two places.

i) In the report properties
ii) In settings

i) In the report properties
Report Inspector->ReportName(report1)->Right Click->Properties
Now add the propertey.
net.sf.jasperreports.export.xls.one.page.per.sheet
and value is set to be “true” do not use double quotes for giving value but in xml code it automatically goes into double quotes.
Find the below image.

ii) In the report Settings
Tools->Options-> Click on export Settings -> In the list of export options click on Excel
It opens Excel Export Parameters
In common tab —> Check One page per sheet.
Find the image below

NOTE:
Do not forget to place page break on the place from where you want to split the page.

In this example I used page break above the chart so that data comes in one sheet and chart comes in another sheet.


That’s it… Save the report and see the preview.
I’m not seeing the preview in Server but previwing internally in the iReport.

OUTPUT
The output would be something like as follows. Find the images of excel sheet.

OUTPUT in the first sheet:


OUTPUT in the second sheet:




Thanks for posting a good idea to work out on LinkedIn.

Thanks for reading this document.

Queries are welcome @    [email protected]

Simlar posts on various sites:

1) http://stackoverflow.com/questions/3977658/how-do-you-export-a-jasperreport-to-an-excel-file-with-multiple-worksheets

2) http://community.jaspersoft.com/questions/531936/multiple-sheets-excel

3) http://jasperreports.sourceforge.net/config.reference.html

4) http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.one.page.per.sheet

5)http://community.jaspersoft.com/questions/533232/how-create-multi-worksheet-excel-jasper-repor

6) http://community.jaspersoft.com/questions/540310/unable-split-excel-output-multiple-sheets

7) http://stackoverflow.com/questions/8753401/exporting-a-report-with-multiple-sheets-from-jasperserver-to-excel

SADAKAR.P

Software Engineer in BI – Jaspersoft, Pentaho & Talend.

Helical IT Solutions Pvt. Ltd.

Hyderabad, INDIA.

Installing Jasper server with MySQL Database

This blog will help you understand how to install Jasper Server with MySQL database

Pre requisites
1. Install the Oracle/Sun Java JDK 1.6 or 1.7. Create and set the JAVA_HOME system
environment variable. i.e., Make sure Java path are set for your user profile or system
profile
Please follow the link to get the software.
http://www.oracle.com/technetwork/java/javase/downloads/java-se-jre-7-download-
432155.html

2. Jasperreports-server-cp-5.0.0-bin-zip
a. Download Jasperreports-server-cp-5.0.0-bin-zip from the below mentioned location.
http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20S
erver%205.0.0/jasperreports-server-cp-5.0.0-bin.zip/download

3. MySQL database.
a. Please follow this link to get the software.
http://dev.mysql.com/downloads/mysql/5.0.html
Note: We can use any other database as well. For demo purpose we are using mySQL.

4. Apache Tomcat Server
a. Please follow this link to get the software.
http://tomcat.apache.org/download-60.cgi

Follow below mentioned steps to install Jasper server CE 5.0.0 with mySQL database.

Step 1:- Extract all files from jasperreports-server-cp-5.0.0-bin.zip. Choose a destination, such as C:\Jaspersoft on Windows. The directory, jasperreports-server-cp-5.0.0-bin, appears in the file location you choose.

Step 2 :- Copy the <database>_master.properties file for your database from sample_conf and paste it to buildomatic:
Copy from — <js-install>/buildomatic/sample_conf/
Paste to — <js-install>/buildomatic
For example, copy mysql_master.properties to <js-install>/buildomatic.

Step 3:- Rename the file you copied to default_master.properties.

Step 4:- Edit the default_master.properties file to add the settings for your database and application server.

Below mentioned is a sample property values MySql database.

MySQL appServerType=tomcat6 [tomcat7, tomcat5, jboss, jboss7, glassfish2,
glassfish3, skipAppServerCheck*]
appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 6†

dbUsername=root
dbPassword=password
dbHost=localhost

Set the following in the file
webAppNameCE = jasperserver

***NOTE:
Place mysql-connector-java-5.1.10.jar driver in the following location
D:\install SW\jasperreports-server-cp-5.0.0-bin\buildomatic\conf_source\db\mysql\jdbc

Step 6:-
Run the js-install scripts.
a. Start your database server.
b. Stop your application server.
c. Open Command Prompt as Administrator on Windows.
d. Run the appropriate commands:

js-install-ce.bat : Installs JasperReports Server, sample data,
and sample databases (foodmart and sugarcrm)

js-install-ce.bat minimal : Installs JasperReports Server, but does not
install sample data and sample databases

NOTE
If you installed the optional sample databases, complete the installation by executing this command: js-ant deploy-webapp-ce from buildomatic location in command prompt.

For example in the following location:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps

Step 7:-
Run the tomcat server and type the jasper server url.
For example: http://localhost:2222/jasperserver/login.html

JFree Bar Chart Customization in iReport.. Category axis labels overlapping is removed.

HI Folks,

Today we are going to learn how to customize BarChart Category axis.

Credit of developing code goes to Mr. Sharad Sinha who is my colleague. As part of sharing knowledge I’m gonna explain the steps.  I’m starting with the problem statement followed by the solution.

Prerequisites :

iReport : 5.0.4

PostgreSQL : 9.2

Jasper Server : 5.0

Problem :

* We have a bar chart having many values to display on the chart .. i.e, let us say 100+

* This is not an XY Chart … simply it is Vertical Bar Chart.

* Bars are coming up properly BUT the labels on the category axis are overlapped and coming in a line. or when the angle is set up to -70 the labels are coming as clumsy as shown in figure below.

* The values which we want to show on the category axis are : dates like 1 Jan 2013 and the next label we want to show 8 Jan 2013 and etc..

* Here is the snapshot of the problem statement.

 

Solution:

Our final out put should looks some thing like as follows.

What we have to do to get the above output?

We have to write Chart customizer class and have to call that class from iReport.

I’m going to explain step by step how to achieve this.

 

Read the points:

1.  Write chart customizer class java code in NetBeans.

2. Make a jar file.

3. Add that jar file in iReport as well in Jasper Server.

4. Call the class from the properties of Vertical Bar Chart in customizer class.

 

1.  Write chart customizer class java code in NetBeans.

package com.xyz.bar.chart.customizer;  //xyz is name of the company generally we give
import java.awt.Color;

import org.jfree.chart.axis.CategoryAxis;

import org.jfree.chart.axis.CategoryLabelPositions;

public class BarChartCustomizer

implements

net.sf.jasperreports.engine.JRChartCustomizer

{

private Number tickUnits;
public BarChartCustomizer() {

tickUnits = Integer.valueOf(0);

}
@Override

public void customize(org.jfree.chart.JFreeChart chart, net.sf.jasperreports.engine.JRChart jasperChart) {

org.jfree.chart.renderer.category.BarRenderer renderer;

org.jfree.chart.plot.CategoryPlot plot;

org.jfree.chart.axis.NumberAxis rangeAxis;

org.jfree.chart.axis.CategoryAxis axis;

renderer = (org.jfree.chart.renderer.category.BarRenderer) chart.getCategoryPlot().getRenderer();

 

plot = chart.getCategoryPlot();

rangeAxis = (org.jfree.chart.axis.NumberAxis) plot.getRangeAxis();
axis = plot.getDomainAxis();
CategoryAxis domainAxis = plot.getDomainAxis();

CategoryLabelPositions pos = domainAxis.getCategoryLabelPositions();

for(int i=0; i< plot.getCategories().size()-1; i++)

{

if(i%6==0){

String cat_Name = (String) plot.getCategories().get(i);
}

else

{

String cat_Names = (String) plot.getCategories().get(i);

domainAxis.setTickLabelPaint(cat_Names, Color.white);

}

}

// plot.getDomainAxis().setLabel(“TEST “+plot.getCategories().size()+”  “+pos.);

}

}

2. Make a jar file.

* Right click on the project and click on clean and build

* Net beans will automatically create jar file.

* Find this jar file in “dest” folder of your project.

 

3. Add that jar file in iReport as well in Jasper Server.

Location to place this jar files in Jasepr server.

C:\Program Files\jasperreports-server-5.0\apache-tomcat\webapps\jasperserver-pro\WEB-INF\lib

Location to call the jar files in iReport.

* On the menu bar go to

Tools –> Option –> iReport –>Class Path–> Add jar

* Select the location of jar file.

 

4. Call the class from the properties of Vertical Bar Chart in customizer class.
* High light the chart (bar chart in our case)  that you want to apply the customizer class.

* Go to properties (right side appears) —> go to customizer –> in the blank space write the classname including the package.

* For example in our case:

package com.xyz.bar.chart.customizer.BarChartCustomizer

That’s it we have done with the customization of the chart.

 

NOTE: after adding jar file to the server, you must restart your server otherwise you can’t see the effect of added jar file in our report

NOTE: Make sure to import necessary library files in Netbens while developing the plugin.

* Your imported library files (nothing but jars) should compatible with the files that your jasper server is using otherwise you will get minor/higher version related error when you run your report.

* Find the image below.

Thanks for reading document 🙂

 

Queries are welcome @ [email protected]

Helical IT Solutions (an Open source DWBI company providing services on Jaspersoft, Pentaho, Talend, Kettle, Data visualization) covered by a growing magazine.. Business for All

Helical Covered by Biz for All Magazine

Helical Covered by Biz for All Magazine

 

 

Among the many Information Technology startups, Helical IT Solutions, a Hyderabad based technology company providing services in open source data warehousing and business intelligence services, has been moving up the ladder with incredible pace and bagged a seed funding of INR 2.5 million from the Singapore based Citibank within six months of starting operations.

 

The company which started in Nov. 2012 has catered to the technology needs of clients in various domains including e-commerce, insurance, energy, social media analytics, healthcare and human resource while building and managing their Business Intelligence (BI) platforms.

 

The eight member strong team in Helical is quite excited with the fund inflow and plans to use it primarily for recruitment and partnering with leading BI vendors in the open source space such as Jaspersoft and Pentaho. “We want to focus and build up our capability of providing sector specific BI offering with this fund,” one of founders Nikhilesh Tiwari said. Specializing in Open source technologies, Helical has proved to be a great bet for its clients cutting down on their costs and adding to their efficiency and turnover. Their services include BI, ETL, Data warehousing and data modelling, data visualization to name a few. Helical IT Solutions is an open source Data warehousing and BI company based out of Hyderabad. The company works primarily on Jaspersoft and Pentaho BI suite and on talend, on Talend and Kettle. According to Gartner’s 2012 CIO survey, analytics and BI is the No. 1 technology priority for CIOs in 2012.

 

 

BI, analytics and PM software market was the second-fastest growing sector in the overall worldwide enterprise software market in 2011. “India is growing faster than any other country in BI sector in Asia Pacific with 36 per cent growth rate and the market for BI software in India is forecast to reach revenue of $81.5 million in 2012,” he said. Every 15 seconds, an open source BI s/w is downloaded and around 80 per cent of them need consultation and services as to how use them. With the angel investment, plans are underway to expand the team and hiring, develop infrastructure, SI partnership with Jaspersoft & Pentaho to get projects from even bigger clients and at a higher margin. “Building a parallel team after some time and start working towards building a product (we have energy domain, ecommerce domain primarily in mind),” he said about future plans. It is not that the company had walked a rosy path as due to lack of resources, they had to turn down many clients like Jabong.com, Mangaquest, Inspire edge IT solutions,  XiBoss.

Domain based report from iReport with filters

Here are the series of steps to create a domain report from jasper iReport.
In this tutorial I’m using
iReport-professional5.1.0
Jasper-server 5.0
postgreSQL(foodmart database).

Few points to note down about domains in jasper server and domainReport in iReport.

 

  •  Community Edition of Jasper Server and iReport do not provide the feature of domains and domain based reports.
  • Professional and Enterprise edition the Domains act as data sources.
  • They are a meta layer between the reports and the underlying data base.
  • The idea with Domains is they allow for easy joining of the data base tables and organize the resulting columns into a nice business friendly presentation.
  • Domains also allow for calculated fields.
  • The calculations are created using DomEL (domain expression language).
  • This is a simple language that allows for manipulation of fields that resolves to SQL in the underlying DB.

 

*  We do not create any database connection externally for developing domain based report which is a traditional way of creating database connections using JDBC and JNDI.
* Before we start developing domain based report we should create a domain in the jasper server.
* And we should connect to JasperServer from iReport.
* To know the procedure of creating domain in the jasper server plz  read the below article. http://jasper-bi-suite.blogspot.in/2013/05/creating-domain-in-jasperserver.html
* In this tutorial I have created a domain in jasperserver and named it as foodmart_domain.
* My domain consists of two tables. They are i) employee ii) store
* Fields I used for employee table are :
        first_name, last_name,gender,marital_status,hire_date,postion_title

 

* Fields I used for store table are : store_number,store_city,store_country
Do this first
Go to window->Click on Domains –> we can observe the window appearing just below to the Report Inspector window which is known as Domain Window.
Step 1: 
File->New->Click on Domain Report(appears at left side)->Click on BlankA4->Click on Finish.
Step 2:
We will navigate to the following window.
* Give all the details
  Connection : This is nothing but connection from iReport to JasperServer
                          ( We connect from Repository panel of iReport)
  Domain       : Select a domain which you have already created in jasper server.
                          ( In this tutorial I have already created a domain and named it as   foodmart_domain, and I’ve not shown the procedure of creating domain in this tutorial b’z we are    learning how to create a report using domain but not domain creation )
 Filters          :  Filters are nothing but input controls in the domain based report.
                          * We can select the field which we want to use as input control
                          * In this tutorial I have used two filters(input controls).
Find the images below for filters creation.
 
Available fields :  As we successfully connected to our foodmart_domain we can observe that the tables(of course fields also.. just double click on the folder of employee or store.. we can observe the fildes also ) available with the domain left side of the above image.
* Condition Editor : To use the filters concept we just have to
       –> highlight(click on the field) the field from Available fields panel
       –> then click on create condition
       –> Field name : When you highlight the field from available fields panel it will automatically appear here.
      –> Comparison :  give the condition from the drop down list.
       –> Value(s)      :   give some value ( Like we give in the parameter default expression in general reports)
       –> Check the is prompt ( This is used for popping up the filters)
    * In this way we can add as many filters(input controls=parameters) to the report before we design the report itself.
    * We can add the filters in the middle of the designing of the report also.
    * We can also change, delete, add/update the filters and corresponding conditions.
In our example I have given two filters. They are : i) gender ii) store_country
1st filter :
Field Name : gender
Comparison : Equals
Value(s) : M

 

2nd  filter :
Field Name : store_country
Comparison : Equals
Value(s) : USA
* Click on next
* Give the name for the report and location to save the report.
Step 3 :
When you click on finish you are ready to design your report….
* You can observe the tables and fields available within the domain in Domains Window
* From there you can drag and drop the fields to the details band of the design area.
* The complete design of the report you can find in the below image.
That’s it we are done with report … A domain report..
NOTE: 
When we designing domain report , the iReport engine generates domain query language on it’s own( defaultly)
* This you can observe at Report Query Area.
* Find the image below for our example
* We have not provided any SQL query to generate the report.
* We have not added any parameters in the Report Inspector of Parameters section.
* But the iReport engine has provided the domain query and parameters from jasperserver.
* When we work with domain based Reports from iReport these all things done by iReport Engine.
How to see the preview of the report in Report Designer ?
We can directly preview the output in the designer by clicking on preview tab
(OR)
You need to export this report to jasperserver and have to see the preview as follows.
* Right click on the Folder-> click on Run JasperServer Report
* You can see the output(preview) in new a new window(Report Viewer Window)
How to see the preview of the report in the JasperServer ?
upload the report to the server and see the preview.
The filter which we gave at the time of report design become input controls in the server and looks like in the following image.
Now click on Ok and see the preview.
We are done with simple domain based report from iReport.
Welcome with any queries at [email protected] or in this blog.
Thanks for reading this article 🙂