Creating and Designing Report Using iReport - Part 1
page 5 of 6
by Anuva Das
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 91276/ 77

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


View Entire Article

User Comments

Title: Missing images   
Name: Jeff
Date: 2012-09-07 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: 2012-08-22 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: 2012-06-28 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: 2012-05-02 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: 2012-03-15 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: 2012-03-07 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: 2012-02-02 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: 2011-12-29 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: 2011-12-29 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: 2011-11-30 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: 2011-09-12 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: 2011-08-12 10:06:24 AM
Comment:
i cannot the layout tab
Title: Edit Expression Problem   
Name: Anant
Date: 2011-02-17 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: 2011-01-24 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: 2011-01-18 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: 2011-01-10 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: 2010-12-23 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: 2010-08-09 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: 2010-07-27 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: 2010-03-27 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: 2010-03-04 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: 2009-12-22 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: 2009-12-18 4:56:57 AM
Comment:
it's very useful to me.
Title: Title Problem   
Name: Karthik
Date: 2009-09-29 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: 2009-09-17 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: 2009-09-06 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: 2009-08-28 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: 2009-08-25 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: 2009-08-25 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: 2009-08-13 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: 2009-08-07 2:08:59 AM
Comment:
Hi Minnat,

many thanks to u.
Title: how to pass query from java program.   
Name: Amol Kawale
Date: 2009-07-21 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: 2009-07-09 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: 2009-07-08 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: 2009-06-18 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: 2009-06-11 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: 2009-04-20 2:34:27 AM
Comment:
How to edit existing report from Openbravo ERP
Title: Crystal report and JSP/netbeans   
Name: Biplob
Date: 2009-03-30 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: 2009-03-25 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: 2009-03-17 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: 2009-03-09 4:38:17 AM
Comment:
it's well
Title: ireport   
Name: anks
Date: 2009-02-19 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: 2009-02-18 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: 2009-01-29 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: 2008-12-31 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: 2008-11-28 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: 2008-10-16 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: 2008-10-07 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: 2008-10-07 4:08:12 AM
Comment:
\
Title: error in installing irport Exe   
Name: Prabha
Date: 2008-10-07 4:07:26 AM
Comment:
\
\
\
\
Title: ireport   
Name: bala
Date: 2008-09-08 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: 2008-09-01 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: 2008-08-19 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: 2008-08-15 2:27:20 AM
Comment:
how to run ireport from jsp..??

kaliana1@yahoo.com
Title: problem with sub-report   
Name: su123
Date: 2008-08-14 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: 2008-07-26 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: 2008-07-02 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: 2008-05-28 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: 2008-05-21 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: 2008-04-15 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: 2008-03-17 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: 2008-03-01 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: 2008-02-20 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: 2008-02-18 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: 2008-02-08 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: 2007-12-10 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: 2007-12-06 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: 2007-11-05 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: 2007-10-31 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: 2007-10-08 9:25:20 AM
Comment:
Nothing is useful in this article
Title: Error   
Name: Gisela
Date: 2007-10-01 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: 2007-09-29 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: 2007-09-24 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: 2007-09-03 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: 2007-08-23 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: 2007-08-10 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: 2007-08-10 5:00:16 AM
Comment:
Is it possible to open the iReport in eclipse IDE?
Title: iReport Creation   
Name: Sathesh kumar
Date: 2007-08-10 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: 2007-08-07 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: 2007-06-06 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: 2007-05-25 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: 2007-05-22 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: 2007-05-21 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-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 12:47:02 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search