The most recent project I have been working on involved creating a large number of reports for the company’s extranet/intranet. In the past, I have usually done reports using some form of JSP and JDBC. But in this case, there is a large number of reports to be developed, and so I was tasked with researching some of the open source solutions for reporting, in hopes we could find a solution that would allow us to get the reports done faster, and be provided to the user with more functionality, and with less custom code.
In the end we compared Crystal reports with JasperReports, and JasperReports was picked. JasperReports is not only free, but also is proven in the Java world, and has a lot of users. It is customizable, since its Java and open source, and has support for using Collections or Lists of Business Objects, such as those populated via Hibernate.
Once JasperReports was chosen, I tested several GUI’s to help build the reports instead of editing them strictly in their native XML. JasperAssistant was found to be the best of all of them, and integrates seamlessly with Eclipse. If you are an Eclipse fan as I am, then you’ll love using JasperAssistant. It even allows you to preview the report against your database right in Eclipse.
Next, I looked into OpenReports. OpenReports is a front end for JasperReports. It was written in WebWork, and provides a lot of functionality that you would have to write yourself to get the reports running on the web. It comes with basic security (users, passwords, and reporting groups). You can assign which users can access which groups, and which reports are in which groups. You can also add parameters, and then assign them to a report. You create the JasperReport in JasperAssistant (or with any other tool, including a text editor if you want to do the XML by hand), and then compile it (which JasperAssistant does for you). Then when you add a new report to OpenReports, you select which JasperReport file to use, select your datasource, assign your parameters and the report is ready to be used on the web.
OpenReports allows the user to export the report as a PDF, HTML, CSV, XLS, or PNG. This is all done for you without any additional work. As for parameters, there is some good functionality built in. When you add a Date parameter to your report, it automatically brings up a calendar for the user to select the date with. Also, you can add a query parameter which runs an sql that you have specified, and populates a drop down select box with the results. Parameters can be marked as required or optional, can be several different data types, and can be told to come in in any order needed. There are other parameter options as well. It also allows the user to schedule a report and have it emailed to a user.
I have made some improvements to OpenReports, including the Collection/List functionality to use Business Objects which JasperReports supports, but OpenReports currently doesn’t. At some point I’ll pass that code on to the original developers.
In the end, with JasperReports and OpenReports, the only thing you have to worry about is creating the SQL to get the data. After that, it takes little work to provide a nice looking report in multiple formats on a web site.
Comment
Subscribe
Stumble
Previous
304 Responses to JasperReports and OpenReports
Derek
April 8th, 2005 at 7:37 pm
Please tell me if:
(a)these packages were easy to setup
(b)you have used these tools from/within Cocoon
(c)you mind the odd question or two when I try and get them setup..?
Thanks
Brian N. Burridge
April 8th, 2005 at 8:41 pm
I found them to be very easy to install. The learning curve is in learning how to use JasperAssistant. Not because JasperAssistant is difficult, but because you have to learn Jasper Reports and and how banding, and grouping and such works. If you happen to have Crystal experience, it won’t take as much time, but I didn’t. Installing them is trivial.
I have not used them from within Cocoon. Jasper Reports should be easy to use from within Cocoon, but I don’t think you’d be able to use Open Reports from within Cocoon. It is its own separate web application. We are keeping it separated from our intranet/extranet, and just linking to it (and integrated the security between the two). It uses WebWork as a web framework. The time to port that to Cocoon would be massive.
Good luck with setup, and let me know if you have any other questions.
Alex Liu
April 13th, 2005 at 12:37 pm
I’m looking for open source solution for reporting server. Your Blog already very descriptive how to perparing a reporting service.
I have feel question as follow about the development flow and system architecture. My project have 2 type of report (Adhoc, Batch)
1. JasperAssistant is it better then Open Report Designer?
2. If I use JasperAssistant create a report within my Application? How can I deploy the report to Open Report?
3. Currently I have use WAS as Application Server, Can I use JBoss & Open Report as Reporting Server?
Cheers,
Alex
Brian N. Burridge
April 13th, 2005 at 6:54 pm
1. If I recall correctly, Open Report Designer did not allow filling a report with data from a Collection of business objects, which JasperAssistant did. Also, since I’m a huge fan of Eclipse, I very much enjoy having my Jasper report designer be fully integrated with Eclipse.
2. I have the open report web application as a project in Eclpse. The reports are in a reports folder in the web application. I just double click on them in Eclipse, and edit them. Then you can use deploy them however you normally would from eclipse (personally, I use the MyEclipse plugin for web app deployment).
3. Open Reports is a web appliation that should work with any application server, including WAS, Tomcat, JBoss, etc.
Alex Liu
April 14th, 2005 at 7:24 am
Thsank for you prompted reply.
Compare with Hibernate and Open Report which one is better for a reporting server in term of performance and usability?
Brian N. Burridge
April 14th, 2005 at 10:16 pm
Jasper Reports is the reporting engine. Open Reports is a web gui front end for that engine, and Hibernate is an “object/relational persistence and query service for Java”.
Jasper Reports can fill a report from a Collection of Business Objects, which were filled with data from a relational database via Hibernate. Open Reports is a web gui which allows users to select a report, enter parameters for a report, and then schedule to report to be run, or run the report in real time, and view the results in PDF, HTML, CSV, etc.
All three work together to provide a wonderful reporting solution for a Java environment. You can do without the Hibernate if you don’t need to fill the report from business objects, and just use standard JDBC to fill the reports.
Alex Liu
April 16th, 2005 at 9:02 am
Thanks Brian,
Your opinion help me a lot. Thank again.
Would you tell me how to do the crosstab report in Jasper Reports?
Cheers,
Alex
Derek
April 19th, 2005 at 6:14 pm
Setup issues – you say “I found them to be very easy to install”. I have not had any success with Open Reports. I tried to follow their less-than-minimal installation guide; got to the point where I dropped the expanded web app into Tomcat, rerstarted and then… the guide does not even say what you should see or expect or the app should start up. There’s also no way to know what and how to populate and use all the tables (report_* ). Is there a more comprehensive and step-by-step guide anywhere else?
Brian N. Burridge
April 19th, 2005 at 7:01 pm
There is an installation guide in the docs folder of the web application. It directs you to create the db schema using the sql provided in the database/schema directory. It then walks you through Configuring Hibernate, Creating the Admin User, Setting the Report Directory and Configuring the Scheduler.
For Configuring Hibernate, I personally choose to use a JNDI connection. You don’t have to populate any of the tables, only create them in your database.
Steffen
April 20th, 2005 at 10:52 pm
Hi there,
I will only make 2 annotation to the previous postings …
To posting 3, about how to deploy the Reports … in OpenReports there is the possibility to upload the JasperReport-Templates (not the xml, but the precompiled templates) into the configured directory which stores the JasperReport-Files …
So if, like in my case, the “OpenReport-Server” is located on another machine, thats no problem, you can just upload the compiled reports over the OpenReports-Interface and than use them to show your Reports
.
The second is the hint to iReport … it’s a GUI for creating JasperReport-Templates too … is easy to use and nearly uptodate with the current JasperReport-Version …
It’s a standalone-java-application so that someone who don’t use eclipse could use iReport without any other software (except java of course).
It’s also possible to bind the Template at the develop-time to several DataSources like any relational database with jdbc-support, JavaBeans, xml- and csv-files and show the filled report in all the possible output-formats (pdf, html, csv, excel and in the JRViewer itself …).
So i use iReport since a while and i think thats a realy nice program to create the needed templates to use in OpenReports (or whatelse programm
.
Have a nice day …
Steffen
Stephane LAISNE
April 21st, 2005 at 2:08 pm
Hi,
I prefer Open Report Designer (ORD) than JasperAssistant because ORD is a standalone solution.
ORD is not intrusive in Jasper template than iReport.
To improve Jasper and ORDesigner I want to use Jasper with Hibernate, and manipulate UML model.
Derek
April 25th, 2005 at 12:49 pm
Re: Post 9
Yes, I did read the [minimal] installation guide (as I mentioned in my previous post) and worked through all the steps. The point was that then nothing happened, and its not clear at all what additional steps are required to have a complete application running under Tomcat. Perhaps you could write up some of the “missing steps” and post them on a blog. Failing which, where else can I look for more detailed information?
Brian N. Burridge
April 26th, 2005 at 7:00 pm
It’s hard for me to know what is missing in the install guide, without knowing what errors you are getting when you try to run the web application. I followed the install guide, and it worked fine for me, so I have no way of knowing what might be missing. I would suggest you contact the developers of Open Reports. Perhaps they can help you.
Bintang Nugroho
May 1st, 2005 at 8:10 pm
I interested with this software and I’ve download it. but i dont know how to use it
because i dont have OpenReports Administration Guide because i dont have credit card to pay it. if u dont mind can you
tell me how to use this software.
what is the function of ORD for OpenReports?
Brian N. Burridge
May 3rd, 2005 at 6:59 pm
I have not used ORD. I believe that is the designer for Jasper Reports. It allows you to use a WYSIWYG interface for laying out the report. It produces a compiled file with a .jasper extension, which is what you use in the Open Reports web engine to setup the usage of that report with an interface. I do not have the administractio guide, either, but setting up the interface portion of a report is very easy. However, using the ORD may be more complex and I have no experience with that.
Richard
May 11th, 2005 at 9:47 pm
Would you tell me how to do the crosstab report in Jasper Reports?
Will be if real help
Brian N. Burridge
May 12th, 2005 at 12:06 am
The current version of Jasper Reports does not support cross tab reports. From what I read they are working on it for a future release. Ironically, the current report I’m working on requires that, but I’m going to have to rearrange the data into a List of BusinessObjects and then populate my Jasper report from that.
Richard
May 12th, 2005 at 4:01 am
Hi Brian
Thanks for the report. One more question. How to populate the column dynamically in Jasper
I have following colunms
Name Jan-04 Feb-05…. Total
Month Column will either increase or decrease
Can we do the same in Jasper report. Do u have a sample for the same
Brian N. Burridge
May 12th, 2005 at 7:36 pm
What is driving the dates? Do they come from a database? Or are they derived in some other way?
Richard
May 12th, 2005 at 7:43 pm
Data comes from Database in the below format
Name Date Amount
***************************
Dis1 10/04 5000
Dis1 11/04 2000
Dis2 10/04 3000
Dis1 11/04 3000
I am rearranging the same using Arraylist and hashmap like this format
Name 10/04 11/05
**********************
Dis1 5000 2000
Dis2 3000 3000
In the above example dates are dynamic
Will have 2 months of date or one year depending on user selection
Brian N. Burridge
May 12th, 2005 at 8:22 pm
I’m actually working on something exactly like that. When I get it done I’ll do a post about it for anyone who might still need a solution to that situation.
Richard
May 12th, 2005 at 10:37 pm
Currently we are planning to user Jasper and we use J2EE (EJB, Servlet and JSP) and for passing the result to jsp we are using Arraylist of Hashmap
Do you have any sample code that will get the value in Arraylist of Hashmap and pass the same to Jasper report?
Can you paste one example in your web site?
I am also attaching a sample ArrayList/Hashmap object
[{Dec 04=559230, Jan 05=530845, Name=4Spine, LLC, Total=1888085.0, Feb 05=396010, Nov 04=402000},
{Jan 05=23000, Name=Act 2 Medical, Total=44800.0, Feb 05=21800},
{Dec 04=56615.2, Jan 05=83141.6, Name=David Tyre, Inc., Total=215895.2, Feb 05=51889.6, Nov 04=24248.8},
{Dec 04=103258, Jan 05=78625.25, Name=Gilman Surgical, Total=359186.75, Feb 05=68564.2, Nov 04=108739.3},
{Dec 04=159679, Jan 05=93790, Name=Gulf Coast Orthopedics Inc., Total=568842.3, Feb 05=107253.3, Nov 04=208120},
{Dec 04=201400.6, Jan 05=162199.2, Name=ISpine, Total=606636.2000000001, Feb 05=104127.8, Nov 04=138908.6},
{Dec 04=37655, Jan 05=83998, Name=Intramedix Medical Inc., Total=275657.0, Feb 05=92740, Nov 04=61264}]
Richard
May 17th, 2005 at 1:24 am
Hi Brain
Any update on my pervious Question
Brian N. Burridge
May 17th, 2005 at 1:46 am
I haven’t tried that before, so I really don’t know. In the class I’m currently writing, I convert a HashMap to an ArrayList (the values of the HashMap), and send that to Jasper, but I’m not sure if you could access an ArrayList of HashMaps.
vim
May 17th, 2005 at 9:00 pm
Hello brian,
Can we apply html style-sheet to the jasper reports ?
thnx in advance.
Brian N. Burridge
May 18th, 2005 at 2:22 am
I’m sure using CSS is possible, however, generally the point of the Jasper XML file is to describe to Jasper how you want to the report to look. It then creates the HTML or the PDF, or whatever your export type is, and ensures that export type looks like you’ve described in the Jasper XML. All the GUI’s like JasperAssistant and iReport, allow the user to describe the look. CSS is used by Jasper in the HTML it creates, but changing that would be counter to how Jasper is designed.
Richard
May 23rd, 2005 at 10:06 pm
How to send the Arraylist to the jasper report can you paste an sample pl
Craig
May 31st, 2005 at 7:00 pm
Hi Brian,
I’m writing a Swing based desktop application that needs to produce a 10 page PDF document. The document is composed of various sections containing paragraphs of text from various different datasources.
I’ve tried to produce the document using Jasper and iReport, however I’m reaching the conclusion that the format of my document is too complex for Jasper/iReport.
I’ve constructed various custom datasource classes that implement the JRDataSource interface to return the contents of the various sections within the document. In iReport, I’ve created a collection of subreports for each of the different sections. Each subreport is associated with a custom datasource.
The problem I’m experiencing is that the layout of the resultant PDF does not reflect what I’ve designed in iReport. The subreports appear overlapped instead of appearing in the sequence I’ve designed in iReport. I’ll need to produce about 8 of these subreports for the entire document.
Do you think its possible to produce this type of multiple page documet with various subsections using Jasper/iReport or is this too complex? Would JasperAssistant be more suitable?
I’m thinking maybe I should be using a framework like iText?
Thanks in advance.
Brian N. Burridge
May 31st, 2005 at 9:28 pm
I don’t have any experience with iReport, and haven’t done much with subreports. You are correct to use subreports in your situation, but I’m surprised that it isn’t coming out the same as you design. So far, with the 35+ reports we’ve done with Jasper using JasperAssistant, they have all come out looking exactly as we have designed them. The PDF version is exact, while the HTML is a little off, but I don’t think that’s to be expected.
Before using Jasper, I created a report with iText, and it did work, but it was more time consuming than creating a report with JasperAssistant.
I believe iText is used by Jasper, but if you use just iText alone, you may run into some problems when you want to do parts of a form that grow. I don’t believe iText is very good for that. When I came across the requirement to have dyanamic reports as opposed to a form that could be filled out, I had to move from iText to Jasper.
Anton Hinxman
June 7th, 2005 at 2:25 pm
Yes, Open Reports is fantastic because it is a good simple reporting framework. I come from a Visual FoxPro background and have a some conversion program to translate a FoxPro report directly into the band based XML definition. It works like a dream because both reporting methods use bands and it is only a matter of converting the band scaling between the two types of reports. The SQL to drive the report is simply inserted into the XML.
The problem I have found is in the use of American date format in Open Reports but I am sure that this can be solved.
Regards
Anton
NT
June 14th, 2005 at 12:48 pm
Being one of the usual requirements, dynamic column report is quite difficult and report specific with JR. I’m planning to write Generic Report Design Modifier based on query and parameters. All i want to know is
-> have u attempted this
-> other possible way u can think, i know this things can hardly get any generalization.
Thanks,
Brian N. Burridge
June 14th, 2005 at 7:05 pm
A few of the reports I had to create, required a form of cross tab reporting. So I created a framework within Open Reports to accomplish this. It is report specific, but is very simple to implement per report. It works on the premise that Jasper can populate the report from a Collection of objects. So instead of populating from a JDBC results set, a CrosstabAction is used to convert the JDBC result set into a generic Collection which the Jasper report uses to fill itself. The Action reverses the data from column to row, or performs any other type of “rearrangement” of the data that you may need to do that can’t be done via SQL. We have used it now for two reports and once I figured out the idea and the framework in the first report, the second report only took a few minutes to implement.
Rasesgsg
June 23rd, 2005 at 4:07 pm
hello,
I want to generate a dynamic columns report in jasper report ,(ireport), i want the column shold be decresed in number or increased in number as user wants,
if user want 2 coloum he will get 2 coloums if he select 3 coloumns then three and so on…so pls help me i have urgency to produce the report thanking you alll…
u can contact me rashesh_patel007@yahoo.com
Waiting for reply…eagerly
Sandeep Pathak
July 5th, 2005 at 7:09 pm
Hi,
I am using Jasper Reports for my current project. Things are working fine except for one thing.
When i generate a Jasper Report, it opens up on the server not on the client.
Please tell me what I need to do to open up a Jasper Report on the client.
Right now it is opening up in the server, I need to open it on the client.
My code is as follows:
JasperDesign gratuityReportDesign = JasperManager.loadXmlDesign (“../server/default/deploy/reports/GratuityConsoleReport.jrxml”);
JasperReport gratuityJasperReport = JasperManager.compileReport (gratuityReportDesign);
Map parameters = new HashMap ();
parameters.put (“Title”, “Gratuity Report”);
parameters.put (“FromDate”, ( (GratuityConsoleInputDataVO) data )
.getFromDate ());
parameters.put (“ToDate”, ( (GratuityConsoleInputDataVO) data )
.getToDate ());
parameters.put (“LOGO”,
“../server/default/deploy/reports/logo.jpg”);
conn = DataAccessUtil.getConnection ();
JasperPrint jasperPrint = JasperManager
.fillReport (gratuityJasperReport, parameters, conn);
JasperViewer jasperViewer = new JasperViewer (jasperPrint, false);
jasperViewer.show ();
This code opens the report on the server. Please tell me how to open it on the client.
Thanks alot
Sandeep
Brian N. Burridge
July 7th, 2005 at 7:12 am
I’m not sure if you are running this in a Servlet/JSP or in a Java class, but the reason its opening on the server is because your use of JasperView.show(). Instead, if you wanted to create a PDF and stream it to the user, you would use some code like this:
ReportWriteProvider reportWriteProvider;
byte[] pdfByteArray = JasperExportManager.exportReportToPdf(jasperPrint);
response.setContentType(“application/pdf”);
response.setHeader(“Content-disposition”, “inline; filename=” + report.getName() + “.pdf”); response.setContentLength(pdfByteArray.length);
ServletOutputStream out = response.getOutputStream();
reportWriteProvider.sendPDFToStream(pdfByteArray, out);
robert
July 7th, 2005 at 6:35 pm
Hi,
there is a user requierement to be able to generate ad-hoc reports. Something like user may decide which columns to render, or even decide the font size, padding, and so.
Do you know any solution, which will satisfy this requirement?
(we’re using jasperreports)
Brian N. Burridge
July 9th, 2005 at 3:09 am
I am not currently familiar with any software that would fulfill those requirements. Open Reports would come the closest, but probably would not allow users to customize their own reports.
http://oreports.com/
Wilko van der Veen
August 5th, 2005 at 5:48 pm
JasperReports is not intutive enough, you need to have allot of knowlegde of JAVA to run for example your own applet implementation, this is the fact with most opensource tools (not php, apache, they are really good documented, but this)
Del Thompson
August 6th, 2005 at 3:50 am
I can find no specific documentation on instaling JaspeReports. There seems to be a lot of piecemeal stuff but no detailed guide as to how one installs and configures this product. Can anyone point me in the right direction?
Thanks
Gerry
August 10th, 2005 at 4:53 am
I’ve been evaluating JasperReports and found it almost answers all our requirements. For us to commit to it we need to know the following:
- How easy it would be to add a feature that would allow to save instances of report templates, preferrably in a database table? In this case, an instance would be a group of parameters values.
We need a mechanism for users to 1) define this group of parameters 2) save the instance parameter values in the database 3) pull up this instance (predefined values of parameters) from the database. This feature would allow users to avoid specifying parameter values every time through the UI.
The workaround is to save every instance as a separate report file. But this solution isn’t scalable when targeting an ASP market.
yasin
August 11th, 2005 at 2:04 pm
can we add or remove the columns dynamically in jasperreports
yasin
August 11th, 2005 at 2:07 pm
performance issue in jasperreports , jaspereports is fine for reports contain minimum number of records , when go for large number of records application performance will down , any one can help me , please very urgent
Brian N. Burridge
August 18th, 2005 at 5:33 pm
I suppose performance depends on your point of view. We have a report that returns a PDF that is over 500 pages, which is approximately over 30,000 rows. It takes about 2 or 3 minutes to run. To me, that is very acceptable performance for a report of that size.
Brian N. Burridge
August 18th, 2005 at 5:36 pm
As for adding or removing columns, there are two options. First, you can use conditionals as the column expression to dynamicaly choose which field to populate a column with. I used this in one report that can have three different looks. It checks a passed parameter to determine which report it is, and from that alters the header for each column, and the value for each column.
The second method would be to alter the jasper report xml based on your critera, then compile it and run it. I do a lot of xml creation, so that part of it I don’t have a problem with. However, I have not compiled a Jasper report on the fly and I would worry that doing so would be a performance hit.
Other than that, I do not believe that Jasper has any features for dynamically designing reports on the fly.
Brian N. Burridge
August 18th, 2005 at 5:39 pm
Gerry – it sounds to me like you are describing Open Reports, which is a web framework on top of Jasper. That is what I use (although very customized from what I downloaded). Have you tried that?
Brian N. Burridge
August 18th, 2005 at 5:44 pm
Del Thompson – the best way to get started with Jasper Reports is to download the demo project, put it in Eclipse, and play around with running the reports. That is how I got started.
To get the samples, go here: http://sourceforge.net/projects/jasperreports
Click on jasperreports, and then choose to download the jasper project zip file.
Joyesh Mishra
August 19th, 2005 at 4:43 pm
I have a reporting tool which uses the Jasper Reports. I feel there is a functionality using RDL’s where we can have alternate background colors in JasperSoft Reports. Now I am not able to export them to PDF. Do you have any idea of tags required to enable it?
For ex I use rowStyle as RDL Arguments to enable
You can mail me to my email-id. Thanks in Advance
chandan
August 31st, 2005 at 9:34 am
hi,
I am planning to use Jasper Reports insted of Crystal Reports in my new project can u plz tell me Jasper Reports suported to .net technology
VJ
September 11th, 2005 at 2:43 pm
Hi,
I need to export reports to PDF and CSV/EXCEL formats. I am able to successfully export reports to all three format(with same jasper print object) the only problem is the export includes page elements that are not really relevant to the format.
For example, if you I create a report with a footer that contians page numbers and fill/export the report to PDF I generate a nice paginated report with page numbers at the bottom. If I fill/export to EXCEL I get EXCEL that is paginated with page numbers at what would be the bottom of the page only all of this is on one page. If I fill/export to CSV I get comma delimited rows that are again paginated and page numbers at what would be the bottom of the page. This makes no sense from a semantic point of view. The purpose of exporting to CSV would be to provide the detail of the report in tabular format for conversion into another format, like Excel. You don’t care about page numbers nor do you want them.
So, I was wondering if anyone else has had this same problem and created a workaround. If so, what was the workaround?
Brian N. Burridge
September 12th, 2005 at 7:23 am
VJ,
When I first did an export to CSV/Excel I was just as surprised as you were about the result. And to my knowledge, there is nothing you can do about, other, than to add in a suppression expression for every element you wouldn’t want in the CSV/Excel (which I think is way too much work). But, keep one thing in mind before you label this a bug. JasperReports is not a database tool. It is a reporting tool. All the XML that describes a Jasper Report would be worthless if all you wanted was a data dump from an SQL statement.
That can be done so easily without JasperReports, that it really makes no sense to use a reporting engine for a simple dump like that. I’m not sure who uses the CSV/Excel versions, as they strike me as very useless, but once I remembered what the point of Jasper Reports is, it didn’t surprise me as much.
Brian
VJ
September 12th, 2005 at 12:21 pm
Brian,
“………..
than to add in a suppression expression for every element you wouldn’t want in the CSV/Excel” – But how we do this, if we use same jasper print for both export to excel and export to pdf? AS in pdf i need pagenumber whereas in excel i don’t
Brian N. Burridge
September 12th, 2005 at 6:38 pm
You pass in a parameter to the Jasper Report that tells it how its being exported (PDF, XSL, etc). Then in the Print When Expression for each element, you check that parameter to decide if you want it printed.
VJ
September 13th, 2005 at 5:00 pm
So do you mean to say that we need to have have two different JasperPrint objects – one for excel and one for pdf?
VJ
September 14th, 2005 at 9:54 pm
Brian,
To build jasper for reports that have dynamic columns, i am building the jasper using java code.But if the value is null its throwing,
net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : null
Source text : $F{col8}
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:407)
but the same design works with non null values data.
This is the code thru which i build detail part.
public static JRDesignTextField buildTextField(Class clazz, int xcorod,
int ycoord, int width, int height, JRFont fontType, String fieldName) {
JRDesignTextField textField = new JRDesignTextField();
textField.setBlankWhenNull(true);
textField.setStretchWithOverflow(true);
textField.setX(xcorod);
textField.setY(ycoord);
textField.setWidth(width);
textField.setHeight(height);
textField.setTextAlignment(JRTextElement.TEXT_ALIGN_RIGHT);
textField.setFont(fontType);
JRDesignExpression expression = new JRDesignExpression();
expression.setText(“$F{” + fieldName + “}”);
expression.setValueClass(clazz);
textField.setExpression(expression);
return textField;
}
Kindly let me know where the problem is..
Thanks
VJ
RT
September 20th, 2005 at 10:23 am
My requirement is to generate a HTML output using JasperReports, with pagination.ie say 50 records per page and then on clicking the next button should display the next page.I do not want all the records on just one page.
Thanks in advance
RT
Arun
October 1st, 2005 at 4:20 pm
hi,
We are using Jasper Assistant for generation of reports, it is a good tool as an eclipse plugin to generate reports, but we are having problem with it that is The reports which we print does not have a line in the header which we require,how to print lines in our report.
Please help us.
Bye
Jerry
October 4th, 2005 at 9:42 pm
RT
If you want to paginate in HTML, there is a parameter in Jasper using the JRHtmlExporter class, that basically sets the number of the page to visualize inside the browser, your code only have to set this number properly when the action is called with the ‘next’ button, like in the following code snippet:
JRHtmlExporter exporter = new JRHtmlExporter();
...
exporter.setParameter(JRExporterParameter.PAGE_INDEX, new Integer(pageIndex));
...
exporter.exportReport();
Hope it helps.
Cheers.
Viva México
Sam
October 11th, 2005 at 9:30 pm
Is the Jasper Assitant free ?
Which took can i use to create reports.
Jasper Assitant or Open report designer
Brian N. Burridge
October 12th, 2005 at 6:51 am
I personally prefer Jasper Assistant. It is not free, but to me it was well worth the cost.
The company that produces Open Report designer is certainly good as well. I don’t use their designer, but I rely heavily on their Open Reports system, which is a web gui for Jasper Reports.
Brian
VJ
October 24th, 2005 at 6:40 pm
Hi Brian,
Should I try to declare more of my methods to be static?How would i know i am overusing static methods? What are ideal scenarios where i can use static methods? Say in my module, i have a separate database entity file wherein i put all the methods which access database.Is it ok to declare all the methods static?
Say i have ReportDb.Java and i have
public static ResultSet getDataResultset(String storeprocName){
//Code to access DB and return resultset
}
kindly let me know..
Sunil
October 25th, 2005 at 11:39 am
Hi
I am designing report with iReport and than using Jasper Code I am running that jrxml file to generate report files and save them in a Location, The export options in jasper code are limited to pdf, xml, html, csv only. But, I want to export the report into Microsoft’s Excel Format, So could anybody please guide me how i can manage that using jasper code.
I shall be thank Full to You.
Thanx in advance.
Brian N. Burridge
October 25th, 2005 at 6:46 pm
Sunil,
There is a JRXlsExporter() in Jasper.
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds);
JRXlsExporter exporter = new JRXlsExporter();
ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, xlsReport);
exporter.exportReport();
System.out.println(“Sixe of byte array:”+xlsReport.size());
bytes = xlsReport.toByteArray();
response.setContentType(“application/vnd.ms-excel”);
response.setContentLength(bytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
Brian
Brian N. Burridge
October 25th, 2005 at 6:59 pm
VJ,
The compiler will certainly let you know if you have wrongly marked a method static. You don’t have to worry that if it compiled and ran as static, that you shouldn’t have marked it static.
Best to read some existing information on the net about when to use static. For example:
http://www.artima.com/designtechniques/staticP.html
Brian
Sunil
October 26th, 2005 at 10:44 am
Dear Brian,
I am really very thankfull for your co-opration,
But the problem still remain, because i could’nt found JRXlsExporter() in my jasper code, So could you please guide what should i do to solve this problem.
Thanx a lot.
Sunil
Mat
October 28th, 2005 at 1:55 pm
Hi all,
i would like to generate my JasperReport to html file on the server for my clients.
I use on my jsp:
JasperExportManager.exportReportToHtmlFile
but my problem is, i generate the report_html_files on the server, but i would like it on a outputstream.
Have anyone a solution for me?
Thanks,
Mat
John
October 28th, 2005 at 11:03 pm
Does anyone have experience with using an html document as a source field? I have database text items that store html documents that need to be included into a report. The report currently prints out the tags.
I changed the field to styledtext=”true” which stops the tags from printing but does not produce the proper result. For example, if the html has a tag I would expect a new line. Currently, nothing happens. Any idea how to make the work.
Thanks for your help.
John
Sam
November 1st, 2005 at 5:12 am
Hello,
Thanks much for responding. I have started using IReport Designer. But i have a problem. Iam almsot done with the designs. But the labels on the chart x-axis are getting shortened to 2 letters or either replaced with dots “…” like this. Someone told me that i need to implement JRChartCustomizer. But ours is not swing based application. Can you please show me the proper way. Iam almost done with my designs and stuck up there.
Thanks
Sam
Franklin
November 1st, 2005 at 7:50 am
hi all
i have the same problem with a html field source, i try to with the styledtext=â€true†clausule and it print a blank line for each html tag. I try with the last version of JasperReport and nothing.
Thanks a lot for your help.
Franklin
babu
November 3rd, 2005 at 8:07 pm
I need jasper report step by step guide, pls help me
Cherry
November 5th, 2005 at 4:25 am
I’m working with Jasperreport-1.1.0 and i’m using JasperAssistant. Whenever i try to create a custom data source i get the following error:
Data Source failed
Reason:
Failed to load the specified provider class:
datasource.ExampleDataSourceProvider
The location of the file in my project folder is webapp/WEB-INF/classes/datasource/ExampleDataSourceProvider
This is my code:
public class ExampleDataSourceProvider extends JRAbstractBeanDataSourceProvider{
public ExampleDataSourceProvider() {
super(CustomBean.class);
}
public JRDataSource create(JasperReport report)
throws JRException {
ArrayList list =new ArrayList();
list.add( new CustomBean(“Berne”, new Integer(9), “James Schneider”, “277 Seventh Av.”));
list.add( new CustomBean(“Berne”, new Integer(22), “Bill Ott”, “250 – 20th Ave.”));
list.add( new CustomBean(“Boston”, new Integer(23), “Julia Heiniger”, “358 College Av.”));
list.add( new CustomBean(“Boston”, new Integer(32), “Michael Ott”, “339 College Av.”));
list.add( new CustomBean(“Chicago”, new Integer(39), “Mary Karsen”, “202 College Av.”));
list.add( new CustomBean(“Chicago”, new Integer(35), “George Karsen”, “412 College Av.”));
return new JRBeanCollectionDataSource(list);
}
public void dispose(JRDataSource dataSource)
throws JRException {
// nothing to dispose
}
}
I’d really appreciate your help. Thanks in advance.
Cherry
Sunil
November 7th, 2005 at 3:44 pm
Hi All
Subject: Designing in ireport
I have a report having many four groups, and i want to print values in groupheaders, It is working well, But It is printing one line per group header. But i want to merge following band in that printed band (as “underlay following section” option in Crystal Report). Please Guide me, It is blocker Issue to me. I ma using SQL procedure in backend for data source
Thanx a lot.
Alan
November 11th, 2005 at 11:45 pm
Subject: localized resources
Hi all,
Is it possible to use a field value as input to a localized resource value.
I have a code coming from the database $F{CODE}.
I want to retrieve the resource bundle value for this code using something like $R{CODE} or $R{$F{CODE}, but neither seems to work.
Has anyone managed to do something similar ?
Thanks,
Alan
budi santoso
November 16th, 2005 at 11:46 am
Hi All
I am new use Jasper Report and iReport ( designer ).
How to call jasper report file use apache web ? please give example script ( to call report jasper from client )
Thx
Budi Santoso
Subhashini
November 17th, 2005 at 7:13 pm
Hi team
I am using jsp to generate pdf. i generate the pdf file on the server, but i would like it on a outputstream.
But in JSP i am unable to open the output stream.
also i need to open the pdf in a new window with out distrubing the application.
jasperPrint = JasperFillManager.fillReport(report, parameters,conn);
byte[] pdfasbytes = JasperExportManager.exportReportToPdf(jasperPrint);
JRPdfExporter exporter = new JRPdfExporter();
ByteArrayOutputStream pdfReport = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, pdfReport);
exporter.exportReport();
pdfasbytes = pdfReport.toByteArray();
response.setContentLength(pdfasbytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(pdfasbytes, 0, pdfasbytes.length);
ouputStream.flush();
ouputStream.close();
Varun Chudiwale
November 19th, 2005 at 1:35 am
I am trying to deploy JasperReport in JBOSS.
The same WAR file work in JDEV 10G application server, but when I try to deploy it in JBOSS its throwing me “org.apache.jasper.JasperException: tried to access field org.apache.commons.digester.Digester.log from class org.apache.commons.digester.SetNestedPropertiesRule$AnyChildRule
” error.
I guess its some to do with classpath setting, but not sure.
Let me know if anybody else had the same problem and find solutions.
Thanks,
-Varun Chudiwale
Nemesis
November 22nd, 2005 at 12:54 pm
Subhashini, you need to set the “Content-Disposition” header in your response object. In doing this you then have the ability to tell the browser that the response content is an attachment (causing it to open in another window).
Like so:
response.setHeader(“Content-Disposition “, “attachment; filename=”+theFileName);
using the filename, your client should be able to open/save the report using a more friendlier filename rather than the page name (which would be the default).
Does anybody know how to tell when a generated report contains no data before sending it to the client?
Nitin Jain
November 22nd, 2005 at 7:25 pm
Comment no. 74 is ok to genrate the report in sepeate window without disturb current application, but this code does not work soetime so anybody has idea about that.
Andy Susanto
November 23rd, 2005 at 3:21 pm
Hai Brian,
how to create on the fly query in JR ?
example :
1: SELECT * FROM user a
2: inner join tables_priv b on b.host = a.host
3: Where user = ‘anyone’
i would like to change line 2 in this query to become
inner join host b on b.host = a.host
why i use like that because i like to use one JR file and i can get two result report, of course i must use an alias for field name.
TIA,
andy
Andy Susanto
November 23rd, 2005 at 3:37 pm
i think i solve my problem with my trial and Error Method
Thanks,
Andy
Andy Susanto
November 23rd, 2005 at 3:40 pm
I how to create a matrik Report like this
Jan Feb April
=========================
David 1 2 3
Guest 2 5 1
TIA,
Andy
Shanmuga Perumal.N
November 28th, 2005 at 8:27 pm
Use CustomDataSource for getting Matrix Reports
sandeep
November 30th, 2005 at 8:28 pm
Hi,
I have seen few questions above asking about how to send a collection object (Hashmap, ArrayList) to fill a report; but there is no reply on this.
I can do this by passing data source, Result set but my requirement is to send data in any collection object to fill in report as my results are out come of many queries.
Please share your thoughts.
Thanks,
Sandeep
Irfan
December 2nd, 2005 at 10:52 am
I need to open exported PDF file to open. I am using the code pasted in this blog, but not sure which “ReportWriteProvider” to use and how, from where to get this class.
Code is :
ReportWriteProvider reportWriteProvider;
byte[] pdfByteArray = JasperExportManager.exportReportToPdf(jasperPrint);
response.setContentType(â€application/pdfâ€);
response.setHeader(â€Content-dispositionâ€, “inline; filename=†+ report.getName() + “.pdfâ€); response.setContentLength(pdfByteArray.length);
ServletOutputStream out = response.getOutputStream();
reportWriteProvider.sendPDFToStream(pdfByteArray, out);
I’d really appreciate your help. Thanks in advance.
Brahmananda Reddy
December 2nd, 2005 at 1:02 pm
Hai Brian,
you have given this code for create pdf file at client side..
ReportWriteProvider reportWriteProvider;
byte[] pdfByteArray = JasperExportManager.exportReportToPdf(jasperPrint);
response.setContentType(â€application/pdfâ€);
response.setHeader(â€Content-dispositionâ€, “inline; filename=†+ report.getName() + “.pdfâ€); response.setContentLength(pdfByteArray.length);
ServletOutputStream out = response.getOutputStream();
reportWriteProvider.sendPDFToStream(pdfByteArray, out);
in the above code what type of obeject “report”(report.getName())..
don’t mind could you explain it…
thanks in advance..
regards,
Brahma
Vijay
December 7th, 2005 at 2:36 pm
Hi
I am java newbie and would like to know if it is possible to let an action call the necessary code to generate a report using Jasper Reports.Would Jasper Assistant help?Could you explain the process to me?
thanks and regards,
Vijay
Devavratt
December 9th, 2005 at 7:08 am
Hello,
I have been using jasperreports for some time now.
I am facing some problems while designing my report.
1. My report has varied no.of columns i.e. it could contain 2,3 or 4 columns. I cant figure out as how to adjust the no.of columns dynamically within the same page width.
Say, if my page width is x, then x should be sum of either c1+c2 or c1+c2+c3 or c1+c2+c3+c4.
2. Second problem is a similar one, only difference would be that the no.of columns is fixed i.e but their width is supposed to the varied.
3. Finally, 2 sets of data to be displayed in MainHeaderGroupFooter, with varying no.of rows.
Now if I give a fixed height, both these overlap.
Your help is much appreciated.
Regards,
Dev
Brian N. Burridge
December 9th, 2005 at 8:53 pm
As you all can see, there have been a lot of comments and questions for help on Jasper, and I haven’t had time lately to help you out.
I have added a forum to allow further discussion, and hopefully input from other Jasper users. Feel free to post there or to continue to post comments here. I will answer questions as time allows.
The main forum is here. The thread for this comment is here.
Brian
EDGAR
January 31st, 2006 at 10:59 pm
mi problem is with the query
i’m using ireport but i do not know how write the sql syntax for LIKE, y tried all the ways and when excute the report show me nothing, totally blank
SELECT [_Empleados].EM_Nombre, [_Empleados].EM_RFC, BienesMuebles.BM_Descripcion, BienesMuebles.BM_NumeroInventario, BienesMuebles.BM_NumeroSerie1, BienesMuebles.BM_NumeroSerie2, BienesMuebles.BM_Observaciones, [_Departamentos].DP_Descripcion, BienesMuebles_Empleados.BMEM_FechaInicio FROM BienesMuebles INNER JOIN ((_Empleados INNER JOIN _Departamentos ON [_Empleados].DP_ID = [_Departamentos].DP_ID) INNER JOIN BienesMuebles_Empleados ON ([_Empleados].EM_ID = BienesMuebles_Empleados.EM_ID) AND ([_Departamentos].DP_ID = BienesMuebles_Empleados.DP_ID)) ON BienesMuebles.BM_ID = BienesMuebles_Empleados.BM_ID WHERE ((BienesMuebles_Empleados.BMEM_FechaFin) Is Null) AND BienesMuebles.BM_NumeroInventario Like $P{INVENTARIO};
some ideA?
Life @ 15 Frames / Second » Blog Archive » Jasper and Open Reports - Brian Burridge on Internet Development
February 1st, 2006 at 4:01 am
[...] Jasper and Open Reports – Brian Burridge on Internet Development Jasper and Open Reports – Brian Burridge on Internet Development [...]
Blake
February 1st, 2006 at 11:34 pm
Edgar,
To do a like statement using a parameter you have to do it like this:
like $P{INVENTARIO} + ‘%’
This should work.
Blake
February 1st, 2006 at 11:37 pm
I am trying to do a crosstab report in jasper and I can’t seem to get it working. If anyone has any good examples for me it would be greatly appreciated.
Thanks,
andy susanto
February 3rd, 2006 at 7:37 pm
hai,
in my client computer i can not show print dialog from JasperReport.
i am using a Tomcat 5.5.x, is there something wrong in Tomcat. Because if i running Tomcat from eclipse printdialog will showing
any suggestion ?
TIA,
Andy Susanto
Michal
February 6th, 2006 at 9:36 pm
Hi, i try use crosstab of jasperreport too. But without succes. It doesn’t work.
If anybody has some simple example of jasperreport crosstab using, please send me the reference.
Tahnks, regard Michal.
Carlos
February 9th, 2006 at 3:02 am
Hi, i am getting this exception when trying
to save the report to pdf using the “save as” button in JasperViewer.
(i have itext-1.3.jar)
Exception in thread “AWT-EventQueue-0″ java.lang.NoSuchMethodError:
com.lowagie.text.pdf.PdfContentByte.transform(Ljava/awt/geom/AffineTransform;)V
at
net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1469)
part of the code :
Statement stmt = database1.createStatement();
ResultSet rs = stmt.executeQuery (wsql);
JRDataSource jrRS = new JRResultSetDataSource( rs );
HashMap hs = new HashMap();
JasperPrint prt = JasperFillManager.fillReport(pathRelatorios +
relatorio + “.jasper”, hs, jrRS);
JasperViewer jrviewer = new JasperViewer(prt, false);
jrviewer.setVisible(true);
Thanks
Anirban
February 14th, 2006 at 12:26 am
We are trying to use OpenReports with Oracle9 to store the report meta data. When we try to create a new object (e.g. new user) we get the following error:
“SEVERE: could not read a hi value
java.sql.SQLException: ORA-00942: table or view does not exist”
Any idea/help will be much appreciated.
Thanks
Karl
February 16th, 2006 at 8:10 pm
Can you help me setup Openreports.
I am using Linux (RH). What do I need to do.
I downloaded Open Reports and Open Reports -Tomcat , but it seems like it is setup for the windows platform.
help!
Brian N. Burridge
February 17th, 2006 at 8:22 am
Karl,
I don’t recall having to do anything. When you unzip the download, there is a WebRoot folder. The contents of that is your web app. If you just copy the WebRoot directory to your $TOMCAT_HOME/webapps directory and rename it to openreports, you should then be able to go to your url/openreports/ and see the basic openreports come up. There are some settings to set the correct path to where you will put the reports, but at lesat you should see it running very quickly.
Brian N. Burridge
February 17th, 2006 at 8:25 am
Anirban,
Did you follow all the steps for setting up the database? The install guide lists out all these steps, and that error you are getting seems to imply that you don’t have the tables its looking for.
Brian N. Burridge
February 17th, 2006 at 8:26 am
Michal,
I haven’t yet used Jasper built in crosstab features. When I began using Jasper there was no crosstab, so I wrote my own. What I did was so simple that we have continued to use it. Its so quick to do what we need. One day I’ll sit down with Jasper’s solution and see which I like best.
Brian N. Burridge
February 17th, 2006 at 8:28 am
andy susanto,
I’m not really sure what print dialog you are looking for. Are you using a graphical interface like JasperAssistant, or are you running a report from within Tomcat? Any report you want to print from within Tomcat would use your browsers print functionality.
zs
February 24th, 2006 at 11:55 am
I want to use JRBeanCollectionDataSource with jasper,this is my code:
public class create_report {
public static void main(String[] args) throws JRException, IOException {
Session session = HibernateSessionFactory.currentSession();
List cats = session.createQuery(“from Book “).list();
Map parameters = new HashMap();
parameters.put(“Title”, “The Cat Report”);
Class aclass=create_report.class;
InputStream reportStream = aclass.getResourceAsStream(“/the-cat-report.xml”);
JasperDesign jasperDesign = JasperManager.loadXmlDesign(reportStream);
JasperReport jasperReport = JasperManager.compileReport(jasperDesign);
String[] fields = new String[] { “id”, “title”, “author”,”borrowallowed”};
HibernateQueryResultDataSource ds = new HibernateQueryResultDataSource(cats, fields);
JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, ds);
JasperManager.printReportToPdfFile(jasperPrint, “the-cat-report.pdf”);
HibernateSessionFactory.closeSession();
}
}
I use eclipse,the-cat-report.xml under “src”,
After run it,I get
Exception in thread “main” java.io.FileNotFoundException: D:\Program Files\eclipse\workspace\SecondTest\Unnamed.class (系统找ä¸åˆ°æŒ‡å®šçš„æ–‡ä»¶ã€‚)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at net.sf.jasperreports.engine.util.JRLoader.loadBytes(Unknown Source)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileReport(Unknown Source)
at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(Unknown Source)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(Unknown Source)
at net.sf.jasperreports.engine.JasperManager.compileReport(Unknown Source)
at com.yfsy.jasper.create_report.main(create_report.java:60)
NESTED BY :
net.sf.jasperreports.engine.JRException: Error loading byte data : D:\Program Files\eclipse\workspace\SecondTest\Unnamed.class
at net.sf.jasperreports.engine.util.JRLoader.loadBytes(Unknown Source)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileReport(Unknown Source)
at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(Unknown Source)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(Unknown Source)
at net.sf.jasperreports.engine.JasperManager.compileReport(Unknown Source)
at com.yfsy.jasper.create_report.main(create_report.java:60)
Caused by: java.io.FileNotFoundException: D:\Program Files\eclipse\workspace\SecondTest\Unnamed.class (system not find the file。)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
… 6 more
Thanks
Frederik
March 4th, 2006 at 3:00 am
hi there, first of all, im glad to see an active thread about jasperreports. their own sites seem abandoned (can you blame them…). my problem had come a few times across but no answer. i have a fully working program (servlets/ireport/jasperreports) but i cant get the export pdf and print dialog to go to the client side. always it comes up on the server.
what can i (we) do to send it to the client. can we keep a central topic here?
please help, it is driving me insane in the membrane…:-)
thanx in advance
Frederik
stephen myint
March 4th, 2006 at 2:42 pm
Dear All,
please tell me, to use JasperReport-
-which webserver i need to install
-how to configure jasperreport and downloaded files after i downloaded it.
thanks
Frederik
March 4th, 2006 at 4:54 pm
Hi there,
I found a solution to my problem: the client side doesnt get a printdialog but the server side does. i used this code to export it to a pdf in the client sides browser. now the client can save and print it. only thing is that the font is standard (all my bod texts are normal now), but it works. i hope someone finds this usefull.
if someone has an addition or improvement please tell.
JasperPrint print = JasperFillManager.fillReport(bestandsnaam, reportParam, c);
//JasperPrintManager.printReport(print,true);
//JasperViewer jv = new JasperViewer(print);
//jv.viewReport(print);
byte[] pdfasbytes = JasperExportManager.exportReportToPdf(print);
JRPdfExporter exporter = new JRPdfExporter();
ByteArrayOutputStream pdfReport = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, pdfReport);
exporter.exportReport();
pdfasbytes = pdfReport.toByteArray();
response.setContentLength(pdfasbytes.length);
//response.setHeader(“Content-Disposition”, “attachment; filename=”);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(pdfasbytes, 0, pdfasbytes.length);
ouputStream.flush();
ouputStream.close();
mohan kumar
March 24th, 2006 at 3:04 pm
none of the forums was about to answer to my question. can any one of u help me …
question: how to execute oracle procedure in ireports
i experimented it with following code.
@exe{procedure_name(parameter)} but it shows sql syntax error.
i need the solution as early as possible.
going through this forum i found this as good problem solver forum.
so please help me.
advanced thanks
with regards
mohan kumar
katarina
March 29th, 2006 at 4:36 pm
Hi all,
are anyone work with resource bundle in combination jasper report and ireport.
If anybody has some simple example of it, please send me the reference.
Thanks in advance.
Brian N. Burridge
March 29th, 2006 at 8:30 pm
Mohan Kumar,
I was never able to call an oracle stored procedure, but I was able to call an Oracle stored function. Once you’ve written the stored function, calling it is exactly like a regular select, which is why it works ok in Jasper. So for example, you would call it like this:
select column1, column2, column3 from table( RPT_ASBUILT_D_FUNC(param, param))
I have used that in at least 20 different reports.
Jose
April 4th, 2006 at 10:43 pm
Hi everyone
Im working with a javabean set datasource
my bean has a java.util.ArrayList with beans inside and i need to iterate the arrayList in a group to show the details, can you help me?
Thanks
Prasad
April 6th, 2006 at 11:41 pm
Hi Brian,
You said you could use the Oracle functions in Jasper reeports.
I am trying to do the same but in vain.
I have a function which returns 2 values, so I have followed u r example and trying the sql as:
SELECT dayeRemaining, totalDays FROM table (FN_CALCULATE_DAYS ())
but it throws an exception saying
java.sql.SQLException: ORA-22905: cannot access rows from a non-nested table item
Any suggestions please.
Zeba
April 8th, 2006 at 4:22 am
pls tell me how to call a stored procedure/function from jasper report
Zeba
April 8th, 2006 at 4:32 am
while calling the function from the jasper report, i’m also getting the same excepton as mohan is geeting, pls tell us the syntax of calling a function form jasper report
java.sql.SQLException: ORA-22905: cannot access rows from a non-nested table item
joann
April 20th, 2006 at 1:15 am
hey,
Im using jasperreports and facing 2 probs…firstly the inputstream doesnt seem to read the jrxml; file and the compile manager throws an exception…secondly the query needs to b satisfied wit a parameter which i have given as follows[CDATA[select distinct a.ArticleNumber,a.Name,a.Note,b.ProductSpecification,b.ProductionDate,b.ExpirationDate,b.LotNumber,c.ColorLevelName
,d.TrueValue,e.Name as UnitName,f.Name as ParaName,f.Calculated,g.ProductionOnlyParameter,h.Name as StatusType from QCColorLevel as c inner join QCType as a on
a.IDQCColorLevel=c.ID inner join Lot as b on a.ID=b.IDQCType inner join LotParameterUnit as d on b.ID=d.IDLot
inner join ParameterUnit as e on e.ID=d.IDParameterUnit inner join QCTypeParameterUnit as g on e.ID=g.IDParameterUnit
inner join Parameter as f on e.IDParameter=f.ID inner join StatusType as h on h.ID=b.IDStatusType where b.LotNumber like $P[LotNumber]….yet it throws an exception of an error in preapring the statement…any ideas ppl
mydiane
April 20th, 2006 at 7:32 am
i have not seen where this below problem is handled in jasperReport-iReport.
how can one send several different javabean collections as a datasource to iReport using jasperreports?
i think this is a required anser.
rose
April 21st, 2006 at 5:58 am
Hi,
subject: Custom Datasource – Subreports
situation: The master report uses a JRDataSource (say MasterDS) with fieldA and fieldB. While filling the master report, the MasterDS also fills a bean which must serve as a custom datasource for a subreport with fieldC. This subreport is called in the report Summary . problem: It’s strange but when running, Jasper needs getFieldA() and getFieldB() in the bean although these fields are not needed in the subreport.First I’ve tried to use a second JRDataSource instead of a bean but with the same result.
Questioin: Is there some way to use multiple total independant datasources within the same report-subreport. If so, please any hint would be welcome as this whole thing keeps me busy for 2 days.
Thanks and have a nice day,
Rose
kavitha
April 21st, 2006 at 7:52 am
Hi,
I want to change the report font at run time. But i have no idea. please guide me
rose
April 26th, 2006 at 2:20 am
concerns my post of 21th april:Custom Datasource – Subreports.
My problem is solved, i’ve made a very stupied error. Meanwhile: Jasper – iReport is great, thanks!
Rose
Bala
May 1st, 2006 at 2:53 pm
Hi,
I see dependencies on iText, POI, JExcel, JFreechart. Are these optional?
I have to generate a simple report that is sent to a printer. It has a title, page header, column header, detail and summary.
Can I just not include those jar files?
Thanks,
BP
http://www.ProblemSolvingSkill.net
manish
May 2nd, 2006 at 1:47 am
Hi
i am using iReport to create reports.
i am unable to fill the subreport with data. it compiles but when i execute, it gives the error
” [subreport subreport filler] WARN query.JRJdbcQueryExecuter – The supplied java.sql.Connection object is null.”
when i run the subreport independently with a default value of the parameter, it gives the error
“Error filling print…
java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘{EMPID}’ at line 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
…”
How do i solve this ?
ritika
May 3rd, 2006 at 6:01 am
can someone please tell me a simple example of how to use crosstab for generating matrix style reports …
ritika
May 3rd, 2006 at 6:10 am
when i use jasper for filling crosstab reports i get the fillowing error:
NESTED BY :
net.sf.jasperreports.engine.JRRuntimeException: Error incrementing crosstab dataset
at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:638)
at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:134)
at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:154)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:621)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:248)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:132)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:644)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at com.tcs.rdv.rdm.rdc.XYZ.reportgenerator(XYZ.java:108)
at com.tcs.rdv.rdm.rdc.XYZ.main(XYZ.java:143)
Caused by: net.sf.jasperreports.engine.JRException: Crosstab data has already been processed.
at net.sf.jasperreports.crosstabs.fill.calculation.BucketingService.addData(BucketingService.java:280)
at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:634)
… 11 more
indira
May 15th, 2006 at 6:50 am
Hi,
I am having a problem while exporting a jasper report in html viewer.Some fields are missing in the html page.Can anyone please provide me any solution?
Tu
May 18th, 2006 at 12:43 am
Hi,
I try export report to pdf file but i met this error
>>java.lang.IllegalAccessError: tried to access >>field org.apache.commons.digester.Digester.log >>from class >>org.apache.commons.digester.SetNestedProperties>>Rule$AnyChildRule
I haven’t found the way to fix it yet. Can anybody help me ?
Regards,
Tu
spring
May 23rd, 2006 at 5:01 am
what Brian N. Burridge said is right.yes,i managed to call oracle stored function at last.
my table:
–create table:
SQL> create table a (id number,name varchar2(50),doctime date);
Table created.
–insert test data:
SQL> insert into a values (1,’aaa’,to_date(‘2002-07-01′,’yyyy-mm-dd’));
1 row created.
SQL> insert into a values (2,’bbb’,to_date(‘2002-07-02′,’yyyy-mm-dd’));
1 row created.
SQL> insert into a values (3,’ccc’,to_date(‘2002-07-03′,’yyyy-mm-dd’));
1 row created.
SQL> insert into a values (4,’ddd’,to_date(‘2002-07-04′,’yyyy-mm-dd’));
1 row created.
SQL> insert into a values (5,’eee’,to_date(‘2002-07-05′,’yyyy-mm-dd’));
1 row created.
SQL> insert into a values (6,’fff’,to_date(‘2002-07-06′,’yyyy-mm-dd’));
1 row created.
SQL> commit;
Commit complete.
–create two types
SQL> create or replace type myobjectype as object (x int,y date,z varchar2(50));
2 /
Type created.
SQL> create or replace type mytabletype as table of myobjectype
2 /
Type created.
–create function
SQL> create or replace function testrerecordnotabname (tableid in number)
2 return mytabletype
3 as
4 l_data mytabletype :=mytabletype();
5 begin
6 for i in (select * from a where id>=tableid) loop
7 l_data.extend;
8 l_data(l_data.count) := myobjectype(i.id,i.doctime,i.name);
9 exit when i.id = 62;
10 end loop;
11 return l_data;
12 end;
13 /
Function created.
SQL> commit;
Commit complete.
———————————————-
then in ireport ,i could write query sql:
select * from table(testrerecordnotabname(1))
order by Name desc
in this case, the fields returned is X, Y and Z.
to be more readable ,i wrote this:
select x as id,z as Name,y as doctime from table(testrerecordnotabname(1))
order by Name desc
Change the definition of type ‘myobjectype’ also does .
I know it is a bit fussy.But i hope it can help.
Wheather you can call a function in pakage,i didn’t try yet.
chaitanyareddy_p
May 24th, 2006 at 2:18 am
Hi everyone
Im working with a javabean set datasource
my bean has a java.util.ArrayList with beans inside and i need to iterate the arrayList in a group to show the details, can you help me?
Thanks
Bhaskar
May 25th, 2006 at 11:45 pm
how to call a stored procederes using jrxml file
sesha
May 26th, 2006 at 3:48 am
Hi Frederik,
Even i am facing the same problem printing the report in the client side..
Can you please explain it little briefly about printing it in client side
With Regards
SeshaGiri.V
Brian Burridge
May 26th, 2006 at 11:18 pm
Bhaskar,
You cannot call a stored procedure from a jasper report, since stored procedures do not return standard result sets (at least in most databases, there may be some exceptions).
However, I know you can in Oracle call a stored function, which can be made to return a standard result set. I hope to be writing up some instructions on how to do this over the next week.
Brian Burridge
May 26th, 2006 at 11:20 pm
sesha,
Can you explain what you are trying to do? My experience with JasperReports is all web based, and in that situation, the server returns a PDF, HTML, or whatever file you request to the user’s browser. The printing is then handled by the browser. Are you working with a web application or a desktop application?
Brian Burridge
May 26th, 2006 at 11:27 pm
chaitanyareddy_p,
You must pass your ArrayList of object to jasper as a JRBeanCollectionDataSource:
JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(list);
jasperPrint = JasperFillManager.fillReport(jr, reportParameters, ds);
Then in the JasperReport you refer to the object’s properties or methods, in an OGNL type manner. For example, to access the name property of an employee object within list objects, use:
employee.name
OR to reference a property called name within the list objects:
name
Miglena
May 31st, 2006 at 8:01 pm
Regarding AUTHOR COMMENT for stored procedures
127. by Brian Burridge, @ May 26th, 2006
I am doing a research for using Jasper with stored procedures. Here are some ideas:
1. JavaBeans datasource could be used instead of queries. You can fill JavaBeans objects external to jasper calling stored procedures and pass this to jasper xml templates. Hibernate/Jasper integration is using it. For example:
http://www.jroller.com/page/wakaleo/?anchor=using_hibernate_queries_with_jasperreports
2. There is something written in the ‘JasperReports Ultimate Guide’ http://jasperreports.sourceforge.net/more.docs.html you can see table of contents 9.4.2
The problem is you have to pay to see the content. I didn’t buy it yet.
Hema(Chen)
June 1st, 2006 at 7:04 am
I want to print only 10 records per page while generating jasper report. but record size is 100. so i want to paginate that. How to do this? I want complete code. For both bean and datasource. Anybody can help me please?
Anonymous
June 2nd, 2006 at 7:01 am
Vector abcd[] = new Vector[3];
abcd[0] = new Vector();
abcd[1] = new Vector();
abcd[2] = new Vector();
abcd[0].add(“srikanth”);
abcd[0].add(“naga”);
abcd[0].add(“vani”);
abcd[1].add(“subadhra”);
abcd[1].add(“subadhra”);
abcd[1].add(“subadhra”);
abcd[2].add(“devui”);
abcd[2].add(“devui”);
abcd[2].add(“devui”);
Object os[] = abcd[1].toArray();
System.out.println(“this is os length”+os.length);
JRMapArrayDataSource vd = new JRMapArrayDataSource(os);
parameters.put (“Title”, “Gratuity Report”);
parameters.put(“Logo”,”C:/Documents and Settings/srikanth.ETG/Desktop/World_s_Tallest_Man.jpg”);
jasperReport = JasperCompileManager.compileReport(“C:/Documents and Settings/srikanth.ETG/Desktop/d.jrxml”);
//jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,ac);
jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,vd);
//JRPdfExporter exporter = new JRPdfExporter();
setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint);
setParameter(JRExporterParameter.OUTPUT_FILE_NAME,”C:/Documents and Settings/srikanth.ETG/Desktop/classic1.pdf”);
System.out.println(“{{{{}}}}}}}”);
//exportElements(tm);
System.out.println(“{{{{}888}}}}}}”);
exportReport();
JasperViewer jasperViewer = new JasperViewer (jasperPrint, true);
jasperViewer.show ();
}
catch(Exception e)
{
e.printStackTrace();
}
}
public void addVectorToReport(Vector Elements)
{
try
{
//
}
catch(Exception e2)
{
e2.printStackTrace();
}
}
public static void main(String args[]) throws Exception
{
example e = new example();
System.out.println(“AFTER”);
}
}
I am adding the elements in mapArrayDataSource & MapCollectionDataSource it is compied successfully & executed successfully but the objects are not adding in thr report
naga srikanth
June 2nd, 2006 at 7:02 am
Vector abcd[] = new Vector[3];
abcd[0] = new Vector();
abcd[1] = new Vector();
abcd[2] = new Vector();
abcd[0].add(“srikanth”);
abcd[0].add(“naga”);
abcd[0].add(“vani”);
abcd[1].add(“subadhra”);
abcd[1].add(“subadhra”);
abcd[1].add(“subadhra”);
abcd[2].add(“devui”);
abcd[2].add(“devui”);
abcd[2].add(“devui”);
Object os[] = abcd[1].toArray();
System.out.println(“this is os length”+os.length);
JRMapArrayDataSource vd = new JRMapArrayDataSource(os);
parameters.put (“Title”, “Gratuity Report”);
parameters.put(“Logo”,”C:/Documents and Settings/srikanth.ETG/Desktop/World_s_Tallest_Man.jpg”);
jasperReport = JasperCompileManager.compileReport(“C:/Documents and Settings/srikanth.ETG/Desktop/d.jrxml”);
//jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,ac);
jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,vd);
//JRPdfExporter exporter = new JRPdfExporter();
setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint);
setParameter(JRExporterParameter.OUTPUT_FILE_NAME,”C:/Documents and Settings/srikanth.ETG/Desktop/classic1.pdf”);
System.out.println(“{{{{}}}}}}}”);
//exportElements(tm);
System.out.println(“{{{{}888}}}}}}”);
exportReport();
JasperViewer jasperViewer = new JasperViewer (jasperPrint, true);
jasperViewer.show ();
}
catch(Exception e)
{
e.printStackTrace();
}
}
public void addVectorToReport(Vector Elements)
{
try
{
//
}
catch(Exception e2)
{
e2.printStackTrace();
}
}
public static void main(String args[]) throws Exception
{
example e = new example();
System.out.println(“AFTER”);
}
}
I am adding the elements in mapArrayDataSource & MapCollectionDataSource it is compied successfully & executed successfully but the objects are not adding in thr report
Brian Burridge
June 4th, 2006 at 12:39 am
I have posted a tutorial on a solution to calling Oracle Stored Procedures from within Jasper Reports:
http://www.brianburridge.com/2006/06/04/how-to-call-stored-procedures-from-jasper-reports/
rogers
June 12th, 2006 at 10:41 pm
Has any one tried LogiXML
Rob Stavis
June 14th, 2006 at 1:39 am
We report to an organization on a complex form that they provide — the form is available as a pdf. In moving the report to Jasper, can work the of duplicating all of the graphical elements be avoided by pasting the pdf into the background and layering the data fields on top as unframed transparent objects? If this could be done, the data (mainly checkmarks) would appear in the right place in the printed view.
Brian Burridge
June 15th, 2006 at 5:02 pm
Rob, in theory, yes. though I have never tried to do something like that. What I would worry about is getting the checkmarks perfectly aligned. They could be off by a bit on every machine, do to variances in font sizes from computer to computer.
I know its more work, but I have successfully rebuilt complete PDF forms in JasperReports and had great success. Its virtually impossible to perceive a difference between the original form and the JasperReport created one.
sunil
June 16th, 2006 at 5:00 am
how to sequence of number in each column in IReport(ie. Serial number of each column)
Brian Burridge
June 16th, 2006 at 9:09 am
Sunil,
If you create a text field within the detail band, with an expression of: $F{LINE_NUMBER} and make that field a class of BigDecimal, it will provide the line number of the detail row you are on.
Is that what you are looking for?
srikanth
June 17th, 2006 at 2:48 am
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:141)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
net.sf.jasperreports.engine.util.JRGraphEnvInitializer.initializeGraphEnv(JRGraphEnvInitializer.java:58)
net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:404)
net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:92)
net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:74)
net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:113)
net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:428)
com.etisbew.rezengine.report.JSPReports.processRequest(JSPReports.java:579)
com.etisbew.rezengine.report.ReportController.processRequest(ReportController.java:371)
com.etisbew.rezengine.servlet.REServlet.doPerform(REServlet.java:502)
com.etisbew.rezengine.servlet.REServlet.doPost(REServlet.java:237)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
sunil
June 24th, 2006 at 3:05 am
thaks for ur help Mr.Brian Burridge
yes i want the row number in detail band, to increment when the new column is read. iam not want
for group header.
sunil
June 27th, 2006 at 4:50 am
To Brian Burridge,
yes, i will try this. i want the each line number
in the detail band, when each line is created
by sunil
Faris
June 28th, 2006 at 8:19 pm
Hi,
I tried Brain method to call functions inside jasper reports and it works fine when the statement is in the following format
SELECT * FROM TABLE(Sys_54(10,’10/JUN/2000′,’10/JUL/2006′))
But I get an error when I need to pass a parameter instead of the predefined input,
SELECT * FROM TABLE(SYS_54($P!{SELECT_DEPARTMENT_ID}, $P{START_DATE}, $P{END_DATE}))
java.sql.SQLException: ORA-22905: cannot access rows from a non-nested table item
Please give me any idea.
NOTE this statements worked :
SELECT * FROM TABLE(SYS_54($P!{SELECT_DEPARTMENT_ID}, ‘10/JUN/2000′,’10/JUL/2006′))
Ram Ranjan Shukla
June 29th, 2006 at 1:45 am
i m getting ….java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte.transform(Ljava/awt/geom/AffineTransform
at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1512)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:523)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:487)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:452)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:260)
at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfStream(JasperExportManager.java:1
when i m going to show report in a PDf format as a servlet response .My code is as follows.
InputStream i=cl.getResourceAsStream(“itemReport.jrxml”);
jasperReport = JasperCompileManager.compileReport(i);
jasperPrint=JasperFillManager.fillReport(jasperReport, new HashMap(), new JRResultSetDataSource(resultSet));
JasperExportManager.exportReportToPdfStream(jasperPrint,out);
here out is OutputStream object passed by a servlet.
Please help me out.i have deployed all the required jars also.
eric
July 12th, 2006 at 8:07 pm
Hello Brian. Thank you for your ongoing support.
In our (jakarta-based) jsp, we’ve compiled and exported our ResultSet data to pdf via:
JRPdfExporter exporter = new JRPdfExporter();
ByteArrayOutputStream pdfReport = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, pdfReport);
exporter.exportReport();
Things seem to be okay to this point.
However, we’re trying to then display this exported pdf info in browser window via:
byte[] pdfasbytes = pdfReport.toByteArray();
response.setContentType(“application/pdf”);
response.setContentLength(pdfasbytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(pdfasbytes, 0, pdfasbytes.length);
ouputStream.flush();
ouputStream.close();
What we’re getting, though, looks like:
%PDF-1.4 %â£ÓŠ3 0 obj stream x???]O㸔?ﳫ,Í?????ÏžB???4″ьŪ.??i?äƒó«—¾m? q@’1?HZÒ§?I?dß¼Óœ????ï³™`¬ݸ??Ç¡?믦X?뽽˼?ò‚”¥g?%1ì•{/?Ë_⤰?Ù»?]Ù¯
eric
July 12th, 2006 at 8:10 pm
[last post got cut off...sorry]
, etc.
Any ideas or suggestions would be greatly appreciated.
-eric-
Brian Burridge
July 13th, 2006 at 10:30 pm
Eric,
Have you checked to be sure your jasperPrint has some pages?
jasperPrint.getPages().size()
I don’t use the JRPdfExporter. After I have filled the jasperPrint (which I’m assuming you already did before the code you pasted), I then:
byte[] pdfByteArray = JasperExportManager.exportReportToPdf(jasperPrint);
Then I set the content type and length like you are. I also set the header ( I think IE needed this?):
response.setHeader(“Content-disposition”, “inline; filename=report.pdf”);
Then:
ServletOutputStream out = response.getOutputStream();
out.write(pdfByteArray, 0, pdfByteArray.length);
out.flush();
out.close()
shohan_db
August 9th, 2006 at 3:51 am
When i create crosstab report…
The following types of error occurring:
Error filling print…
net.sf.jasperreports.engine.JRException: Crosstab data has already been processed.
at net.sf.jasperreports.crosstabs.fill.calculation.BucketingService.addData(BucketingService.java:280)
at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:634)
at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:134)
at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:154)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:621)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:248)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:132)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:644)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:674)
at java.lang.Thread.run(Unknown Source)
NESTED BY :
net.sf.jasperreports.engine.JRException: Crosstab data has already been processed.
at net.sf.jasperreports.crosstabs.fill.calculation.BucketingService.addData(BucketingService.java:280)
at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:634)
at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:134)
at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:154)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:621)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:248)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:132)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:644)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:674)
at java.lang.Thread.run(Unknown Source)
NESTED BY :
net.sf.jasperreports.engine.JRRuntimeException: Error incrementing crosstab dataset
at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:638)
at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:134)
at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:154)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:621)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:248)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:132)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:747)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:644)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:674)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.jasperreports.engine.JRException: Crosstab data has already been processed.
at net.sf.jasperreports.crosstabs.fill.calculation.BucketingService.addData(BucketingService.java:280)
at net.sf.jasperreports.engine.fill.JRFillCrosstab$JRFillCrosstabDataset.customIncrement(JRFillCrosstab.java:634)
… 12 more
Print not filled. Try to use an EmptyDataSource…!
After this i write “crosstab-1″ in summary band
Then 3 error occurring:
Errors compiling D:\inteacc\reports\crosstab1.jasper! it.businesslogic.ireport.ReportClassLoader@f3ff7d
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. crosstab cannot be resolved
value = (java.lang.Boolean)(crosstab-1);
2. crosstab cannot be resolved
value = (java.lang.Boolean)(crosstab-1);
3. crosstab cannot be resolved
value = (java.lang.Boolean)(crosstab-1);
3 errors
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)
at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:127)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:109)
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:473)
at java.lang.Thread.run(Unknown Source)
Please help with proper instruction
Thanks
mainur
sunil
August 9th, 2006 at 8:37 am
how to get line number for each item
in the detail band, just like the serial no.
I tried with $F{LINE_NUMBER} as brian mentioned, but, it gives me error saying “Field not found” for LINE_NUMBER..can anybody help me out…
sunil
August 9th, 2006 at 8:45 am
Hi,
is it possible to set the number of items to show in the detail band in one page.?
Any ideas or suggestions would be greatly appreciated.
jas
August 9th, 2006 at 8:46 am
Hi, I’m trying to use simple parameter in jrxml using JasperAssistant. I’m stuck here.
in jrxml: my query is like this: select DATE, NAME, ACTIVITY * from errorlog WHERE $P!{PARAM1}
And in PARAM1 properties:
Default Value Expression: $F{LAST_NAME}=’John’
Please help
Thanks
JR
Gus M
August 16th, 2006 at 1:36 pm
Does anyone know of any tutorial for using Jasper Reports with Struts??
shohan
August 23rd, 2006 at 5:41 am
Data Source problem:
I am using iReport1.2.1
My questions are—
01. What is the basic concept of data source?
02. How can I create a data source in iReport?
Pls help me by proper instructions.
Thanks
Mainur.
Maroof
August 24th, 2006 at 3:52 am
hi,
i am developing a web application in struts using ‘Myeclipse’ .Now i have developed a jasper report using ireport tool but i dont know how to integrate with a JSP page(or to export it to pdf format).
can anyone help me??
sunitha
August 24th, 2006 at 6:33 am
hi
i am a newbie
i have generated a report in iReport
i want to call that from a jsp page
i did a program but it throwing errors
—Errors were encountered when compiling report expressions class file.it could not locate the package
i am using netbeans 5.5 ide
ireport 1.2.5
can u tell be how to set the class path also
Ray Coleman
September 5th, 2006 at 10:03 am
I am trying to filter a string variable that looks like this {Value} in the text field box of a report.
For instance, I want to only return records that have the entry “Force” in the database record field.
Does anyone have any suggestions?
Smitha
September 13th, 2006 at 4:20 pm
Hello Mr.Burridge,
I need to create a main report containing multiple sub-reports. But the number of sub-reports is unknown at the design time.
How to achieve this using jasper-reports?
Please provide your suggestions.
Thanks,
Smitha
Nuruthin Ahammed
September 14th, 2006 at 4:06 am
Thanks for your reply for the solution’ How to use Oracle function’ in Jasper.
But How can I use Oracle function in report desiners like iReport, JasperAssistant. Or should we use this directly in Jasper file without using any Designers? When I am suing your syntax to call the function it is showing invalid identifier error.
Brian Burridge
September 14th, 2006 at 3:39 pm
The solution for calling a stored procedure would work the same from within the designer. The JasperReport would still call the db defined in your designer, and still execute the same code.
Brian Burridge
September 14th, 2006 at 3:44 pm
Smitha,
If it is unknown at design time, then it’s unknown at report compile time. So what you are asking is how to create dynamic JasperReports that you can compile at runtime. I believe there is a way to build JasperReports dynamically in Java, but I have never done it.
Brian Burridge
September 14th, 2006 at 3:50 pm
Ray,
Ideally, you would pass the ‘filter’ to your sql and only return the rows you need. The other option, is on your Detail band, there is a property called ‘printWhenExpression’. You can put an expression in there which when evaluated to true will print that detail row and when false will suppress it. For example:
new Boolean($V{PAGE_NUMBER}.intValue() >)
Nuruthin Ahammed
September 17th, 2006 at 4:24 am
Hi Brian Burridge,
I understood that you have incorporated some reports which calls the oracle stored procedure. But I am getting the following error while executing the report which calls an oracle stored procedure. I want to know where should I edit to evoid this exception?
Error creating report: net.sf.jasperreports.engine.JRException: No query executer factory class registered for plsql queries. Create a propery named net.sf.jasperreports.query.executer.factory.plsql.
Please help me!
Thanks
Nuruthin Ahammed
mahdi
September 17th, 2006 at 7:02 pm
Hi everybody,
I am developping a web application using: Java/Eclipse, MySQL, Tomcat 5.0 and iReport.
The web application is based on the MVC model, with JSP for presentation, and Servlets.
When I launch the Tomcat server in Eclipse, using the Eclipse/Tomcat plugin, everything works well. but once I launch the server from the monitor, the reports are created, but are empty (blank pages).
Can you please bring a response to this problem, thx
Here my java code in the Servelt:
public static String setPlanningReviewsForYear(String year) {
try {
// set properties
System.setProperty(“org.xml.sax.driver”, “org.apache.xerces.parsers.SAXParser”);
// parameters
Map parameters = new HashMap();
parameters.put(“SUBREPORT_DIR”, “C:\\Documents and Settings\\akkouh.mahdi\\workspace\\adminApp3\\report\\”);
parameters.put(“year”, year);
parameters.put(“dateBefore”, year + “-01-01″);
parameters.put(“dateAfter”, year + “-12-31″);
// jasper objects
JasperDesign jasperDesign;
JasperReport jasperReport;
JasperPrint jasperPrint;
// get connect
Connection conn = ProcessDB.getConnectODBC();
System.setProperty(“java.class.path”, “java.class.path”);
// load main report
jasperDesign = JRXmlLoader.load(“C:\\Documents and Settings\\akkouh.mahdi\\workspace\\adminApp3\\report\\Planning_Reviews.jrxml”);
jasperReport = JasperCompileManager.compileReport(jasperDesign);
// make pdf
jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
String reportName = “Planning_Revues_” + year + “.pdf”;
JasperExportManager.exportReportToPdfFile(jasperPrint, “C:\\Documents and Settings\\akkouh.mahdi\\workspace\\adminApp3\\report_pdf\\” + reportName);
//ProcessDB.getDisconnect();
return reportName;
} catch (JRException ex) {
System.out.println(“JRException: ” + ex.getMessage());
return “”;
}
}
sampath
September 21st, 2006 at 4:09 am
How can genereate dyanamic columns in jasper reports using iReports
Chandramouli
September 28th, 2006 at 7:28 am
Hi All,
when I am trying to print the report print dialog is getting displayed at the server side. I have the written the code in two ways as shown below. Can anyone please tell me what is the problem in the below ways.
1. JasperPrint jasperPrint = (JasperPrint)session.getAttribute(BaseHttpServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE);
PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
printRequestAttributeSet.add(MediaSizeName.ISO_A4);
//PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
//printServiceAttributeSet.add(new PrinterName(“Epson Stylus 800 ESC/P 2″, null));
//printServiceAttributeSet.add(new PrinterName(“HP LaserJet 4P”, null));
//JRPrintServiceExporter exporter = new JRPrintServiceExporter();
JRExporter exporter = new JRPrintServiceExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet);
//exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, printServiceAttributeSet);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.TRUE);
exporter.exportReport();
2. JasperPrint jasperPrint = (JasperPrint)session.getAttribute(BaseHttpServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE);
byte[] pdfasbytes = JasperExportManager.exportReportToPdf(jasperPrint);
JRPdfExporter exporter = new JRPdfExporter();
ByteArrayOutputStream pdfReport = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, pdfReport);
exporter.exportReport();
pdfasbytes = pdfReport.toByteArray();
response.setContentLength(pdfasbytes.length);
//response.setHeader(â€Content-Dispositionâ€, “attachment; filename=â€);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(pdfasbytes, 0, pdfasbytes.length);
ouputStream.flush();
ouputStream.close();
Please suggest me If I do any mistake in the above two steps.
Thanks,
Mouli
Syed
September 29th, 2006 at 2:06 am
Hi All,
In my report, i’m able to remove the column by using removeColumn() of ColumnTransform class.
My problem is, after removing the column the space remains blank.
I want to arrange the remaining columns dynamically. Is it possible, if so how?
rearrange() is not working properly, means it is not suppressing the space, Have got any idea?
Any idea will be highly appriciated,
Rehgards,
Syed
shohan
October 14th, 2006 at 2:26 am
I am using iReport 1.5.2
My table is as like
Date warehouse delivery No
7/7/2006 10 10-1
7/7/2006 20 20-1
7/7/2006 20 20-2
7/7/2006 30 30-1
8/7/2006 10 10-2
8/7/2006 10 10-3
11/7/2006 30 10 30-2
11/7/2006 20 20 20-3
I want Output will be as like
Date WH10 WH20 WH30 total delivery
7/7/2006 1 2 1 4
8/7/2006 2 0 0 2
11/7/2006 1 1 0 2
I can’t use crosstab in iReport
Pls send me the steps of crosstab……..by which I can create this report
what should I do????
Please help……
Thanks
Mainur rahman
ink
October 14th, 2006 at 4:54 pm
Hello,
Thanks for the article:
you end the article by saying, and I quote:
“In the end, with JasperReports and OpenReports, the only thing you have to worry about is creating the SQL to get the data. After that, it takes little work to provide a nice looking report in multiple formats on a web site”
So Are you meaning that the best way, easiest and fastest, is to use OpenReports !?
That you only need to download openreports and nothing else ?
If not so, do you mean that the ‘JasperAssistant’ is as easy to use as OpenReports ?
I have never been in contact with a reporting system before, but seeing the benefit when coming in contact with openreports instead of having to write everything else in j2ee.
regards, i
are these reports socalled crystal reports ( if I talk Oracle) ?
Brian Burridge
October 15th, 2006 at 9:37 pm
ink,
What I was referring to, was the combination of JasperReports, OpenReports and JasperAssistant. JasperReports is the most important element, but OpenReports allows you to present the user with a full Web GUI to the reports, without writing code. JasperAssistant allows you to edit the reports with a GUI. So the combination leaves you to simply write SQL, and learn how to use JasperReports and you can create reports in no time.
JasperReports are designed like Crystal Reports, as far as how the reports are designed.
Murty V
October 20th, 2006 at 10:09 pm
Hi,
I am having trouble in executing stored procedure which accepts multiple values to a parameter. I could run if it is single value from iReport1.2.7 and Openreport 2.0, But when I make that MulitValue, I could not execute the stored procedure, I tried appending ‘$P!{Team}’ etc… What I am missing..
murty
October 21st, 2006 at 3:16 am
Hi,
The article helped me to get the code from SorceForge to execute the stored procedure call. thanks for the article.
How to call MulitValue parameter like
{call GroupsPackage.project_sel2(‘$P!{Team}’, ‘$P!{TeamMember}’, $P{cursor})}
Where Team and TeamMemeber or Multiple Values, I tried without quotes then it is trhowing ‘number of arguments doesnot match’
so I added ” around the argument. Then It is not working, No error – no values, mostly it is takin g the value of ‘xxxxxx’ in the query.. Can you please suggest me how I can achieve..
Thanks in advance,
Murty
Diane
October 23rd, 2006 at 5:47 pm
Newbie questions. I use iReport to create the jrxml files.
1. Where do I put the jrxml files after I create them? Or do I use the jasper files that iReport makes?
2. When I run the ant script to build the war file, what do I do to make sure my jrxml or jasper files are part of the openreports application?
3. Is it possible to force openreports not to use spacer gif images to lay out the html version of the reports that use the jasper files? I hate spacer gifs.
Jagadeesan
October 25th, 2006 at 12:51 am
I need to set the same font name namely “verdana”
while export to HTML or PDF
rahul sood
November 2nd, 2006 at 10:07 am
Hi Brian
I am a software engineer. My company makes a stand alone application. I introduced them to Jasper and implemented it. In the coming future ie. around 2007 we intend to take our application to the web. This would involve a huge effort and we would also want to be able to present our reports over the web. In kind of getting prepared for that I stumbled on open reports which sounds promising. Now the issue.
Our jasperreports do not connect to the database. We supply it with Java’s business objects and it reads them to populate the report. Can open reports accept these objects like an arrayList, hashmap or vector ? It seems from your blog that it cannot and it seems you changed the code of open reports to do so. If so, I do not want to reinvent the wheel and was wondering if you could provide me with your version of open reports. Please confirm my suspicions, thanks for your time.
java.head
November 3rd, 2006 at 11:52 am
Hi is it possible to use a simple comma seperated file as a data source to a JasperReport instead of a DB or any other datasource.
Thanks in advance for the info!
José Luis
November 9th, 2006 at 2:55 pm
Do you think Jasper Report is a good tool for export a report as XLS?
I just need to export the detail section of my reports (not title, images, lines between rows, foot section, etc.) The exported sheet should be simple and ready for work.
I’ve heard selective export is a weak point of JRreport. You have to export the whole report, getting a complex sheet full of empty narrow cols to preserve coordinates of non-relevant elements (images, corporative information, decorative lines, etc.) I suppose exporting as CVS is affected by similar limitations…
Do you think this is a real problem?
Thanks in advance,
José Luis
Brian Burridge
November 10th, 2006 at 4:07 pm
José Luis,
JasperReports should not be viewed as an export tool. But, if you are using it anyway for reports, and you want the same data you are using in a report, to be exported in XLS, then certainly it will work. I added a type parameter that was passed to all reports, and I added a print when expression to all fields in the jasper report for that type when it was XSL. This way I can suppress all the headers, groups, etc, and only export the detail records.
afrina
January 4th, 2007 at 6:32 am
I am using Jasper Reports for my report building it workd completely fine with windows buton Unix platform it gives Broken pipe Error after analyzing more and the thread Dump we found :
– Holding lock: java/lang/NumberFormatException@0×200430d0[thin lock]
at java/lang/Throwable.(Unknown Source)@0×40c8ba13
at java/lang/Exception.(Exception.java:41)@0×40c8b9f5
at java/lang/RuntimeException.(RuntimeException.java:43)@0×40c93655
at java/lang/IllegalArgumentException.(IllegalArgumentException.java:36)@0×40c93645
at java/lang/NumberFormatException.(NumberFormatException.java:38)@0×40c93635
at java/lang/FloatingDecimal.readJavaFormatString(FloatingDecimal.java:983)@0×431b1946
at java/lang/Double.parseDouble(Double.java:220)@0×470de681
at net/sf/jasperreports/engine/export/JRXlsExporter.exportText(Optimized Method)@0×447ecf91
at net/sf/jasperreports/engine/export/JRXlsAbstractExporter.exportPage(JRXlsAbstractExporter.java:367)@0×4709cb23
at net/sf/jasperreports/engine/export/JRXlsAbstractExporter.exportReportToStream(JRXlsAbstractExporter.java:289)@0×47097918
at net/sf/jasperreports/engine/export/JRXlsAbstractExporter.exportReport(JRXlsAbstractExporter.java:135)@0×47096e1a
could you please suggest me Why do we get Number Format Exception that causes Thread Lock and hence Broken Pipe Error
Vamsi
January 12th, 2007 at 8:42 am
I need to paginate for PDF and show them in a single page for HTML and XLS ? Is this achievable using Jasper If How?
I cant set remove_empty_space between rows as I also need that to differentiate between data
so Is it achievable?
Sanjib
January 16th, 2007 at 9:32 am
Hi All,
I am using jasper for reporting in my application. The application “war” file is deployed in WebSphere, And it is failing during report initialization.
Can any body plz tell me, why I am getting this error. Probably what are the suspected cause behind this.
Thanks in advance,
Sanjib
[1/16/07 17:53:14:562 IST] 5639e40e WebGroup E SRVE0020E: [Servlet Error]-[reports]: Failed to load servlet: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. java.sql.Connection cannot be resolved to a type value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
2. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
3. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
4. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
5. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
6. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
7. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
8. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
9. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
10. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
11. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
12. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
13. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
14. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
15. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
16. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
17. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
18. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
18 errors
Sanjib
January 16th, 2007 at 9:39 am
Hi All,
I am using jasper for reporting in my application. The application “war” file is deployed in WebSphere, And it is failing during report initialization.
Can any body plz tell me, why I am getting this error. Probably what are the suspected cause behind this.
Thanks in advance,
Sanjib
[1/16/07 17:53:14:562 IST] 5639e40e WebGroup E SRVE0020E: [Servlet Error]-[reports]: Failed to load servlet: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. java.sql.Connection cannot be resolved to a type value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
2. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
3. java.sql.Connection cannot be resolved to a type
value = (java.sql.Connection)(((java.sql.Connection)parameter_REPORT_CONNECTION.getValue()));
4. java.sql.Connection cannot be resolved to a type
*
*
—————->
18 errors
Ivan Vasquez
January 24th, 2007 at 3:23 pm
Hi,
I need generate dynamic columns using JasperReports. In this moment i’m using iReport for create the templates, but this are statics templates, and i need dynamic columns , dynamic xml source that can modified the templates dynamically
if Someone has a solution please, help me.
Thanks!!
Imam Hossain
February 6th, 2007 at 6:42 am
Hi,
I am using Jasper Reports for our automated clearing & settlement system which is developed using java struts framework and run on tomcat5.5. currently we use some reports designed on jsp. But now we have to develop a lot of reports and i already made some reports using jasper report (iRepor). When i generate a Jasper Report, it opens up on the server (in Jasper Viewer) not on the client and after generating the report the tomcat goes to be hang.
Please tell me what I need to do to open up a Jasper Report on the client.
Right now it is opening up in the server, I need to open it on the client.
Nuno Silva
February 8th, 2007 at 2:59 pm
I also need to make a report with a pdf as background, so i can write uppon it. Anyone knows how this is possible ?
Thanks in advance
Nuno Silva
Gangadhar
February 17th, 2007 at 4:52 am
hi
I am Gangadhar. I am working with jasper report. I made xml file which is stored in E:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\Torque\WEB-INF\classes folder where Torque is my folder name. Every thing of java code is working fine but jasper compileManager doesn’t find xml file. please guide me where to store xml file & what changes are required to work program correctly. I am also forwarding my java code. please guide me.
import java.util.*;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.*;
public class JasperReportIntro
{
public static void main(String[] args)
{
String reportSource = “Torque/Simple.xml”;
String reportDest = “Torque/Simple.html”;
try
{
Map param = new HashMap();
JasperReport jasperReport = JasperCompileManager.compileReport(reportSource);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,param, new JREmptyDataSource());
JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
JasperViewer.viewReport(jasperPrint);
}
catch (JRException e)
{
e.printStackTrace();
}
}
}
Raymond
February 27th, 2007 at 5:44 am
Hi Brian;
I have used jasper reports before in JBOSS and had no problems, however, when trying to generate a simple report in websphere, I get the following error:
TRAS0014I: The following exception was logged java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte: method transform(Ljava/awt/geom/AffineTransform;)V not found
I have chopped and changed the code and the report six ways from Sunday, yet the same error occures.
Here is the code:
try{
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);
JRCsvDataSource ds = new JRCsvDataSource(new FileReader(dataSourceFile1));
ds.setColumnNames(getFAISColumns());
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds);
int read = 0;
System.err.println(“TOTAL PAGES = “+jasperPrint.getPages().size());
byte [] bytes = new byte [1024];
ByteArrayInputStream is = new ByteArrayInputStream(JasperExportManager.exportReportToPdf(jasperPrint));
response.setContentType(“application/pdf”);
response.setHeader(“Content-disposition”, “inline; filename=report.pdf”);
outputStream = response.getOutputStream();
while((read = is.read(bytes)) != -1){
outputStream.write(bytes, 0, read);
}
outputStream.flush();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
Raymond
February 27th, 2007 at 5:49 am
Hi Brian;
I have used jasper reports in the past with JBOSS with no problems, however, when trying to generate a simple report in websphere, I get the following error:
TRAS0014I: The following exception was logged java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte: method transform(Ljava/awt/geom/AffineTransform;)V not found
try{
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);
JRCsvDataSource ds = new JRCsvDataSource(new FileReader(dataSourceFile1));
ds.setColumnNames(getFAISColumns());
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, ds);
int read = 0;
System.err.println(“TOTAL PAGES = “+jasperPrint.getPages().size());
byte [] bytes = new byte [1024];
ByteArrayInputStream is = new ByteArrayInputStream(JasperExportManager.exportReportToPdf(jasperPrint));
response.setContentType(“application/pdf”);
response.setHeader(“Content-disposition”, “inline; filename=report.pdf”);
outputStream = response.getOutputStream();
while((read = is.read(bytes)) != -1){
outputStream.write(bytes, 0, read);
}
outputStream.flush();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
Any ideas?
Rahul Kumar
March 15th, 2007 at 4:44 am
I have to change dynamically the number of columns in report.The problem is like the following.
There is a list box in jsp page,that contains the column names.User selects columns in list box that are printed in report.Therefore,i must create report dynamically.How can i organize this report using jasperreport?
siva
March 17th, 2007 at 12:33 am
My jasper report have a sub report. I deployed my Jasperreport on the jasperserver and when I run it, “parameter DATABASE_TIMEZONE does not exist” error is coming. Kindly give a solution to this..
Thanks in Advance…
SIVA
barry
April 10th, 2007 at 10:24 am
Hi Brian,
I am trying to call a DB2 stroed procedure from Jasper Reports.
I can successfully call a stored procedure which only requires input parameters but can’t work out how to call one which requires both input and output parameters.
Any ideas?
Brian Burridge
April 10th, 2007 at 5:11 pm
Barry, have you read my post: http://www.brianburridge.com/2006/06/04/how-to-call-stored-procedures-from-jasper-reports/?
Cobus Benard
April 17th, 2007 at 11:48 am
Hi
Have you tried working with the Velocity templates? I’m drowning at the moment – I got OpenReports up and running and it is displaying reports via Stored Procs. Now I need to add drill-down reports with Velocity it seems, but I can’t upload the .vm files – do I need to precompile them somehow? I can’t even seem to upload normal .jasper files – I’m using v2.2 of OpenReports and v1.3.0 of iReports to compile my JasperReports.
Any help would be greatly appreciated.
Thanks!
Brian Burridge
April 24th, 2007 at 6:07 pm
Cobus, I’m not sure what you mean by not being able to upload them, but there isn’t any compilation steps needed for vm files. Where are you trying to upload your vm’s to, and from where?
try BIRT
May 2nd, 2007 at 8:48 pm
Hi,
I have tried Jasper reports and BIRT reports in last 2-3 months. I found BIRT reports are far more better than the Jasper reports with many types of drill down capability..which Jasper report doesnt have
rohan
May 3rd, 2007 at 7:59 am
hi all,
I am facing a problem when i am using sub-reports. Problem is when i compile and execute the subreport with the main report, i am getting the below mentioned exception, but the same subreport if i run individually the data is filled and is displayed properly.
Error filling print… No filed reader for category
net.sf.jasperreports.engine.JRRuntimeException: No filed reader for category at net.sf.jasperreports.engine.data.JRHibernateAbstractDataSource.getFieldValue(JRHibernateAbstractDataSource.java:234) 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:1109) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:767) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:690) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:515) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209) at java.lang.Thread.run(Thread.java:595)
if any one has solutions for the problem or have any sought of clue, plz help me out.
thanks.
Jerson
May 6th, 2007 at 4:01 am
Hi Cau u please provide me a sample report Project Source Code the i can understand more Can apply for my customer.I am trying to create a report Which will List All available Fields and User will choose the fields and It will generate the Report
chetan
May 7th, 2007 at 3:47 am
i want a client side printing in jasper report after hitting print button on screen.i want a print dialog box.how can it is possible?
Suresh
May 9th, 2007 at 6:11 am
Iam using jasperreports in my project.I used jasperViewer to generate the reports.when i save the report as .csv.The alignment is not proper?.Is there any solution for this?.
It’s urgenttttttt
Suji
May 9th, 2007 at 6:16 am
Hi
Iam using jasperreports in my project.I used jasperViewer to generate the reports.when i save the report as .csv.I don’t want to use JRCsvExporter class to export the report.The alignment is not proper?.Pls help me out
sanjeev
May 14th, 2007 at 3:38 am
hi guys ..pls help me how to congigurejasper report using eclipse ide ..
Sirisha.A
May 22nd, 2007 at 5:42 am
Hi,
i am using iReport1.2.7 to generate some reports in my project.I have successfully generated that reports in PDF format.But when i am trying to generate in Excel format,i am not getting the report properly.Some data is missing there,and also the cells are coming out as merged.Can you give me any suggestions on this?
Thanks in Advance
sirisha.A
thapa sobit
May 28th, 2007 at 2:02 am
i have to insert serial numbers at report but problem is that ther will b multilple subreport’s data at each column.how to insert serial no then if possible………….
Renjith
June 1st, 2007 at 3:13 am
Hi brian,
am using jasper report for my report generation functionality.Am not using a query to retrieve the data from database, instead i will get recordzs as a list which i will assign to a JRBeanDataSource Object and pass it to
JasperFillManager.fillReport method . My problem is that my each record from the list should come in seperate PDF pages. Curently what happens is that , there is no page break ,the report is a big strip of PDF with all records in one page in a one another below manner. Am not using JRXML file but instead am using a *.vm file for the creating a report template.
do you have any idea which may be helpful to me?
I can send you my files that am currently working on if needed.
please do reply
Thanks
Renjith
Cobus
June 13th, 2007 at 9:16 am
Hi
Sorry for the long delay, got sucked into another project. I created a very basic .vm file where I only rename the column headers. I am uploading the file from my pc to the server (into the Base Directory). I retrieve my data via a stored proc (mssql2000). I do not have any JasperReport files there. I can see the file in the dropdown box when I create a new report, but when trying to access the report, I get a resource not found exception.
Thanks,
Cobus
shinky
June 16th, 2007 at 10:05 am
CAN YU HELP ME CREATE IREPORTS….MY REPORTS ARE GIVING ME THE CROSS TAB ERROR AND ALL FOR WHICH I AM NOT AWARE
Priti
June 25th, 2007 at 9:55 am
Hi Brian,
JasperFillManager.fillReport(jasperReport, parameters, new JRBeanCollectionDataSource(dataList)) is taking lot of time to execute. Do you have any idea how this can be tackled?
Thanks,
Priti..
Brahma
July 2nd, 2007 at 12:04 pm
Hi All,
Can any know how to subtract one row count from total count in cross tab report?
ex:
a b c total
abc 1 2 3 6
cde 2 3 1 6
fgh 3 1 2 6
total 2 0 4 6 (total – cde)
thanks in advance.
Karthik
July 4th, 2007 at 7:11 am
Does Linux machines support Printing of jasper reports?
Karthik Nag
July 4th, 2007 at 7:13 am
Does Linux machines support Printing of jasper reports? Can anyone suggest how to print jasper reports in linux machines..
Thanks
Harigopal
July 9th, 2007 at 4:57 pm
Can we include css in the jasper reports
Tara B Prabhakar
July 10th, 2007 at 7:52 am
Hi Everyone,
I have designed my report using crosstab. it is working fine when i generate from ireport but when i incorporate with my jsp thn the following exception comes…. please help me out as it is very urgent for me and my client.
Thanking You
java.lang.NoClassDefFoundError
net.sf.jasperreports.engine.fill.JRDefaultIncrementerFactory.getFactory(JRDefaultIncrementerFactory.java:108)
net.sf.jasperreports.crosstabs.fill.JRFillCrosstabMeasure.createIncrementerFactory(JRFillCrosstabMeasure.java:133)
net.sf.jasperreports.crosstabs.fill.JRFillCrosstabMeasure.(JRFillCrosstabMeasure.java:59)
net.sf.jasperreports.engine.fill.JRFillObjectFactory.getCrosstabMeasure(JRFillObjectFactory.java:1173)
net.sf.jasperreports.engine.fill.JRFillCrosstab.copyMeasures(JRFillCrosstab.java:199)
net.sf.jasperreports.engine.fill.JRFillCrosstab.(JRFillCrosstab.java:153)
net.sf.jasperreports.engine.fill.JRFillObjectFactory.getCrosstab(JRFillObjectFactory.java:997)
net.sf.jasperreports.crosstabs.base.JRBaseCrosstab.getCopy(JRBaseCrosstab.java:218)
net.sf.jasperreports.engine.fill.JRFillElementGroup.(JRFillElementGroup.java:88)
net.sf.jasperreports.engine.fill.JRFillElementContainer.(JRFillElementContainer.java:88)
net.sf.jasperreports.engine.fill.JRFillBand.(JRFillBand.java:77)
net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:374)
net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:407)
net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:92)
net.sf.jasperreports.engine.fill.JRFillSubreport.initSubreportFiller(JRFillSubreport.java:370)
net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:350)
net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)
net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:399)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1289)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:750)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:647)
net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
org.apache.jsp.pages.IpMang.IpMangPass_jsp._jspService(IpMangPass_jsp.java:106)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
Yudha Nugraha
July 30th, 2007 at 12:05 am
Hi Brian,
Could you teach me how to embed a report using jasper reports in java into web, i’ve tried to solve this problem several days ago but it didn’t work at all, could you give a simple project, pleaseeeee
BOIKANYO
August 3rd, 2007 at 5:10 am
hi.
ill like to know how to use velocity.how do i get started?
i downloaded it but i cant use it.is there a way to install it or u use it like jasper.does it have a graphical designer.
my main aim is to create ad hoc reports.that users select which columns to use at runtime.im using.jsp,servlet,class n tomcat as a server,netbeans, ireports,jasperreports
Jack
August 22nd, 2007 at 10:29 am
I am a newbie. I just created my first subreport and within the iReport application, it works. I am using the connection expression: $P{REPORT_CONNECTION} and am passing 2 parameters. As I said, within iReports, the appropriate data is retrieved and displayed. But when I execute the report within the web application, no records are retrieved / displayed. I know that the subreport is being found because, to debug, I added a display of the parameters that are being passed and they are displaying accurately. But the detail of the subreport remains blank, which makes me think that the query in the subreport is not being executed. Any clues to a solution would be appreciated. Thanks.
Brian Burridge
August 22nd, 2007 at 11:01 pm
@Jack – Hopefully someone else reading here will be able to help you. Unfortunately, I don’t have any experience with iReport. I haven’t even been doing any JasperReports work now for over a year.
gaurav jain
August 28th, 2007 at 3:17 am
i am new to jasper reports using jasper asistant and eclipse 3.2and i want to use dynamic reports…
such as:- select empName from employee_master where city = someValue, and i want to pass value of city at runtime, so how write such a program…plesae provide me with some sample , i have never created ant report in java….
Annaiah
September 10th, 2007 at 6:33 am
Hi,
we have generated the jasper report, reports are working fine, but there is a small issue in it.
when we are entering the proper data, the data gets populated in the report.
if there is no data means , its should show blank page specified with blank icon the page header.
I am trying for that since last one day, its not working, can u suggest the proper idea to solve the problem.
Thank u,
my mailid : Annaiah_Halappa@infosys.com
Rishiraj
September 12th, 2007 at 3:13 am
Printing Problem in Client Machines(Printing Permission)
Hello, I came across a problem. I could display my report in applet which I have created with iReport tool. The problem is at the time of printing on the client machine,an error dialog box appears with message “Error In Printing”. I have to configure my java.policy file with some extra code for printing permission. So this has become a problem. If I give this report online how can I configure infinite clients on the web for pritning the report. Is there any other way to do so without configuring the java.policy file in the client machine?
Please Help..
Thanks in Advance
jagadeesan
September 12th, 2007 at 4:36 am
for ques 218,
visit http://blog.marcnuri.com/blog/default/
domino
September 14th, 2007 at 2:36 am
Hi im using jasperAssistant..I want to integrate several subreports to 6 pages..what i’ve done is tnat I customized the page height to the sum of a sixpage layout so that I can properly arrange the subreports I wanted on each page..However, when previewing, I was able to view the whole custom page height I’ve made,including those blank spaces since I am using page breaks…any help so that I can view only the printable area and not the whole customized page?
KIRAN
September 23rd, 2007 at 10:29 am
HAI IAM KIRAN IAM NEW TO JASPER… MY REQUIREMENT IS USING STRUTS +HIBERNET QUERY I NEED GENERATE REPORTS ON BROWSER … PLZ..PLZ…HELP ME I AM IN TROUBLE PLZ SEND ONE APPLICATION ON STRUTS+HIBERNET PLZ …HELP ME..
mkk_reddy@yahoo.com
THANKIG U
KIRAN
KW
September 25th, 2007 at 7:36 am
URGENT : What is the best way to inject a composite Hibernate Set into a Jasper Report e.g.
public class Employment {
private Set jobs;
}
public class Job {
private String jobName;
}
I retrieve via a Hibernate Query which has a left join on Job jobs which returns data OK. I then push the Employment object to the JRBeanCollectionDataSource. In the jrxml I have
jobs.jobName as a field to be displayed in the Detail band. I get a message stating that property cannot be found.
URGENT is much appreciated.
KW
September 25th, 2007 at 7:39 am
karl.widmer@c4k.com
Kam
October 12th, 2007 at 2:29 am
Hi,
Anyone knows abt how to access sqlsever stored procedure in iReport1.3
Kam
October 12th, 2007 at 2:30 am
Hi,
Anyone knows abt how to access sqlsever stored procedure in iReport1.3.
Expecting good result asap.
Thanks
aik
October 21st, 2007 at 11:37 pm
To Brian Burridge,
I want the each line number
in the detail band, when each line is created
by aik
Sai
October 22nd, 2007 at 2:25 am
Hi aik,
You can use variable as $V{Srno}.
# Srno variable properties
======================
class >>>java.lang.Integer().
initial value >>> new java.lang.Integer(0)
Expression >>> new java.lang.Integer(($F{ONE_FIELD_FR_DB}==NULL?$V{Srno}:$V{Srno}+1))
Try it,
Sai
damien martyn
November 13th, 2007 at 2:54 am
Hi,
I get following error.
Would you tell me about this to solve it?
Please send me Answer.
org.xml.sax.SAXParseException: Attribute “class” with value “java.sql.Date” must have a value from the list “java.lang.Boolean java.lang.Byte java.util.Date java.sql.Timestamp java.sql.Time java.lang.Double java.lang.Float java.lang.Integer java.lang.Long java.lang.Short java.math.BigDecimal java.lang.Number java.lang.String “.
Suresh
November 15th, 2007 at 8:03 am
Hi Brain,
I am desinging jasper reports using ireport 1.3.3
and my requirement is to dynamically displaying the columns and i am able to do this by placing the condition on the required field and text box but i am not able to remove the blank spaces after removing the columns .So i want to remove the blank spaces and columns should be rearranged, is it possible in ireport or not please let me know.
Suresh
November 15th, 2007 at 8:03 am
Hi Brain,
I am desinging jasper reports using ireport 1.3.3
and my requirement is to dynamically displaying the columns and i am able to do this by placing the condition on the required field and text box but i am not able to remove the blank spaces after removing the columns .So i want to remove the blank spaces and columns should be rearranged, is it possible in ireport or not please let me know.
Regards
Suresh
vidhya
November 22nd, 2007 at 5:19 am
hi,
please help me deploying openreports as a web application with tomcat. Am getting lifecycle exception.
Carlos
November 26th, 2007 at 1:04 pm
Hi!,
How can I reference a Parameter into the SQL Query with OpenReports?
For example: SELECT * FROM table WHERE column=”parameter”
How can I reference to the parameter added in OpenReports.
Please, HELP ME !
Fraser Williams
January 18th, 2008 at 11:37 am
Please assist:
I have many reports all created with iReport. I have embedded the JasperReports API into my appliation and am using fillReport as so :
JasperPrint jasperPrint = JasperFillManager.fillReport(“file.jasper”, params, conn);
this is throwing a number format exception :
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at net.sf.jasperreports.engine.util.JRProperties.asInteger(JRProperties.java:385)
at net.sf.jasperreports.engine.util.JRProperties.getIntegerProperty(JRProperties.java:363)
at net.sf.jasperreports.engine.util.JRStyleResolver.getFontSize(JRStyleResolver.java:901)
at net.sf.jasperreports.engine.fill.JRFillTextElement.getFontSize(JRFillTextElement.java:1107)
at net.sf.jasperreports.engine.fill.TextMeasurer.(TextMeasurer.java:94)
at net.sf.jasperreports.engine.fill.JRFillTextElement.createTextMeasurer(JRFillTextElement.java:113)
at net.sf.jasperreports.engine.fill.JRFillTextElement.ensureTextMeasurer(JRFillTextElement.java:120)
at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:515)
at net.sf.jasperreports.engine.fill.JRFillStaticText.prepare(JRFillStaticText.java:193)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:343)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:323)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:282)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1382)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:768)
does anyone know why this is so?
Many thanks
Fraser Williams
Cristian
January 22nd, 2008 at 4:25 pm
Hi Brian, i’ m realy thankful with you and your software OpenReports, but i have a problem with the number of parameter per report, i need define 15 parameter in one report, but when i define the parameter number 11, the aplication don’t show me the upload dialog again.
Brian Burridge
February 2nd, 2008 at 8:14 am
@Cristian, openreports isn’t my software.
I just used it on a project a few years ago. You can visit the open reports web site here: http://oreports.com/
mostafa
February 3rd, 2008 at 9:19 am
after hy
i need to develope an application thats dponds on reports and ihave some problems so ihope if you can help me
at first ican’t do adynamic report i’m usng netbens 6
and ireport2
h’m waiting foryour reply
Rajesh Savaliya
March 18th, 2008 at 1:56 am
hi..sir,
i am using jasper report.i had created report using ireport2.0.0 . i had provided query like “select * from employee where emp_designation=$P(designation)”
but, when i am not passing any parameter to it ,it shows no pages.
i want that when parameter value is null then,report should be generated for all designation.so how it can be possible????
please help me.
thanks….
wendy
March 18th, 2008 at 12:26 pm
hi…im a undergrad who is currently working on tis openreports. I need to modify some of the functions in order 2 fulfill my requirements but i don hv any idea how 2 modify d codes as it uses tag lib and im nt familiar with tat, even i wanted 2 change a small thing lk header and footer are complicated for me..pls help..
thx in advanced.
wendy
sundeep
March 21st, 2008 at 2:20 am
can anybody suggest how to send data from JSP page to iReport tool
meiren
March 27th, 2008 at 5:47 pm
Hi Brian,
I have read some of your postings, very helpful, I have a question here, hope you can help
I am using OpenReport as my front end to display jasper report, all the reports are done in ireport, it works fine, the Open report is really helpful and works nicely. But now I need to add a search function into the report, and there is no way I can have a input field in the report, so I am thinking to run the report inside the open report, keep the menus on top of the open report page and display the report inside the main frame of the open report, this way, I can simply add a search menu, then any time, user can bring in the search screen and do a search. I know how to make the html report inline, but I don’t know how to keep the header, the menu bar, that contains “Report” “Administration”, etc.
Do you think it is possible to do it? if yes, could you please give me some instruction?
Thank you very much!
Meiren
Brian Burridge
March 29th, 2008 at 2:06 pm
Meiren,
It sounds reasonable, but its hard for me to offer much advice at this point. I haven’t used Open Reports in a few years now. I would think you could us AJAX to load an HTML report into a layer and then use a JavaScript search function to search through the contents of that layer. Good luck!
Yez
April 10th, 2008 at 11:39 am
…
yash
April 10th, 2008 at 11:29 pm
hi i am trying to compile my report. but it is giving that error.
“Error retrieving field value from bean”
although the connection is successful.but report showing the null value.
can anyone help me???
jimmy
April 25th, 2008 at 3:11 am
Hello,
I have a little problem about iReport.I have made 4 reports and I want to join them as a single report.
And all reports have their page header and column header and their own queries.Either is this possible to combine the reports with all their page header and column header that they show like the same as they individually.
vikram
April 27th, 2008 at 10:29 pm
Hi,
Even i have a similar requirements as being posted by a few members before. I have to show or remove the columns at run time. I am using JRXML, is it possible to re-arrange the columns at run time depending upon what columns i selected to show ?
programmer@blore
April 29th, 2008 at 6:56 am
Hi,
How to ignore the count part from the cross tab report in jrxml.Kindly mention the syntax.
Thanks in advance.
Prashanth
April 29th, 2008 at 7:27 am
Hi,
I have problem in birt open report2.2 and openreport3.0.1.
I created report using birt report designer it displays it in preview properly, when i integrate it with openreports and try to generate report it give error in .rptdesign.
I think i dont have error in .rptdesign bcoz if i change version number in .rptdesign it shows report upto the point where i used crosstab(new feature from birt 2.2).
I downloaded latest openreports version, i read that this supports birt 2.2.
juanje
April 29th, 2008 at 12:46 pm
how can i use a chart in a query report? using a freemarker template, without using jasper
thanks in advance
Bala
May 12th, 2008 at 2:40 am
Hi,
I want generate HTML reports through Jasper reports.Here i want include the Java Script functionalities.Is any possibilities there?
Anonymous
May 14th, 2008 at 4:49 am
bnbg
Bala
May 14th, 2008 at 7:12 am
Hi,
I have a java script file for “ExpndAll”, “CollapseAll” functionolities .
I want generate the HTML reports via jasper reports.how to include that java script file into my “jrxml” file.
Thanks in Advance
Bala
kumaresan
May 27th, 2008 at 5:17 am
Hi
I have created the report “.jrxml” by using the ireport. How i can integrate the generated report(.jrxml) with open reports.I am using “WAMP”(PHP) SERVER.Is it possible to use in wamp???
Thanks in advance
Gopal
May 29th, 2008 at 3:24 am
Hi,
I need to pivot the records and then print. Is it possible
coderb
June 12th, 2008 at 8:09 am
Hi,
thanks for the very informative article. This and other finds has led me to go for the same solution. However, as a noobie, am finding it really difficult to find a simple start to finish step by step guide to installing openreports with jasperreports on Leopard? I posted the question on a couple of forums including (http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&catid=8&id=42002#42002)
, but perhaps if you have a couple of minutes, just give me a few pointers. thanks
Navin
June 20th, 2008 at 2:35 am
Hi,
I am trying to generate Crosstab reports using iReport 2.0.2 for linux, and getting blank pages as a result. Kindly help me to get rid of it.
siva
June 27th, 2008 at 2:10 am
hi brian,
I want to use my own date pattern to my jasper, i passed $P{userDatePatter} Parameter to the report and using SimpleDateFormat to convert my own date pattern(for every reports iam doing like this) , what iam asking is, instead of doing like i want to declare common datepattern to my all reports..
thanks in advance
SIVA
kalpana
July 1st, 2008 at 5:13 am
i am developing report(matrix with group) , i dontm know how to do summation for the data.
kalpana
July 1st, 2008 at 5:17 am
hi,
i am developing reports using i-reports , i cannot convert (matrix with group above-oracle reports) to i-reports, and not able to do sum of the resultant fields.
help me
raju
July 7th, 2008 at 6:24 am
how to display “Continued” message at the end of every page
raju
July 7th, 2008 at 6:24 am
how to display “Continued” message at the end of every page using iReport 3.0
Anonymous
July 21st, 2008 at 6:15 am
hey
Tamal
August 4th, 2008 at 6:52 am
hi
I faced a problem on ireports while creating reports on pdf formator on text format.
Actually it leaves spaces after the rows.Even adjusting band size & minimising d field size has not removed d problem completely.
please suggest something.
Thanks & Regards
Tamal
Sammy
August 13th, 2008 at 11:07 am
Hi Brain,
Thanks for your ongoing support. I have couple of issues working woth jasper reports and hopefully I’ll find an answer here.
I have a requirement to create barcode labels of 4′ width and 2′ height. I created a report in jasper with the help of iReport. If I generate the report in pdf and print it from pdfviewer then it prints fine on the datamax label printer. But, if I try to print it from jsp by displaying a print dialogue it prints 4 extra labels first and prints data on the fifth one. I am assuming that it’s taking A4 paper size in account. So, I have set Printrequestattributeset parms as below with no luck.
javax.print.attribute.PrintRequestAttributeSet printRequestAttributeSet = new javax.print.attribute.HashPrintRequestAttributeSet();
printRequestAttributeSet.add(new javax.print.attribute.standard.MediaPrintableArea(0,0,jasperPrint.getPageWidth()/72,jasperPrint.getPageHeight()/72,javax.print.attribute.standard.MediaPrintableArea.INCH ));
exporter = new JRPrintServiceExporter();
exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.TRUE);
2. I have to display the print dialougue to Client and get the input from the user and print to that particular printer. But, with above code it displays the print dialogue on server computer.Is there a way to show it on client side? As this is label printing client will be printing 50 to 100 labels at a time and they just want to click on a button and select a printer. They don’t want to see how the output looks.
Thanks for your help,
Sammy
Saroj
September 12th, 2008 at 1:03 am
Hi Brian,
How to print row number in the detailband.
I want the 1st column to display the row number or record number. Starting from 1 & incremented by 1 for each record frtched.
Dipti
September 17th, 2008 at 6:32 am
Hi Brian,
I want to display 60 lines per page. I adjusted the height from settings.Then pagebreak of all pages which is having records less than 26 is coming properly at 61 th line. but if records exeeded then the pagebreak is at 68th line.
Please tell me how to adjust records per page in iReport.
Karthi
September 26th, 2008 at 6:30 am
these questions and the solutions are greatly useful but how to post quetions regardng can any one please guide me.
Thnx in before.
Karthi
September 26th, 2008 at 6:30 am
these questions and the solutions are greatly useful but how to post quetions regardng can any one please guide me.
Thnx in before.
Karthi
September 26th, 2008 at 6:35 am
Hi,
I have created a cross tab report using iReport.
Now the output is getting exported to JR Viewer, but the same is not getting exported in PDF Format. Help me pls.
Thnx in advance,
Karthi
bhavanisuryanarayana
September 30th, 2008 at 2:15 am
Errornet.sf.jasperreports.engine.JRException: Error executing SQL statement for : Passengers_list(this is my report’s name)
bhavanisuryanarayana
September 30th, 2008 at 2:20 am
net.sf.jasperreports.engine.JRException: Error executing SQL statement for : Passengers_list
How to solve this problem
handoyo
October 8th, 2008 at 6:11 am
Hi,i want to ask.Is it possible to create a custom query,for example,the client want to make a report based on dates that the items are sold,using between statements..Thanks a lot..
jt9
October 14th, 2008 at 6:37 pm
Hi there,
look, i’ve a problem with the jasperserver instalation, I installed jasperserver locally without problems but then i did in a UNIX server and after installed when i’m trying to open the login.html, the server show me the next Exception:
16:27:04,641 ERROR [jsp],http-80-Processor2:711 – Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: InputStream cannot be null
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:94)
at com.jaspersoft.jasperserver.war.common.SiteMenu.parse(SiteMenu.java:74)
at com.jaspersoft.jasperserver.war.common.SiteMenu.getMenu(SiteMenu.java:63)
at org.apache.jsp.WEB_002dINF.decorators.main_jsp._jspService(main_jsp.java:221)…
i unzipped the jasperserver folder into webapps on tomcat, but i don’t know if i need to do something else? can you help me?
tnks
Jee
October 19th, 2008 at 2:56 am
I have a problem with my report generation in sql query that, when I use the to_char() function in group by clause and select clause with a parameter(to provide the date format dynamically) to convert date, it shows the error that not a group by expression.
can you please provide some info on this as how can I avoid this issue.
[code]:
select to_char(cr.CR_DATE,$P{ReportPeriod}) "Period", cr.REQ_CLASS, count(*) "Request Count"
from paws2.C_REQUEST cr where cr.CR_USER like '%br%' and cr.cr_date between TO_DATE('09/09/2008', 'MM/DD/YYYY HH24:MI:SS') AND TO_DATE('10/09/2008', 'MM/DD/YYYY HH24:MI:SS')+1 group by to_char(cr.CR_DATE,$P{ReportPeriod}), cr.REQ_CLASS
[/code]
The same query working fine in Toad, but not in OpenReports.
Sabeer Hussain
December 23rd, 2008 at 1:50 am
I would like to know whether I can use Jasper reports on a separate machine independent of my web application, which will help me to reduce the overload on my web application server.
I am using Hibernate for my web application and I would like to use the same connection for my jasper reports which will be on separate machine, is it possible?
Saptarshi
December 23rd, 2008 at 2:34 am
Hi,
I would like to know whether Jasperreport / openreport/iReport can take the data from XML using XQuery. Actually I do not have any relational database and I am using Marklogic.
Can you also give us a simple comparison on the features on jasperreport/iReport/openreport.
Thanks in advance.
regards,
Saptarshi
sagar
January 31st, 2009 at 4:50 am
Respected sir
I am trying to display reports in Marathi but pdf dose nit support it actually in my table contain Marathi and English data but it only display English Why its happen i cant understand so please give me solution
than you
sagar
January 31st, 2009 at 4:55 am
Respected sir
I am trying to display reports in Marathi but pdf dose nit support it actually in my table contain Marathi and English data but it only display English Why its happen i cant understand so please give me solution
thank you
vidya
February 6th, 2009 at 1:08 am
Hi,
I am working in ireports 2.0.2. I am new to this tool. I have been search for hyperlinks topic(remote page,remote anchor and local anchor). I have gone through the documents but it is having only the definitions. I did practical no output. Please If any body is working on the same please help.
Please do the needful…
Regards,
vidya.
ashley
February 17th, 2009 at 1:14 pm
Hi Brian,
What version of Adobe reader is required with iReports 1.3.3? Does it work with any verison?
Thanks.
ashley
February 18th, 2009 at 12:28 pm
Do you need to have a particular Adobe Reader version for viewing PDF’s generated from iReport 1.3.3 / Jasper Reports 1.3.3? Does it work with any version?
We have someone having problems opening up a PDF report and is thinking it could be because of an older version of Adobe reader.
Thanks.
HoXuanPhuong
February 18th, 2009 at 11:58 pm
Hi all!
I am trying to install Openreports on windowxp, I have read Openreports guide install, But it still doesn’t work. Anybody help me to install it?
Thanks for help
Xuanphuong
Sushmita
February 19th, 2009 at 9:14 am
Hi Brian,
I have created a jasper report which includes a sub report. It works fine on iReport but when I deployed my Jasperreport on jasperserver then i get this error , “parameter DATABASE_TIMEZONE does not exist†.
Please give me some suggestions in order to solve this problem.
Thank you for your time.
Best Regards,
Sushmita
HoXuanPhuong
February 20th, 2009 at 12:11 am
Hi Brian,
I have installed openreports successfull on tomcat 5.5, but i am using tomat 6.0 . I do not know how to connect openreports to database mysql , and how to fill in URL and Driver textbox of openreports interface. Can you help me to solve the problem, I am urgent to do some reports. Please help me!
Thanks in advance
Xuan Phuong
Usman Sarfraz
February 3rd, 2010 at 9:44 pm
Aspose is going to introduce “Aspose.Cells for JasperReports” in near future to convert reports from JasperReports in Excel format. Currently, Aspose enables JasperReports developers to export their reports in PowerPoint (PPT, PPS) and Word document (DOC, DOCX, HTML and TXT) formats. I hope this reference URL will help http://www.aspose.com/categories/jasperreports-exporters/default.aspx
kishore
February 3rd, 2010 at 9:45 pm
Hi All,
1.)can u help me, how to stream .html files to browser without saving.
2.)i want dynamic sorting field in html report is it passible ?
plz give reply urgent…
Thanks in adv.
Steyn
February 3rd, 2010 at 9:47 pm
Hi there , Can one use OpenReports for serving up report form BIRT?
Andy
February 3rd, 2010 at 9:49 pm
Hello,
I think the way that cross tab works with multi-columns is: It builds like a hierarchy of columns. I want a little different implementation. Lets say for example I have an ArrayList of all the accounts in a bank. Each Account object has the following fields: holderName(String), amountInSavingsAccount (int) and amountInCheckingAccoun(int). I would want to loop through list using a Crosstab in the following fashion:
____________________________________________________________________________________
Checking Amount Savings Amount
____________________________________________________________________________________
John 10 20
Jack 10 20
Dave 10 20
Jamie 10 20
Jamie 40 80
____________________________________________________________________________________
The problem is, with multiple unrelated columns in an object, I’m not sure how to configure them in a crosstab in iReports. Any suggestions/inputs?
In short, what I’m asking is ‘Is there a way to have multiple non-nested columns using Crosstab’?
Thanks in anticipation,
Andy.
Ramya
February 3rd, 2010 at 9:50 pm
hi
i have generated a pdf report using ireport.
in the report i have 7 columns and some records.
i want to sum the row wise means need to add first 4 rows and next 3 rows seperately and i need to subtract both the values in the end of the row
Karthik
February 3rd, 2010 at 9:51 pm
Hi,
I need to title in every page and page header has to print only in first page, any option is there in ireport 3.6.0
pls help me. any code is there to hide page header fields from second page?
Ranjan Prasad
February 3rd, 2010 at 9:52 pm
How to generate serial no in jasper report
I am using jasper report in my application. In the table has 4 fields like code,name,address,phone number. If i generate the report i need to display the serial number like1,2,3…. for each record. I don’t know how to set. So please help me.
anshul
February 3rd, 2010 at 9:53 pm
Hi,
I am using i-report 1.3.1, and have an requirement to create report exported in pdf, which will have fill in fileds. Can you please suggest me how can i make fields in i-report to come as fill in filed/form when exposrted to pdf?
Thanks in advance
Luis M. Gallardo D.
February 3rd, 2010 at 9:54 pm
Hi Brian,
In your post you commented:
“I have made some improvements to OpenReports, including the Collection/List functionality to use Business Objects which JasperReports supports, but OpenReports currently doesn’t. At some point I’ll pass that code on to the original developers.”
I’ve tried to upload a jasper file to OpenReports with JavaBeans as data source (it works perfectly in iReport), but it seams OpenReports can’t handle that kind of data sources because I only got “null” as ouput in my fields.
Do you still have those code improvements? Or can you pinpoint me where to look, read or improve myself.
Thanks in advance!!
Luis M. Gallardo D.
Sarono Handoyo
February 3rd, 2010 at 9:55 pm
Hi Brian,
Currently I have a problem with JrHtmlExporter.
I tried to export my report into HTML type and it successfully created. But i found a many broken image, although I don’t use any of them.
The broken images should show blank images instead broken images.
Would you help me in this problem?
Thanks and regards,
Sarono
Romina
February 3rd, 2010 at 9:55 pm
Answer for andy susanto or any other people that have this problem!
The thing is that the tomcat intalled as a service has diff options configured than the other tomcat.
So, for being able to show the print dialog just execute the tomcat6w file in bin folder and go to Log On tab. There you have to check the “Allow service to interact with desktop” since jasper is showing the print dialog as a separete dialog…
I hope this helps…
Vajee
February 3rd, 2010 at 9:57 pm
In OpenReports, scheduled reports are failing due to a NullPointer exception, Even after setting the smtp host to a valid one.
Exception trace below…
——————————
02:22:01,506 WARN JasperReportEngine – net.sf.jasperreports.engine.JRException: Duplicate declaration of field : last_name
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at org.efs.openreports.providers.MailProvider.sendMail(MailProvider.java:95)
at org.efs.openreports.util.ScheduledReportJob.execute(ScheduledReportJob.java:210)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
02:22:03,183 ERROR MailProvider – java.lang.NullPointerException
org.efs.openreports.providers.ProviderException
at org.efs.openreports.providers.MailProvider.sendMail(MailProvider.java:196)
at org.efs.openreports.util.ScheduledReportJob.execute(ScheduledReportJob.java:210)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
02:22:03,184 ERROR ScheduledReportJob – org.efs.openreports.providers.ProviderException
——————–
Please advise if any modifications require to be done in our settings to overcome with this exception.
TIA..
-Jee
Venky
February 3rd, 2010 at 9:57 pm
I have 2 questions:
We are using openreports which we plan to integrate with an application. Is there a way to suppress the open reports login, since we have an oblix login for the application itself.
Secondly, is there a way to hide some of the reports from the user?
Appreciate your help!
Thanks
Venky
Chitra
February 3rd, 2010 at 9:58 pm
I’m working on a struts based application. I want to create a Jasper report containing questions and responses for a Paper Object. Clearly I have a List of Paper objects containing part attribute and each Paper object internally has a List of Questions. Also each Question has a List of Responses.
I could create the main report with Paper object which displays different part names. But I want to display the questions associated with the part and responses associated with each question.
My Model classes will be:
// Paper
public class Paper{
public String partName;
public List questions;
}
// Question
public class Question{
public String question;
public List answers;
}
// Answer
public class Answer{
public String answer; }
I know I have to use subreport in ireport but somebody explain me how to set the datasource and loop the list in subreport?
Thanks in advance.
aek
February 9th, 2010 at 12:34 pm
I have a question related to the use of Collections datasources.
i want to remove all the querys from jasperreports and provide all the data needed using my domain object previusly retrieved using hibernate as the dataaccess layer.
my domain object structure is like this:
class A {
Long id;
Set b;
String data;
}
class B {
Long id;
Set c;
String data;
}
Class C {
String data1;
String data2;
String data3;
}
I retrieve by id an instance of class A using hibernate, and I want to supply to the filling process of the report the collection A.getB() to generate a table for every B.getC() Collection as a dataset of the table.
I can’t figure out what this functionality may be adquired in JasperReport.
Someone has any points on this?
Echo
February 11th, 2010 at 8:39 am
I created a master report and a subreport using IREPORT 2.0. And it runs as expected. But when i run the file java master report appears correctly. However, the data fields in my subreport are not being filled in. I get a waring saying ‘The supplied java.sql.Connection object is null’. Per the JasperReports documentation and example, I set this to $P{REPORT_CONNECTION}, assuming that it would then use the same connection as the master report.
And the subreport data fields are not appearing on the report.
Can anyone offer any help? Forgive me if I sound ignorant as I am trying to grasp these concepts which are all fairly new to me.
Thank You.
Sapan
March 25th, 2010 at 12:39 am
I have tried to run the java class file and using netbeans IDE.i get the following error.i am trying to create a report using jasperreport
Below is the code
package jasperreportsdemoapplication;
import java.sql.SQLException;
import java.util.*;
import net.sf.jasperreports.engine.JREmptyDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperFillManager;
public class RepJes {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
try
{
System.out.println(“Compiling report…”);
JasperCompileManager.compileReportToFile(“./report/template/HelloW.jrxml”);
System.out.println(“Done!”);
System.out.println(“Filling report…”);
JasperFillManager.fillReportToFile(“./report/template/HelloReportWorld.jasper”,new HashMap(), new JREmptyDataSource());
System.out.println(“Done!”);
}
catch (JRException e)
{
e.printStackTrace();
}
Exception in thread “main” java.lang.IllegalArgumentException: Null ‘key’ argument.
at org.jfree.data.DefaultKeyedValues.setValue(DefaultKeyedValues.java:225)
at org.jfree.data.general.DefaultPieDataset.setValue(DefaultPieDataset.java:187)
at net.sf.jasperreports.charts.fill.JRFillPieDataset.customIncrement(JRFillPieDataset.java:126)
at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:169)
at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:154)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:621)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:758)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685)
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.fillReportToFile(JasperFillManager.java:492)
at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:448)
at jasperreportsdemoapplication.RepJes.main(RepJes.java:87)
Aaron
April 26th, 2010 at 7:53 pm
I have queries that need the data to be filtered out by a department ID. I know I can create a parameter in iReport as a dropdown list, but I can’t display the department ID’s as a parameter the user can change, it has to pull the dept_id from the session, or cookie that is hidden from the end user.
Is it possible to intercept the SQL in OpenReports before the report is ran, and place my dept. id there?
Is it even possible to do what I’m hoping it can do?
I don’t really want to duplicate the same report for every department id.
Any thoughts are appreciated. thanks.
Masud
May 15th, 2010 at 5:15 am
how can i print the report in client machine;
Masud
May 15th, 2010 at 5:17 am
how can i print the report in client machine;
http://masuksk@yahoo.com
Narendra
June 4th, 2010 at 3:34 am
how to pass Collection object value in jasper report paramter for example I want to send parameter value “1,2,3″ in jasper report in jasper assitant
Paramter type is String