Home

Jaspersoft VS BIRT


JasperReport and BIRT both are popular open source BI tools, can be used in eclipse as plugin and provide almost similar features for designing and generating report. But if compare the development over the period of time we see that Jasper as a project have developed a lot in comparison to BIRT project.  Jaspersoft Business intelligence suite community Edition includes JasperReports Server, JasperReports Library, Jaspersoft Studio and iReport Studio whereas BIRT only have designer. 

BIRT's continues to provide the strongest report development tool. BIRT's greatest strengths are in its ease of use and the completeness of features. If you are looking for a tool that allows report developers to create reports using a thick client application which will be deployed into an existing Java application framework, it is hard to beat BIRT. BIRT provides the easiest way to create reports that are focused on delivery over the web.BIRT has two main weaknesses. First, BIRT is primarily focused on reporting instead of analytics, if you are looking to work with OLAP data, BIRT will not be appropriate. Second, BIRT lacks an open source server component and therefore if you are looking for a complete web-based BI solution BIRT is not the best choice.

Jaspersoft Studio provides an outstanding and widely used report development tool that can easily be deployed either through the Jaspersoft Server community edition or through the JasperReports Library to an existing application. A particular strength of Jaspersoft is the way it works with data passed to the report as plain old java objects (POJOs). Jaspersoft is also the best product if your primary focus is to deliver printed reports.Jaspersoft's chart engine is significantly weaker than BIRT. Jaspersoft's Table Of Contents for large report navigation is also more difficult to use than either BIRT. Finally, we found Jaspersoft's SQL editor to be the least developer friendly.

BIRT is sponsored by Actuate along with contributions from IBM, and Innovent Solutions. BIRT is supported by an active community of users here at Eclipse.org  and at the BIRT Developer Center. BIRT also has a large, active and growing developer community representing all types of organizations. Major technology companies such as IBM, Cisco, S1 and ABS Nautical Systems have incorporated BIRT into their product lines. Later Actuate was acquired by OpenText Software in January of 2015. 

Jaspersoft was acquired by TIBCO Software in May of 2014. TIBCO Jaspersoft's public announcements indicate a continued support for Jaspersoft in its commercial and community editions as a stand-alone product.TIBCO manages Jaspersoft and Spotfire (TIBCO's data discovery and visualization tool).  Jaspersoft and Spotfire are extremely complementary, so you can expect, over time, one tool to help the other be even stronger in its primary category (Jaspersoft in embedded reporting and analytics and Spotfire in data discovery and visualization).
JasperReport VS BIRT

Related posts:

Creating Charts using database
This article teaches you how to embed JasperReports functionality in a JSP-based web application.Getting ready->Download and install:Set up your environment for Java programming language....  Read More....

 JasperReports Open Source Business      Intelligence Solution
 JasperReport is one of the most popular and widely used open  source BI tools. It is used in hundreds of thousands production    environments, and features both community  and commercially supported versions. Jaspersoft Business    intelligence suite community Edition includes....Read More....

JasperReport for Java web application

Creating Charts using database




This article teaches you how to embed JasperReports functionality in a JSP-based web application.

Getting ready

Download and install:

Set up your environment for Java programming languageDownload and set up Java on your machine. Java SE is freely available from the link Download  Java.You can download a version based on your operating system. After installing JDK, you will set the JAVA_HOME environment variable to point to the main folder of your JDK installation.

Eclipse - A Java IDE developed by the eclipse open-source community and can be downloaded from https://www.eclipse.org/


JasperStudio - To install jasper please refer previous article JasperReports Open Source Business Intelligence Solution


Database - I am using PostgreSQL 9.6 you can use any database you want. You just need to add jar file of the database you want to use and change the connection statments accordingly. 


Web ServerThe Apache Tomcat® software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. The Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket specifications are developed under the Java Community Process.

Setup and Install Apache Tomcat Server in Eclipse Development Environment (IDE)

Download Apache Tomcat from this link.

Binary Distributions core: zip (pgp, md5, sha1)

Open Eclipse Environment. Click on Servers Tab
Click on No servers are available. Click this link to create a new server...
Click Tomcat v9.0 Server and Next
It should be up and running on port 8080 and you could visit default page using URL: http://localhost:8080/
Download zip file and extract it.
Select Apache installation Directory and click Finish.
Now right click on Tomcat v9.0 Server at localhost [Stopped, Republish] under Servers and click Start.


Java web application


Now lets start the project.
Open Eclipse and click on the New tab and select web-> Dynamic web project
name it as vehiclesdata and finish.
Now download the folder and files present at this link-  https://github.com/rahulgupta-datascience/jasperreports.

You will be using jasperreports.jsp and vehicle.jrxml files in this application. You will find these files in the vehiclesdata/WebContent/.

Then Copy the complete vehiclesdata/WebContent/src folder and paste the 2 folders in java resources ->src folder of your eclipse project.

Next lets put up the required .jar files. Copy folder vehiclesdata/WebContent/WEB-INF/lib
and paste the lib folder in your project webcontent/web-inf folder. 

*Note i have provide lib folder with some extra .jar so as to about version conflict and also make it easy for you in future to used it in other projects.

Now we have only one thing left that is our data which is being used to create the chart in the report.

On the github link you must have seen two files one is database.txt that will help you to create the database. Second file is vehiclesdata.csv file which contain our data. This data will be inserted in the  created database.

Let see some important parts of the files we are using:

Jasperreports.jsp

String path2JRXMLFile = getServletContext().getRealPath("vehicle.jrxml");

This is line explain which jrxml is being used.
.jrxml is the design and format of your report which you want.
You can create your own .jrxml file click on your project and select NEW-> Jasper Report

Now a designer window will appear drag and drop the elements you want from the Palette column.

//Export PDF file to browser window
JRPdfExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream());
exporter.exportReport(); 

This above code make output export in Pdf form we can change according to your need like HTML etc.


ConnectionManager.java


    public static void main (String args[])
    {
        ConnectionManager db = new ConnectionManager("localhost", 5432, "postgres", "postgres", "root");
    }

This is where you mention connection details.

JasperReportsWrapper.java

public class JasperReportsWrapper
{
    private static File file = new File(".jrxml");
    public static String path2JRXMLFile = file.getAbsolutePath();
    public static String pdfFileName = "vehicle.pdf";
    public static String dbServerAdd = "localhost";
    public static int dbServerPort = 5432;
    public static String dbName = "postgres";
    public static String dbUser = "postgres";
    public static String dbPass = "root";
    private Connection connection = null;
    private ConnectionManager conManager = null;
    public JasperReportsWrapper ()   {
    }//JasperReportsWrapper

Here also you mention connection details.

This file is used to make the below code work present in .jsp file.


//Connect DB



JasperReportsWrapper wrapper = new JasperReportsWrapper();
wrapper.connect2DB(wrapper.dbServerAdd, wrapper.dbServerPort, wrapper.dbName, wrapper.dbUser, wrapper.dbPass);

 //Comiple JRXML file
 JasperReport jasperReport = wrapper.compileJRXMLFile(path2JRXMLFile);

 //Fill compiled JRXML file with data
 JasperPrint jasperPrint = wrapper.fillReport(jasperReport, null, wrapper.getConnection()); 

 //Set reponse content type
 response.setContentType("application/pdf");


Vehicle.jrxml

//Used to fetch data
<queryString>
<![CDATA[select State,year  from vehiclesdata]]>
</queryString>

//Insert the values into the pie-chart 
<field name="State" class="java.lang.String"/>
<field name="year" class="java.lang.Long"/>
<variable name="State" class="java.lang.String" resetType="None" calculation="Count">
<variableExpression><![CDATA[$F{State}]]></variableExpression>
</variable>
<variable name="year" class="java.lang.Integer" resetType="None" calculation="Sum">
<variableExpression><![CDATA[$F{year}]]></variableExpression>
</variable>

Output- Pdf file 





Decision Trees in Machine Learning


Decision tree is a predictive model used to create a workable model that will predict the value of a target variables. Decision tree is a type of supervised learning algorithm (having a pre-defined target variable) that is mostly used in classification problems. It works for both categorical and continuous input and output variables. In this technique, we split the population or sample into two or more homogeneous sets (or sub-populations) based on most significant splitter / differentiator in input variables.
Tree models where the target variable can take a finite set of values are called classification trees; in these tree structures, leaves represent class labels and branches represent conjunctionsof features that lead to those class labels. Decision trees where the target variable can take continuous values (real numbers) are called regression trees.
Many data mining software packages provide implementations of one or more decision tree algorithms. Several examples include  IBM-SPSS ModelerRapidMinerSAS Enterprise MinerMatlabRWeka (open-source data mining suite), OrangeKNIME, & scikit-learn .

Uses of decision tree


  • Financial institutions - One of the fundamental use cases is in option pricing, where a binary-like decision tree is used to predict the price of anoption in either bull or bear market.
  • Marketers - To establish customers by type and predict whether a customer will buy a specfic type  of product.
  • Medical Field - Models have been desiged to diagnose blood infections or even predict heart attack outcomes in chest pain patients. Variables in the decision tree include diagnosis, treatment, and patient data.
  • Gaming Industry - It uses multiple decision trees in movement recognition and facial recognitiopn. 



Advantages of decision tree
  • Simple to understand and interpret.
  • Requires little data preparation.
  • Able to handle both numerical and categorical data.
  • Uses a white box model means the internal workings can be observed but not changed; you can view the steps that are being used when the tree is being modeled on the other hand in a black box model, the explanation for the results is typically difficult to understand, for example with an artificial neural network.


Limitations of Decision tree
  • Decision-tree learners can create over-complex trees that do not generalise well from the training data.
  • There are concepts that are hard to learn because decision trees do not express them easily, such as XORparity or multiplexer problems.
  • Practical decision-tree learning algorithms are based on heuristics such as the greedy algorithm where locally-optimal decisions are made at each node. Such algorithms cannot guarantee to return the globally-optimal decision tree. To reduce the greedy effect of local-optimality some methods such as the dual information distance (DID) tree were proposed.
  • For data including categorical variables with different numbers of levels, information gain in decision trees is biased in favor of those attributes with more levels. However, the issue of biased predictor selection is avoided by the Conditional Inference approach.
Different types
Decision trees used in data mining are of two main types:
  • Classification tree analysis is when the predicted outcome is the class to which the data belongs.
  • Regression tree analysis is when the predicted outcome can be considered a real number (e.g. the price of a house, or a patient’s length of stay in a hospital).
The term Classification And Regression Tree (CART) analysis is an umbrella term used to refer to both of the above procedures.The procedure used to determine where to split the tree.

Some techniques, often called ensemble methods, construct more than one decision tree:

  • Bagging decision trees, an early ensemble method, builds multiple decision trees by repeatedly resampling training data with replacement, and voting the trees for a consensus prediction.
  • Random Forest classifier uses a number of decision trees in order to improve the classification rate.
  • Boosted Trees can be used for regression-type and classification-type problems.
  • Rotation forest - in which every decision tree is trained by first applying principal component analysis (PCA) on a random subset of the input features.


Decision-tree algorithms:
  • ID3 (Iterative Dichotomiser 3)
  • C4.5 (successor of ID3)
  • CART (Classification And Regression Tree)
  • CHAID (CHi-squared Automatic Interaction Detector). Performs multi-level splits when computing classification trees.[11]
  • MARS: extends decision trees to handle numerical data better.
  • Conditional Inference Trees. 

JasperReports 

Open Source Business Intelligence Solution


JasperReport is one of the most popular and widely used open source BI tools. It is used in hundreds of thousands production environments, and features both community and commercially-supported versions.


Jaspersoft Business intelligence suite community Edition includes 
JasperReports Server, JasperReports Library, Jaspersoft Studio and 
iReport Studio. 

JasperReports Server is a stand-alone and embeddable reporting server. It provides reporting and analytics that can be embedded into a web or mobile application as well as operate as a central information hub for the enterprise by delivering mission critical information on a real-time or scheduled basis to the browser, mobile device, printer, or email inbox in a variety of file formats. JasperReports Server is optimized to share, secure, and centrally manage your Jaspersoft reports and analytic views.

JasperReports Library is the world's most popular open source reporting engine. It is entirely written in Java and it is able to use data coming from any kind of data source and produce pixel-perfect documents that can be viewed, printed or exported in a variety of document formats including HTML, PDF, Excel, OpenOffice and Word.

Jaspersoft® Studio is editing software for JasperReports®. It will help you design and run report templates; build report queries; write complex expressions; layout components like 50+ types of charts, maps, tables, crosstabs, custom visualisations. It integrates JasperReports® Server to create powerful report workflows. Available as an Eclipse plug-in or a standalone application, it comes in two editions: Community and Professional. The Professional edition includes additional features, maps, advanced HTML5 charts and professional support.
You can build documents of any complexity from your data. Print-ready PDFs to interactive dynamic HTML with navigation inside or outside the report. High quality PowerPoint, RTF, Word, spreadsheet documents or raw CSV, JSON, or XML. It's not difficult to build custom exporter to suit any need.Different types of data sources are accessible, big data, CSV, Hibernate, Jaspersoft Domain, JavaBeans, JDBC, JSON, NoSQL, XML, or custom data source.

iReport is the free, open source report designer for JasperReports and JasperReports Server. Create very sophisticated layouts containing charts, images, subreports, crosstabs and much more. Access your data through JDBC, TableModels, JavaBeans, XML, Hibernate, CSV, and custom sources. Then publish your reports as PDF, RTF, XML, XLS, CSV, HTML, XHTML, text, DOCX, or OpenOffice.

JasperReport is supported by excellent documentation, a wiki, and additional resources. Written in Java, JasperReport runs on Windows, Linux, and Mac, and is available for download.

JasperReport for java developers
JasperReports is an open-source Java class library designed to aid developers with the task of adding reporting capabilities to Java applications. Since it is not a standalone tool, it cannot be installed on its own. Instead, it is embedded into Java applications by including its library in the application's CLASSPATH. JasperReports is a Java class library, and is not meant for end users, but rather is targeted towards Java developers who need to add reporting capabilities to their applications.
Although JasperReports is primarily used to add reporting capabilities to web-based applications via the Servlet API, it has absolutely no dependencies on the Servlet API or any other Java EE library. It is, therefore, by no means limited to web applications. There is nothing stopping us from creating standalone desktop or command-line Java applications to generate reports with JasperReports. After all, JasperReports is nothing but a Java class library providing an API to facilitate the ability to generate reports from any kind of Java application.

Install JasperSoft Studio into Eclipse

Step 1: Go to menu bar and click on help tab.
Step 2: Under Help tab you will see Eclipse Marketplace..
Step 3: Window will appear in which search for Jaspersoft Studio.x.x.x.
Step 4: Then Install it and restart Eclipse.