Creating and Designing Report Using iReport - Part 1
 
Published: 12 Apr 2007
Abstract
iReport is a visual report builder that helps Jasperreport users design and create reports in PDF,XLS,HTML and many other formats. This article demonstrates how to design and create reports and explains several features(such as Parameters, Variables, Groups, Charts, Images etc) of iReport.
by Anuva Das
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 211252/ 553

Introduction

When creating a report using JasperReports, one of the most painful and error prone tasks is creating JRXML or XML files. Luckily, some alternatives are there. One of the most useful visual report builders is iReport. It help JasperReports users to build reports, generate jasper files and preview reports in PDF, HTML, XLS, and many other formats supported by JasperReports. It also allows users to create more complex reports with charts, images, and subreports, etc.

This article demonstrate how to use iReport to utilize the full power of JasperReports without getting a headache in designing JasperReports using XML template.

System requirements

Minimum Requirements to get started with iReport:

·         Sun JDK 1.4 or later version

·         jasperreports-{version}.jar

·         commons-beanutils-{version}.jar

·         commons-collections-{version}.jar

·         commons-digester-{version}.jar

·         commons-logging-{version}.jar

·         xercesImpl.jar-for parsing XML

·         itext-{version}.jar-For creating PDF formatted report

·         If you want to access the database, you must have a JDBC driver. 

You will find these JAR files inside the lib directory of iReport.

Installation and Configuration

·         Install JDK 1.4 or higher version

·         Download iReport. Unzip it where you want.

·         Copy tools.jar from your JDK and place it inside the lib directory of iReport.

·         Copy classes12.jar from JDBC Driver and place it inside the lib directory of iReport.

·         Before creating the report, all the required JAR files must be added to the CLASSPATH variable.

Starting iReport

You can start iReport by simply running iReport.bat under Microsoft Windows or iReport.sh under Unix operating systems .When you execute iReport for the first time, it will create a directory(.ireport) in your home directory. This directory includes all the configuration files as   XML files.

Set Compilation Directory

In this tutorial iReport, the default compilation directory is “C:\iReportExample.” To change compilation directory select "Options -> Settings..." from menu and click the "Compiler" tab and select compilation directory name by clicking on the “Browser” button. Or to store compiled jasper file in the same directory where JRXML/XML files are stored, make sure that “Use the reports directory for compiles” checkbox is checked.

Figure 1

Set Report Format Viewer

To view report using iReport select "Options -> Settings..." from menu and click on the "External programs" tab and select different format.

Figure 2

Adding New Database Connection

To retrieve data from database, you have to create a new database connection. Use the following steps for this:

·         Select “Data -> Connections/Datasources” from the menu to open the “Connection/Datasources” dialog (see Figure 3).

Figure 3

·         Click on the “New” button to open “Connections Properties” dialog.

·         Give a suitable connection name.

·         Choose appropriate the type of Connection/Datasources.

·         Choose the appropriate JDBC driver.

·         Enter JDBC URL or enter the server address and the database name, and then click on the "Wizard" button. 

·         Enter the User name and Password.

Figure 4

·         To check the database connection click on the “Test” button. It shows the following figure if the database connection is OK.

Figure 5

·         Now click on the “OK” and then “Save” buttons.        

Designing Report

To design JasperReports report, select “File -> New Document” from the menu. Enter the report name in the “Report name” field and click on the “OK” button to open a blank report design.

Adding Static Text

To add  Static text to the report, click on the "T" icon at the top of the screen or select “Edit ->Insert Element -> Static Text” from menu and  place it where you want to display the text.

Figure 6

Adding Report Query

To retrieve data from the datasources select “Data-> Report query” from the menu to open the Report query dialog. Make sure that “Automatically Retrieve Fields” checkbox is checked. Now write your SQL query in the textbox. Click the “OK” button to close the dialog.

Figure 7

Adding Text Fields

Report fields are used to display data retrieved from the datasources into the report. All the fields must have the same name and type as the columns they map .To add fields to the report click on the "F" icon at the top of the screen or select “Edit ->Insert Element-> Text Field” from the menu and place it where you want to display the field. Or simply drag and drop them from Fields onto the section of the report where you want.

Figure 8

 

Adding Images

To add an image to the report, select "Edit->Insert Element->Image" from the menu. Go to the properties of image field and click the “Image” tab. Give the path for the image by clicking on the “Find” button.

Figure 9

Adding Parameters

Parameters are used to dynamically modify SQL Query. To add a parameter to the report select “View -> Parameters” from the menu, then Click on the “New” tab. In the “Add/modify parameter” dialog enter/select the following values and click the “OK” button afterwards.

·         Enter the Parameter Name (e.g. City).

·         Select theParameter class type (e.g. java.lang.String).

·         Make “Is for prompting” checkbox checked so that when you run the report from iReport it will prompt you to enter the value for that parameter.

·         Enter the Default value expression (e.g. “Bombay”).

Figure 10

Adding variables

A report variable is used to perform various calculations on the corresponding expressions. Here are some important things that you should follow when designing the report using variables.

·         The variable class type must be matched with class type of the field on which it will perform calculation.

·         The calculation type tells JasperReports what to do.

·         The variable expression represents the value to be evaluated in the calculation. It may be Fields, Variables, Parameters, wizards, recent expressions, etc.

·         As a variable can reference other variables, so the referenced variables must be defined previously in the report design. So the order of declaring variables is important in report design.

To add the report variables, select "View->Variables" from menu and click on the “New” button. In the “Add/modify variable” dialog enter/select the following and click the “OK” button afterwards (see figure 11).

·         Enter the Variable Name (total).

·         Select the Variable Class Type (java.lang.BigDecimal).

·         Select the Calculation Type (Sum).

·         Select the Variable Expression ($F{QTY_SALES).

Figure 11

Now drag and drop this variable into the columnFooter, lastPageFooter or Summary section to display result.

Adding Groups

Groups in a report define a collection of related records. A report can contain more than one group and a group can contain another group, so the order of declaring a group in a report design is important.

Suppose you want to create a report that will group salesman by state and calculate total number of item sold by each group. For that, first define a report group by selecting "View/Report Groups" menu and then click the “New” button. In the “Add/modify group” dialog Enter Group name and Group Expression, then  click the “OK” button.

Figure 12

To create a report using the group you must write the SQL query properly ("order by state"). When you add a new group, you will see two new sections at the top and bottom of detail section. In this example it is called "stateNameHeader" and "stateNameFooter." Suppose you want to display the total number of items sold at the end of each group. For this create a variable ($V{totalQty}) and make the “Reset type” as a group, then drag the variable into the "stateNameFooter" section. The generated report looks like the following figure.

Figure 13

 

 

Adding Charts

Using iReport you can design reports with charts. JasperReports currently supports the following types of charts: Pie, Pie 3D, Bar, Bar 3D, XY Bar, Stacked Bar, Stacked Bar 3D, Line, XY Line, Area, YX Area, Scatter, Bubble, Time series, High Low, Candlestick, meter, thermometer, and MultiAxis. Chart parameters are different for each type of chart.

Suppose you want to add a pie chart that shows the total number of items sold by each salesperson at the end. For that, first add a new chart in the summary section using the "Edit->Insert Element->Chart" menu. Choose a chart. Open the properties by right clicking on the chart then go to the “Chart” tab.  Click on the “Edit Chart Properties” button and go to the “Chart data  -> Details.” In the Chart properties dialog enter the three expression as shown in the following figure and click the “Close” button afterwards.

Figure 14

Now the user has to make the desired visual settings for it. When you run the report, you will get a pie chart at the end of your report as shown in the following figure.

Figure 15

Creating report from iReport

After creating JRXML or XML file we can create reports in different format from iReport as well from JAVA. In my previous article entitled “Creating Report Using JasperReports,” I have explained how to create a report from Java. Now to create a report from iReport, compile the JRXML or XML file. To compile the report, click on the “Build -> Compile” menu; it will create a Jasper file. Now select any format from the “Build” menu. Finally, click the “Build -> Execute" (with active connection) from the menu to create a report.

Figure 16

Conclusion

So we can say iReport makes the JasperReports designing task faster. This part of the tutorial covered a few features of iReport and how to create report using iReport. In the next part I will discuss the advanced features (such as subreport,crosstab) of iReport.

By Anuva Das

 

 

 

 



User Comments

Title: Missing images   
Name: Jeff
Date: 9/7/2012 7:35:26 PM
Comment:
This article is missing all the images.
Title: table when connected to xml datasource showing null values...   
Name: hina sachdev
Date: 8/22/2012 3:06:13 AM
Comment:
hi,
I am creating a report through ireport using xml datasource and i want to display that value in the table. the table that is displayed is showing null values
Title: A question on dynamic datasource connection   
Name: Sunil Kumar
Date: 6/28/2012 1:05:48 AM
Comment:
Hi
I am creating a report through ireport. But I have requirement of selecting one datasource among many datasource.
We have many clients using the same report but each client with his own database. So in the datasource connection can you please tell me how the select datasource at run time depending on the clients.

Thanks
Sunil Kumar
suniltvg@gmail.com
Title: complain   
Name: ayesha
Date: 5/2/2012 2:44:47 AM
Comment:
this is so much difficult and bogus toturial.i dont understand a single bit of any task.
Title: ireport 3.0.0 version   
Name: Suji
Date: 3/15/2012 2:13:45 AM
Comment:
Hi Asha ,

did u asked about how to add check boxes using ireport, tell me which tech u are using
If u use JAVA we can take check box image and add the image as parameter

Thanks,
suji
Title: Chart   
Name: Aasha
Date: 3/7/2012 7:36:40 AM
Comment:
Hi All,
How to add chart properties in ireport 3.0.0. anyone knows please tell me. it's very important
Thanks in Advance,
Aasha
Title: ireport   
Name: raj
Date: 2/2/2012 11:43:42 PM
Comment:
Error filling print... Could not load object from location : /jsp/report/searpt/repSeaHBL_DISPLAY_Sub_ELS.jasper
net.sf.jasperreports.engine.JRException: Could not load object from location : /jsp/report/searpt/repSeaHBL_DISPLAY_Sub_ELS.jasper      at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:267)      at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:308)      at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:257)      at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)      at net.sf.jasperreports.engine.fill.JRFillFrame.evaluate(JRFillFrame.java:144)      at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)      at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalFiller.java:424)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:388)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:249)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:895)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:817)      at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517)      at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:910)      at java.lang.Thread.run(Unknown Source) 
Print was not filled. Try using an EmptyDataSource...

any one please halp me .I gave all paths correctly.
Title: ireport 3.0.0 version   
Name: Asha
Date: 12/29/2011 5:41:10 AM
Comment:
How to add checkbox in ireport anyone know please tell me. It's very useful to me.
Please anyone know mail me at asha@isquaresystems.com
Thanks in Advance
Asha
Title: ireport   
Name: Asha
Date: 12/29/2011 5:38:39 AM
Comment:
I'm using ireport 3.0.0version.my doubt is, How to add checkbox in ireport
Title: How to run sub reports from ireports3.0.0   
Name: sumaiya
Date: 11/30/2011 4:55:58 AM
Comment:
I'm using ireports 3.0.0 version, but when i tried to implement it through code i'm getting the following error,
could not load the object
Title: embedding problem   
Name: Priyanka
Date: 9/12/2011 7:00:35 AM
Comment:
i am having problem in embedding report with openbravo.
Title: i cannot see the layout tab on my ireport   
Name: purry
Date: 8/12/2011 10:06:24 AM
Comment:
i cannot the layout tab
Title: Edit Expression Problem   
Name: Anant
Date: 2/17/2011 4:16:53 AM
Comment:
Hi,
i want compare integer to string,use in jasper-edit expression.
this code can not run.. how to compare integer to string & run this code..

($F{pa1}==1?"A":($F{pa1}==2?"P":($F{pa1}==3?"WO":($F{pa1}==4?"WOP":"½P"))))
Title: REPORT PROBLEM   
Name: VP
Date: 1/24/2011 1:25:25 AM
Comment:
Hi,
My designing part of jasper report is over.But whenever I was taking its printout,only one record is coming.Plz can anyone can help me.Where is the problem?
Title: How to add different background images to subreports in ireport   
Name: Ram
Date: 1/18/2011 1:26:27 PM
Comment:
Hi,
I would like to add different background images to different sub reports and finally I will keep all those sub reports into one main report,If I will execute the main report with particular background,sub reports should be display there own background image irrespective of main report background...

any suggestions ???????
Title: How to navigate to a specific page within I report   
Name: Paras Verma
Date: 1/10/2011 4:33:28 AM
Comment:
how to naviagate to a specific page within the I report using controls such as button click in ASP.NET code:C hash
Title: how to ireport using jsp   
Name: m.javed
Date: 12/23/2010 12:11:34 AM
Comment:
how to call ireport usig jsp please give me the code i am not able to call it it has given me error.
Title: Data range low exp in charts   
Name: Satheesh
Date: 8/9/2010 5:36:41 AM
Comment:
Hi, how can i set the data range low n high expressions to a dynamic value (say, to a field from a database query) rather than set it static at design time?

Thanks
Title: 3D bar   
Name: Chetan
Date: 7/27/2010 2:14:58 AM
Comment:
Hi,
I am not able to understand how to use bar 3D in ireport as i have to use it some where. Can u please help me out?
You can contact me on thisisme_chetan@yahoo.co.in.
Title: how to create summary report with total amount in jasper ireport???   
Name: anson
Date: 3/27/2010 6:41:07 AM
Comment:
I want to creat a billing and summary report by using jasper ireport and must include the total amount of the report. Anyone can help me??
very urgent..i need it in my assignment........
Title: ireport+java+servlet+jsp   
Name: faizan Ahmad
Date: 3/4/2010 9:28:43 AM
Comment:
hi,
plz help me out i want to learn to communicate java,servlet and jsp with ireport..plz give me the links of tutorial links or info for that...@faizan_comsian@yahoo.com...plz plz
thanks in advance...
Title: exception   
Name: s
Date: 12/22/2009 2:45:42 AM
Comment:
When i preview my report, compilation running time: 453(some number) is coming... but some times i am getting that
Title: Good   
Name: Mujahidh Haseem
Date: 12/18/2009 4:56:57 AM
Comment:
it's very useful to me.
Title: Title Problem   
Name: Karthik
Date: 9/29/2009 2:41:19 AM
Comment:
Hi,
I want to print title on second page and hide the page header on second page. If i put title in page header then other page header values also printing. Pls help me. Email:nkarthin@gmail.com
Title: EXAMPLE IN JSP + IREPORT   
Name: rma
Date: 9/17/2009 7:18:03 PM
Comment:
EXAMPLE IN JSP + IREPORT TO pdf

http://www.taringa.net/posts/ebooks-tutoriales/3305461/Reportes-jsp-+-ireport.html
Title: Hyperlink in chart   
Name: Afs
Date: 9/6/2009 12:17:44 PM
Comment:
Hi,
I want to use drill-down functionality in my ireport chart, please help me configure hyperlink. Its really urgent !!!! :(
u can contact me on afsha_star@yahoo.co.in.. Thanks a lot in advance...
Title: Creating Hyperlink in IREPORT   
Name: subramanyam
Date: 8/28/2009 10:33:00 AM
Comment:
Hi prem

thanks you very much for replying. could you please provide your contact number. so that i will explain my problem clearly it is very urgent for me. my contact number is 09848058044
Title: Creating Hyperlink in IREPORT   
Name: Prem
Date: 8/25/2009 5:24:46 AM
Comment:
Hi Subramanyam,
Set the Hyperlink Type as Reference and in the Hyperlink Reference Expression give the URL of another report.
Title: Creating pdf hyperlink suggetion   
Name: Prem
Date: 8/25/2009 5:12:18 AM
Comment:
Hi Subramanyam,
by using event listener we can achieve hyperlink concept in IREPORT.

let me know if any issues, need code send me out.
Title: Hyperlinks in IREPORT   
Name: subramanyam
Date: 8/13/2009 2:37:15 AM
Comment:
Hi AnuvaDas

this is subramanyam. i am using IREPORT to generate reports in my project. i want to create the hyperlinks in the pdf indexpage so that when i am clicking the hyperlink it will take me to the particular title.

could anyone please help me out that how to create the hyperlinks in IREPORT ASAP.

Thanks in advance.
Title: Minnat Siddiqui   
Name: Nazma
Date: 8/7/2009 2:08:59 AM
Comment:
Hi Minnat,

many thanks to u.
Title: how to pass query from java program.   
Name: Amol Kawale
Date: 7/21/2009 12:18:07 AM
Comment:
Hi,
I am using jasper ireport in my project but i unable to pass runtime query to jasper report.Can anyone help me.
amol.skawale@gmail.com
Title: Line Chart Background Color   
Name: Debobrota Das
Date: 7/9/2009 1:57:08 AM
Comment:
hi. I have a made a nice Line Graph of iReport3.0. In Chart property I have set Background colour as white and as a text . When i run report then chart graph shows Background color nicely but when i save as a PDF then in PDF file shows different color. How to solve?
Title: nazma   
Name: Minnat Siddiqui
Date: 7/8/2009 3:21:25 AM
Comment:
Voto View-> Reports Goups -> New the Add GrpName, add Expression -. Ok
Title: Can u please help me in this   
Name: nazma
Date: 6/18/2009 5:50:59 AM
Comment:
Hi,
Iam using jasper iReport 3.5.0, in this i have create the one report. Now i have to create in this sub groups and totals. how to create? Please help me.

nazmashaik@gmail.com
Title: UserFullInstruction   
Name: SHO
Date: 6/11/2009 2:34:36 AM
Comment:
Really this website is very useful to the developer of iReport.
Title: Editing Old Reports to ireprts   
Name: Alexander Bungas
Date: 4/20/2009 2:34:27 AM
Comment:
How to edit existing report from Openbravo ERP
Title: Crystal report and JSP/netbeans   
Name: Biplob
Date: 3/30/2009 4:36:43 AM
Comment:
I am displaying report using crystal report11 from jsp.Now i want that user should not able to save the report which i am displaying in PDF format.Can i disable the save as button of the pdf report......

Thank u in advance
Title: Installting iReport on ubuntu   
Name: Qamrun Nisa
Date: 3/25/2009 8:25:39 AM
Comment:
Hi,

I wanted to install iReport on ubuntu. I followed the above mentioned steps. But didn't get any file named classes12.jar. I have to use it with Zucker Report in Sugarcrm. How can I do it? Please help me.


Thnx
Title: CAN ANYONE HELP ME   
Name: Dipankar Malik
Date: 3/17/2009 7:32:30 AM
Comment:
Anyone can help me how to create computed column in iReport3.1.4
Title: it's well   
Name: hz
Date: 3/9/2009 4:38:17 AM
Comment:
it's well
Title: ireport   
Name: anks
Date: 2/19/2009 8:35:05 AM
Comment:
Sir,
i want to create bar chart using ireport .
It must show the bar chart showing the status "work done" by the respective employee.
the column from which i m taking this "work done" it also consist "work not done" field.
I want to show bar chart for only "work done" for the respective employee and not "work not done".
Pls help me in solving the problem.
aanksss@gmail.com
Title: varible   
Name: seshu
Date: 2/18/2009 11:36:57 PM
Comment:
hi, i am new to i report..
can we use varibles in place of parameters in rreport Query.....if i do so i am getting an error....
if i use parameter-date for reports----to_date and from_date using <= and >= conditions...
i am still not getting data of to_date....i.e getting data till to_date....
plss help me
thanks..
seshujus4u@gmail.com
Title: crosstab   
Name: Anadna
Date: 1/29/2009 10:56:50 PM
Comment:
Hi, I'm new to jasper reports.I'm trying to create crosstab,i am using ireport3.0.0.someone please help me to create new crosstab.

Thanks.
anandgade21@gmail.com
Title: subreport   
Name: nathan
Date: 12/31/2008 2:27:30 AM
Comment:
hai couldnot load object from location when subreport creation if anyone have know please tellme
kolanchinathan.e@gmail.com
Title: creating hyperlink to report to view another report   
Name: versam
Date: 11/28/2008 5:40:00 AM
Comment:
Hi, I'm new to jasperReports. I have created a report and and want to create a link to that report to view another one and be able to view it in HTML viewer
Title: Bar Chart   
Name: Bill
Date: 10/16/2008 4:30:33 PM
Comment:
Hi I was able to get the pie chart working
But for some reason the bar chart is not working, can someone please help me out.

Thanks,
Title: error in installing ireport Exe   
Name: Prabha
Date: 10/7/2008 4:28:25 AM
Comment:
Getting Error while running iReport saying error while loading configuration file
Title: error in installing ireport Exe   
Name: Prabha
Date: 10/7/2008 4:08:12 AM
Comment:
\
Title: error in installing irport Exe   
Name: Prabha
Date: 10/7/2008 4:07:26 AM
Comment:
\
\
\
\
Title: ireport   
Name: bala
Date: 9/8/2008 7:43:19 AM
Comment:
i am using one main report and one sub report, the main report field value is passed to sub report as parameter, the sub report query is where acctvalue=$p{acctvalue},that the query window will dispayed please set a the default value parameter acct value, please give me the solution
Title: Sum of Variables   
Name: viji
Date: 9/1/2008 1:40:05 AM
Comment:
Hi,
I am using iReport 3.0.0.Now my problem is sum of fieldtype(duration).The data type of field is String.The sum calculation is stored into integer variable(Total number of duration).The error is cannot cast String into int.Please anybody give me the solution.
Title: ireport problem   
Name: emine
Date: 8/19/2008 4:24:25 AM
Comment:
hello..
i am working at ireport 2.0.4 and showing depend to condition(example show or dont show) that my fields come from my database.then when i execute, dont want to see fields's location are blank.how can i solve this problem?
Title: ireport in jsp   
Name: lia
Date: 8/15/2008 2:27:20 AM
Comment:
how to run ireport from jsp..??

kaliana1@yahoo.com
Title: problem with sub-report   
Name: su123
Date: 8/14/2008 9:28:42 AM
Comment:
Hi,
I'm trying to include a sub report within a report. The sub report by itself works perfectly fine. But when i include it in the main report it is not filled with data. I'm using a ORACLE connection. There are no parameters in the sub report. When executed the main report display 'The document has no pages'
Title: how to download and install jasper report 2.0.2 and iReport 2.0.2   
Name: viji
Date: 7/26/2008 1:45:15 AM
Comment:
Please send the required url of downloading jasper 2.0.2 and iReport 2.0.2 and give the steps of installation.
Title: how to call jasperreport from jsp   
Name: meera
Date: 7/2/2008 1:10:05 AM
Comment:
could you please send me a sample code of how to call it from jsp..so it will be very helpful for me...
my email id is testmail_99@yahoo.com
Title: Student SE   
Name: Shirhan
Date: 5/28/2008 9:22:03 AM
Comment:
I am stuck at the parameter thing... by reading this I got the idea. Thank you very much.

Keep up the good work!!

:-)
Title: how to call ireport from jsp   
Name: dhanya
Date: 5/21/2008 5:18:17 PM
Comment:
hi,
i read your article for ireports..and i installed ireport in my system..i made sample reports .but i dont know how to connect it to jsp.in the article its written that a classpath need to be set..how is it?could you please send me a sample code of how to call it from jsp..so t will will be very helpful for me...my id is dhanya.shibu@gmail.com.thanks in advance
Title: help   
Name: Jay
Date: 4/15/2008 5:12:25 AM
Comment:
Hey Im having a problem making an image a background of a field.. I made the field transparent and I sent the image to the back but still the field overshadows the image... How can I make the field transparent so the image can appear behind it..
Title: Hi   
Name: Rajashekharayya
Date: 3/17/2008 3:22:25 AM
Comment:
Hi
Thank You for having discussion of iReport,i am getting a problem during chart export into excel.but i am able to get for pdf in excel image is not printing
Title: Ireport set preset size   
Name: hyank
Date: 3/1/2008 5:53:54 AM
Comment:
Hello there
im newbie in ireport, i have a problem in set preset size manual outside ireport. i want user can choose the paper size when the report is printed. but i don't know the way??
can you help me??

thanks before
Title: Reports(To Himanshu....the question copier!)   
Name: Harilal
Date: 2/20/2008 11:53:07 AM
Comment:
Title: Feedback and facing problem
Name: Himanshu Jain
Date: 2/8/2008 6:07:32 AM
Comment:
This is really useful aricle for beginners and intermediate users.
Could anyuone help me out.

Now I face new problem related with the Bar Charts. In my project I commonly use Japer Reports to generate Report (with the help of i-report2.0). Now I need to represent some of the data’s in a chronological way. And for that purpose I select the Bar chart.
I have two values "Actual Data" And "Predicted Data", And I need to contrast these two values in My bar chart. But in i-Report I found only one option to set the values for the Bar Chart. In X-axis the object name and in Y-axis I set the Numbers. And I want to represent the Bar chart as the First bar repesent the predicted data and the neighbor bar represent the actual data...........
If any one has an idea or solution to this problem kindly give here
Thanks and Regadrs
Himanshu

First of all I am(Harilal.A.S.)very thankfull to Mr(?)"Himanshu" to ask this question why because this article is just I asked in the Java-Ranch forum....and i see that you copy the entire thing (that I asked in java ranch forum) and paste here......anyway if you got any answer post it in Java-Ranch Forums....as my anwer...........(and these type of copy the contents is not a right method....)
Title: Software Engineer   
Name: Abhishek
Date: 2/18/2008 10:53:56 AM
Comment:
Hi,

How are you?

I'm trying to export jasper report into pdf. But when I do that I get 25 pages with the same content.
I just need only once.

I'm using the subreport inside a master report.
I've two groups created.

So, can you please let me know how to take care of this?'
And, also can you please let me know how to reduce the white spaces between the columns and rows in the subreports?

Thanks in advance.
Title: Feedback and facing problem   
Name: Himanshu Jain
Date: 2/8/2008 6:07:32 AM
Comment:
This is really useful aricle for beginners and intermediate users.
Could anyuone help me out.

Now I face new problem related with the Bar Charts. In my project I commonly use Japer Reports to generate Report (with the help of i-report2.0). Now I need to represent some of the data’s in a chronological way. And for that purpose I select the Bar chart.
I have two values "Actual Data" And "Predicted Data", And I need to contrast these two values in My bar chart. But in i-Report I found only one option to set the values for the Bar Chart. In X-axis the object name and in Y-axis I set the Numbers. And I want to represent the Bar chart as the First bar repesent the predicted data and the neighbor bar represent the actual data...........
If any one has an idea or solution to this problem kindly give here
Thanks and Regadrs
Himanshu
Title: Date Display   
Name: Prabha
Date: 12/10/2007 1:09:52 AM
Comment:
Hi All,

I need to display the date in the final report. I am using xml datasource. In the field class type i have chosed java.util.Date. In the pattern iam choosing dd/MM/yyyy. In the xml file i have the value as 10/05/2007. But I am getting the error when executing the report.Can anyone help?

Error filling print... null
org.apache.commons.beanutils.ConversionException at org.apache.commons.beanutils.locale.BaseLocaleConverter.convert(BaseLocaleConverter.java :231) at org.apache.commons.beanutils.locale.LocaleConvertUtilsBean.convert(LocaleConvertUtilsBea n.java:249) at net.sf.jasperreports.engine.data.JRXmlDataSource.getFieldValue(JRXmlDataSource.java:342) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:815) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:779) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1105) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:763) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:688) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:960) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:584) at java.text.SimpleDateFormat.applyPattern(SimpleDateFormat.java:1766) at net.sf.jasperreports.engine.util.JRDateLocaleConverter.parse(JRDateLocaleConverter.java: 83) at org.apache.commons.beanutils.locale.BaseLocaleConverter.convert(BaseLocaleConverter.java :225) ..
Title: Print 2 reports, in same pdf   
Name: Alberto Rosales
Date: 12/6/2007 11:56:13 AM
Comment:
hi,I need some helppppppp, I have created 2 reports from a java swing application, but now I have to print both reports in the same pdf File, how can I do it???
Title: chart   
Name: boikanyo
Date: 11/5/2007 9:25:14 AM
Comment:
thanks very much to Anuva......
i'm now able to walk through some things in ireports n jasper reports.........

thanks again bra...
Title: Jsp report   
Name: mudita
Date: 10/31/2007 1:28:40 AM
Comment:
hi all ,
i want to knw how i can create report in JSp..i m new ..so can nyone help me..
Title: nothing useful   
Name: Balaji
Date: 10/8/2007 9:25:20 AM
Comment:
Nothing is useful in this article
Title: Error   
Name: Gisela
Date: 10/1/2007 3:29:46 PM
Comment:
Hi!
How to use a java servlet page for the user to add a comment and reply to a comment.Could you please send me the sample code to my email address.
Thank you
Title: doubts regrading compliation and jsp page   
Name: Shailly
Date: 9/29/2007 3:54:20 AM
Comment:
Hi I am new to Jasper.
While compliing it , I am getting MAIN CONSOLE error as:
error loading configuration file.
plz tell me the way out.

how to use it in jsp page?

plz help with sample code.

my id: shailly@techmahindra.com
Title: Link from pdf to jsp page   
Name: priya
Date: 9/24/2007 3:06:56 AM
Comment:
Hi,

Is it possible to give link from a pdf report created to a jsp page , where I can pass the parameters of name=value pair type from pdf to jsp page
Title: Very Easy to Understand   
Name: Revathi
Date: 9/3/2007 8:00:08 AM
Comment:
Hi Anuva

This is first article which made me understand how iReport works. I am still exploring for new features amd also awaiting your nest Part I - Advanced Features.

Thanks
Title: ireport questions   
Name: mmus
Date: 8/23/2007 2:15:17 AM
Comment:
hi ! i`m the newbie in using ireport.. can u tell me where is the location of the jrxml file when u execute a report using i report?..

one more thing ..i also need sample code how to call this jrxml from jsp form through servlet?.. this is my email
hentamsaja82@yahoo.com

thanks in advanced
Title: reply to Sathesh kumar   
Name: Anuva
Date: 8/10/2007 5:45:54 AM
Comment:
create a JRXML or XML file using iReport.call this from servlet or jsp(which i already discussed in my article "creating report JasperReport") and then call this servlet or jsp in ur program.If u ve any doubt send ur mailling addres,so that i can send u a sample code.
Title: iReport in Eclipse   
Name: Sathesh kumar
Date: 8/10/2007 5:00:16 AM
Comment:
Is it possible to open the iReport in eclipse IDE?
Title: iReport Creation   
Name: Sathesh kumar
Date: 8/10/2007 4:47:04 AM
Comment:
This article is very useful for who are new in Bussiness Intelegence domain.
If you provide the details about how to call this report in server side program, It will very helpfull.
Title: ..   
Name: Peter
Date: 8/7/2007 3:54:50 AM
Comment:
Good article, just a pity, its not more extensive. But at least i started to understand little bit the things about iReport. Article recomended in sourceforge is piece of shit
Title: hyperlink on ireports   
Name: boikanyo
Date: 6/6/2007 7:04:58 AM
Comment:
hi.is it possible to have a tutorial on how to add hyperlinks on ireports.link that will maybe open a .doc or pdf or maybe some page.......

thanks
Title: thanks to anuva   
Name: boikanyo
Date: 5/25/2007 5:44:06 AM
Comment:
thank u very much,i had the same code but it worked out of a sudden after adding this other library.but hey ur help is much appriciated.
i convinced my boss dat jasper is de way so,my head is on the block im always looking 4 solutions and im new on this jasper thing so pls be patient when i ask lot of questions.
Title: Reply for boikanyo   
Name: Anuva
Date: 5/22/2007 2:23:19 AM
Comment:
Thanks.u can use above chart method to design ur chart,save it as .JRXML file.then use the following servlet code to create chart.

****************************************
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import java.sql.*;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.engine.export.*;

public class chart extends HttpServlet
{
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
ServletOutputStream servletOutputStream = response.getOutputStream();
Connection conn = null;
JasperReport jasperReport;
JasperPrint jasperPrint;
JasperDesign jasperDesign;
try
{
// get a database connection
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:@192.168.10.85:1521:oracledb","demo","demo");

// load JasperDesign from XML and compile it into JasperReport
jasperDesign = JRXmlLoader.load("C:/report/ireportChart.jrxml");
jasperReport = JasperCompileManager.compileReport(jasperDesign);

// fill JasperPrint using fillReport() method
jasperPrint = JasperFillManager.fillReport(jasperReport,null,conn);

JasperExportManager.exportReportToPdfFile(jasperPrint,"C:/report/chart.pdf");
response.setContentType("application/pdf");

JasperExportManager.exportReportToPdfStream(jasperPrint, servletOutputStream);
servletOutputStream.flush();
servletOutputStream.close();
}
catch(SQLException sqle)
{
System.err.println(sqle.getMessage());
}
catch (ClassNotFoundException e)
{
System.err.println("No
Title: pdf   
Name: boikanyo
Date: 5/21/2007 7:24:28 AM
Comment:
ok.i realy apreciate this article as i learned much from it but i realy would apreciate it when it had a code to display it on a browser(including a chart) using pdf

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2014 ASPAlliance.com  |  Page Processed at 10/21/2014 12:45:36 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search