Jump to content

2006 IR Open Discussion

Members
  • Posts

    776
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by 2006 IR Open Discussion

  1. By: Mark - sparkynine print page footer on first page only 2003-04-15 12:19 I am trying to get the page footer to print on the first page only. This I have succeded in doing, but the remaining pages have a blank space where the pageFooter is NOT supposed to be. I have tried a combination of "printWhenExpression" and "isRemoveLineWhenBlank" in every element within the footer, but the pageFooter band NEVER gets collapsed. I have even tried setting the band heigth to "0"... Mark
  2. By: Michael Keane - mbkeane How to creat JasperEdit parameter class 2003-04-15 07:16 Is there any documentation or examples of how to create your own custom parameter class for JasperEdit available? Thanks, Mike By: Chuck Deal - cdeal RE: How to creat JasperEdit parameter class 2003-04-15 07:29 I'm not sure I understand what you are asking for... What kind of new parameter? By: Michael Keane - mbkeane RE: How to creat JasperEdit parameter class 2003-04-15 08:04 I've done the basics of getting a report to print where I have a parameter "select" with a value of "select * from dept where " and another parameter "dept_name" with a value of "dept_id = 1" This works all fine but not really user friendly. I'd like to change this so the user can just type in "accounting" or something more user friendly or put a combo box in the table cell where the user can choose. I've stepped through the code down to JRBaseFiller.setParameter(...) where verifies that the value is an intsance of the class. That is where I'm confused with what to do next. What I want is to write a class that has a user friendly "toString()" methode to display in parameter editor yet when it plugs into parameter map has a value that builds a useful SQL statement. I hope this makes some sense. It is only slightly clearer in my head... By: Chuck Deal - cdeal RE: How to creat JasperEdit parameter class 2003-04-15 09:04 I think I understand where you are going now. It appears that you want to use JasperEdit as a Report "launching" tool. JasperEdit is a report designer. Adding the feature that you want is not really feasible (although, it may be possible). JasperEdit is meant as a way to develop reports, but really doesn't support a generic parameter collection interface that would be required for a solid user experience. From what you describe, you want a GUI to launch your reports. I don't know what kind of app that you are working with, but you will want to write a reporting front end. It is in that front-end where you can really customize the user experience. Present the user with drop-downs and such. If you are developing a web app, you might have a web page collect the parameters from the user and then call one of JasperReports methods for (compiling/filling/etc) the report. A native app would have a similar premise behind parameter collection. Just a note: You can also handle the creation of your SQL statement in this way. You current method of building the SQL statement will work, but it is not really a clean solution. I personally use JasperEdit as a way to validate and preview my reports as I work with the XML. I then use a JSP front-end to collect the parameter values from the user. Then I make the appropriate call to the JasperReports library to fill the report. By: Michael Keane - mbkeane RE: How to creat JasperEdit parameter class 2003-04-15 09:10 Thanks for your reply. I've came to the same conclusion on JasperEdit. Working on my own solution now, have 3 hours to get it done...
  3. By: Patria - phlukman passing parameters in query and use of subrep 2003-04-15 07:46 I am building a report ( MasterReport.xml) with a subreport ( ChildReport.xml). MasterReport.xml is as follows: ---------------------- <parameter name="SistemaCodigo" class="java.lang.String"/> <parameter name="Alias" class="java.lang.String"/> <queryString><![CDATA[sELECT sist_cod,SUBSTR(tage_nom,1,40) as tage_nom, SUBSTR(tage_alias,1,10) AS tage_alias,SUBSTR(tage_campo1,1,20) as tage_campo1,SUBSTR(tage_campo2,1,20) as tage_campo2, SUBSTR(tage_campo3,1,20) as tage_campo3 FROM tage WHERE sist_cod LIKE $P!{SistemaCodigo} AND tage_alias LIKE $P!{Alias} ORDER BY sist_cod,tage_nom ]]></queryString> <field name="tage_alias" class="java.lang.String"/> <subreport isUsingCache="true"> <reportElement ... isPrintWhenDetailOverflows="false"/> <subreportParameter name="Alias"> <subreportParameterExpression><![CDATA[ $F{tage_alias} ]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[ $P{REPORT_CONNECTION} ]]></connectionExpression> <subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[ $P{ProductsSubreport} ]]></subreportExpression> </subreport> -------------------------- ChildReport.xml is as follows: ----------------- <parameter name="Alias" isForPrompting="true" class="java.lang.String"/> <queryString><![CDATA[ SELECT tage_alias, vatg_cod,SUBSTR(vatg_des,1,40) as vatg_des,vatg_nom_variable,SUBSTR(vatg_valor1,1,20) as vatg_valor1, SUBSTR(vatg_valor2,1,20) as vatg_valor2,SUBSTR(vatg_valor3,1,20) as vatg_valor3, vatg_param,vatg_des_larga FROM vatg where tage_alias=$P{Alias} ORDER BY vatg_cod ]]></queryString> <field name="tage_alias ----------------------- In the calling program: parameters.put("SistemaCodigo","'AFI'"); parameters.put("Alias","'%'"); and I follow the proces of compilation and filling which works fine. The resulting .jasper file for this query is 1 MB aprox. When I am exporting the .jasper file to pdf format via JasperExportManager.exportReportToPdfFile(fileName); it seems it gets stuck, but it does not show any error. However, when I hardcode the values of SistemaCodigo and Alias as 'AFI' and '%' respectively within the MasterReport.xml the whole process works..... any hint? I would really appreciate it. Regards Patria
  4. By: ryanwu - ryanwu Connection Exception in JasperReport 2003-04-15 01:42 Hi Teodor.. I find a problem like japserreport bug... When I use JDBC direct connect to DB2... the Japserreport reder PDF is so smooth.. but I deploy to Webphere and use JNDI to look a Datasource to get a Connection... and pass the Connection to JasperRunManager I got Exception... COM.ibm.db2.jdbc.DB2Exception: [iBM][CLI Driver] CLI0125E Function sequence error.SQLSTATE=HY010 at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:260) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:197) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:448) at COM.ibm.db2.jdbc.app.DB2ResultSet.next(DB2ResultSet.java:487) at com.ibm.ejs.cm.proxy.ResultSetProxy.next(ResultSetProxy.java:511) at dori.jasper.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:112) at dori.jasper.engine.fill.JRBaseFiller.next(JRBaseFiller.java:700) at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:162) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:464) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:373) at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:114) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:217) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:157) at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:164) at servlets.MainPDFServlet.doGet(MainPDFServlet.java:247) at servlets.MainPDFServlet.doPost(MainPDFServlet.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) NESTED BY : dori.jasper.engine.JRException: Unable to get next record. at dori.jasper.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:116) at dori.jasper.engine.fill.JRBaseFiller.next(JRBaseFiller.java:700) at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:162) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:464) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:373) at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:114) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:217) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:157) at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:164) at servlets.MainPDFServlet.doGet(MainPDFServlet.java:247) at servlets.MainPDFServlet.doPost(MainPDFServlet.java:101) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122) -------------------------------------------------------------------------- Application Server:Websphere 4.01 OS:Win2000 Server DB:DB2 7.2 JDBC Driver : db2java.zip Please help me resolving the problem.....thans a lot
  5. By: Henri Chen - henrichen Ant Task for compile JasperReport source file 2002-06-24 02:07 Hi, Teodord, I have finished the Ant task for compiling JasperReport xml file. The code is sent directly to your hotmail email account. This task inherits the ant's Javac task thus allow all attributes and elements of the javac. However, It adds two new attributes, saxdriver and codedir. saxdriver="org.apache.xerces.parsers.SAXParser" //to specify approiate XML parser; if not specified, would use "org.apache.xerces.parsers.SAXParser" as the default. codedir="... //to specify the directory to generate the expression java code and compiled class files Except attribute srcdir, destdir, and nested element src, all the other attributes or elements are the same to the javac task. The srcdir attribute and src nested element of this task are used to describe the original JasperReport xml layout files while the destdir attribute is used to tell the task where to generate the Xxx.jasper files. The base of the generated jasper file name would be the same as the base of the source file name. That is, a source file of the name <srcdir>/abc/def/xyz.xml would generate a destination file of <destdir>/abc/def/xyz.jasper. The same to the javac, if the destdir is not specified, the jasper file would be generated at the same directory as the source file. Note that this task does not limit the source file extension to have to be "xml". It can be any extension as long as it is a leagal Jasper Report layout file. To use this task, the ant classpath has to include jasperreports.jar and all those jars used by the jasperreports.jar plus jakarta ORO regular expression library (the newest verion jakarta-oro-2.0.6.jar) which is used by this task. Example: In the ant's build.xml <taskdef name="jrc" classname="org.apache.tools.ant.taskdefs.JasperCompileTask"/> ... <target name="compile.jasper"> <jrc srcdir="." destdir="./jasper" codedir="/tmp"> <include name="reports/**/*.xml"/> </jrc> </target> This would compile all JasperReport source xml file under directory reports/ to directory /jasper as JasperReport Xxx.jasper files. I have to admit that I am not an Ant expert, but the code seems works fine. Please take a look and comments are welcome. If it is ok to you, I would contribute it back to the JasperReport project. Henri Chen henrichen@infoshock.com.tw By: Teodor Danciu - teodord RE: Ant Task for compile JasperReport source file 2002-07-23 02:29 Hi, I haven't got the chance to test it, but if everything is OK it will be included in the next version. Thank you, Teodor By: Maurice C. Parker - mauricevineyard RE: Ant Task for compile JasperReport source 2002-07-23 06:09 Teodor, Have you considered moving the source tree into your sourceforge CVS repository yet? It would make it much easier for people to help you with that aren't your highest priority. For example this feature is very important to me and it was important enough to Henri that he wrote it. If it was in CVS I would have access to the source code and could test it and offer feed back. This would increase the quality of this feature prior to the next release and would make it more likely to be included. This doesn't mean you automatically give us access to the CVS repository. It just means we would have a central code location that can work from, make patches on, and have you merge. Of course, if you have any intentions of building a team then moving to CVS is very necessary. -Maurice By: Teodor Danciu - teodord RE: Ant Task for compile JasperReport source 2002-07-23 07:33 Hi, You're absolutely right! I'll do it first thing after returning from my holidays. We'll talk about it in august. Thank you, Teodor By: Maurice C. Parker - mauricevineyard RE: Ant Task for compile JasperReport source 2002-07-22 21:14 Teodord, is this going to be distributed with JasperReports? I need the Jasper Ant task for the work we are doing to use JasperReports as a View from WebWork (http://www.opensymphony.com/webwork/). Henri, if this isn't going to be distributed w/JasperReports could you send me the source so that I would be able to use it? Thanks! -Maurice By: Henri Chen - henrichen RE: Ant Task for compile JasperReport source 2002-08-02 02:45 Hi, Maurice, No problem. If you need the source now, just pass me your email address. The task has been working for me. Please reply to my email directly, I check this forum every one to two weeks. Henri henrichen@infoshock.com.tw By: Henri Chen - henrichen RE: Ant Task for compile JasperReport source 2002-12-03 20:21 Hi, I keep getting requests on this Ant task code, thus I decided to upload the code to Patch area. If anyone interested about it; then he/she can get it here. (The patch area) http://sourceforge.net/tracker/?group_id=36382&atid=416705 Henri Chen henrichen@infoshock.com.tw By: Bernd Proissl - berndproissl RE: Ant Task for compile JasperReport source 2002-07-11 02:07 Hi Teodor, I tried to use Henri's code but unfortunately id needs public access to method JRClassGenerator.generateClass(jasperDesign). Can you change this method to public? Thanks Bernd By: Teodor Danciu - teodord RE: Ant Task for compile JasperReport source 2003-04-14 13:03 Hi, After months, we finally have an Ant task included in the main distribution. Many thanks to Henri Chen and Kees Kuip for their patches. Thank you, Teodor
  6. By: Eric Everman - eeverman Align Image Option of Clip Only? 2003-04-14 09:18 Hi- I imagine there is a technical reason for this, but why is it that the new Align Image option can only be used when the scale option is set to "Clip"? When the image is clipped, I *know* (ok, almost know) the image size and so need the alignment feature less. Its when I don't know the image size that I really need this feature to allow things to line up... Thanks for the new version, I'm looking forward to trying it out! Eric Everman By: Teodor Danciu - teodord RE: Align Image Option of Clip Only? 2003-04-14 11:56 Hi, The image alignment is also working for the "RetainShape" scale type (or at least it should). Check the "images" sample. It does not make sens for the "FillFrame" scale type. The image is aligned inside the area specified by the x, y, width and height attributes of the corresponding report element. What exactly does not work or what did you expect from this image alignment functionality? Thank you, Teodor By: Eric Everman - eeverman RE: Align Image Option of Clip Only? 2003-04-14 12:03 My apologies - I had not had a chance to try the image align feature. I was posting in response to the release notes: ============= - "hAlign" and "vAlign" attributes added to the "image" element to allow image alignment when scaleImage="Clip"; ============= Very cool - I can't wait to use this for retainShape. Thanks again, Eric Everman By: Teodor Danciu - teodord RE: Align Image Option of Clip Only? 2003-04-14 12:42 Hi, Then it is me should apologies. The notes should been more precise. I hope the new feature is what you need. Thank you, Teodor
  7. By: Gallot Dominique - zovi PrintOrder horizaontal. Any date? 2003-04-14 07:52 I just discover that teh printOrder = horizontal is not yet implemented, JRHorizontalFiller is just an extend of JRVerticalFiller Anybody have a release date of the feature? I took a look at the code, but it seems a hard task to do it! Regards, Dominique
  8. By: Wolfgang - javabreak JRXlsExporter 2003-04-14 07:00 Hi, when exporting a report to XLS we get the following problem. Numbers are always exported as String (see Line 622 JRXlsExporter.java). In Excel we must manually convert the columns to numbers to use the columns in forumulas. In POI you can use setCellValue(double) to tell excel that this is a number. My proposal know is the following: Try to convert the text to Double, if this is ok then call setCellValue(Double.doubleValue()) otherwise use the original method. Am I on the right way? Thank you Wolfgang
  9. By: Eric Tan - neltan Sum java.util.Date ? 2003-04-13 19:44 How can I sum the java.util.Date ? Data are in HH:mm:ss format. Because I get error: 1. Only variables that hold java.lang.Number compatible values can be used to calculate the Count, Sum, Average, Standard Deviation or Variance. at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497) By: Teodor Danciu - teodord RE: Sum java.util.Date ? 2003-04-14 02:04 Hi, My question to you is how would you sum up two java.util.Date values in general? What should be the result of summing up August 15th 2001 with November 21 2003? Thank you, Teodor
  10. By: Tran Nguyen - ntbtran Display Unicode with TTC font using JR 2003-04-10 02:24 Does JasperReport support to use TTC font (i.e MSGothic.ttc) to display Japanese (Unicode) in Pdf-report ?? If I'd like to generate a Pdf-report in Japanese with JasperReport (and design with iReport tool), what should i do? Any other way ? I'm trying to use msgothic.ttc font with the pdfencoding BaseFont.IDENTITY_H, but the following exception thrown out (even though i already copy that ttc font to my current project directory): " Compile time : 2142 Filling time : 15990 com.lowagie.text.DocumentException: Font 'MSGOTHIC.TTC' with 'Identity-H' is not recognized. at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source) at dori.jasper.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1009) at dori.jasper.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:346) at dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:295) at dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:217) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:135) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:117) at webreportdemo.ReportManager.generateReport(ReportManager.java:82) at webreportdemo.ReportManager.main(ReportManager.java:146) NESTED BY : dori.jasper.engine.JRException: PDF Document error : UnicodeReport at dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:304) at dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:217) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:135) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:117) at webreportdemo.ReportManager.generateReport(ReportManager.java:82) at webreportdemo.ReportManager.main(ReportManager.java:146) " Looking forward any ideas from you. Thanks, TranNguyen By: Tran Nguyen - ntbtran RE: Display Unicode with TTC font using JR 2003-04-10 02:37 I already make a test to generate a PDF file (with Japanese characters displayed) using iText library directly (use msgothic.ttc). The test runs well. I dont know why i couldn't do with JasperReport. Any settings need more ? By: Paulo Soares - psoares33 RE: Display Unicode with TTC font using JR 2003-04-10 02:45 I suppose you have mapped the font inside the collection "msgothic.ttc,0". By: Tran Nguyen - ntbtran RE: Display Unicode with TTC font using JR 2003-04-10 19:48 Dear Paulo Soares, thank you very much. I've just tried to do as what you say which i used to think that it might be not a correct syntax (adding "msgothic.ttc,0" in xml report file), but that's great that my problem are solved. Thanx again for your supporting idea, TranNguyen
  11. By: Ruben Misrahi - rnmisrahi Dynamic Groups 2003-04-10 10:52 Is there a way to inhibit groupings (summaries) based on parameters? I mean to include or not include a band based on a parameter By: Teodor Danciu - teodord RE: Dynamic Groups 2003-04-10 12:51 Hi, There is a <printWhenExpression> available at <band> level. I hope this helps. Teodor By: Ruben Misrahi - rnmisrahi RE: Dynamic Groups 2003-04-10 14:55 Great. This is better than paid tech support! Thanks Teodor.
  12. By: prakash - prakash_p_23 NoClassDefFoundError :dori/jasper/engine/fill 2003-02-11 01:24 i am unable to get soln to this Problem.Following is stack trace Error: 500 Location: /servlet/ReportGenrator1 Internal Servlet Error: java.lang.NoClassDefFoundError: dori/jasper/engine/fill/JRVerticalFiller at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:138) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:348) at ReportGenrator1.doGet(ReportGenrator1.java:79) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:498) By: Mirko Wawrowsky - mawawrowsky RE: NoClassDefFoundError :dori/jasper/engine/ 2003-04-03 06:22 I have the exactly same problem with websphere. Did anyone solve this? java.lang.NoClassDefFoundError: dori/jasper/engine/fill/JRVerticalFiller at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:138) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:348) at tsystems.its.maysis.web.ReportAction.perform(ReportAction.java:90) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(Compiled Code) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(Compiled Code) at com.ibm.servlet.engine.webapp.IdleServletState.service(Compiled Code) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(Compiled Code) at com.ibm.servlet.engine.webapp.ServletInstance.service(Compiled Code) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Compiled Code) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(Compiled Code) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(Compiled Code) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(Compiled Code) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(Compiled Code) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(Compiled Code) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Compiled Code) at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Compiled Code) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(Compiled Code) at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(Compiled Code) at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(Compiled Code) at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(Compiled Code) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(Compiled Code) at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(Compiled Code) at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled Code) By: Tony Zahn - tzahn RE: NoClassDefFoundError :dori/jasper/engine/fill 2003-04-03 10:49 I have the same problem. I've checked my classpath, and it's got jasperreports.jat, itext-0.96.jar, and all the jakarta commons .jar files. I've got no ideas what's going on here. I'm running on a Solaris 8 machine, using JRun. I've gotten the compile script from the WebApp sample to work OK, but I'm getting this error on pdf.jsp. It looks like some other people have gotten this problem, are you running anything similar systems-wise? By: Tony Zahn - tzahn RE: NoClassDefFoundError :dori/jasper/engine/fill 2003-04-03 10:47 I have the same problem. I've checked my classpath, and it's got jasperreports.jat, itext-0.96.jar, and all the jakarta commons .jar files. I've got no ideas what's going on here. I'm running on a Solaris 8 machine, using JRun. I've gotten the compile script from the WebApp sample to work OK, but I'm getting this error on pdf.jsp. It looks like some other people have gotten this problem, are you running anything similar systems-wise? By: Teodor Danciu - teodord RE: NoClassDefFoundError :dori/jasper/engine/fill 2003-04-03 12:05 Hi, It appears that a possible solution for this is to recreate the jasperreports.jar file like indicated in the patch here: http://sourceforge.net/tracker/index.php?func=detail&aid=640874&group_id=36382&atid=416705 I would like some feedback on this issue. Thank you, Teodor By: Mirko Wawrowsky - mawawrowsky NoClassDefFoundError :dori/jasper/engi SOLVED 2003-04-08 01:36 I found out that NoClassDefFoundError appears if no connection to X11 could be established. After starting the servlet engine, when the awt Toolset is initialized, an error message comes up that the connection to the X11 server is not possible. If one tries a second time *without restarting the servlet engine* the misleading NoClassDefFoundError appears. So if awt and x server cowork correctly the NoClassDefFoundError disappears. Mirko By: Tony Zahn - tzahn RE: NoClassDefFoundError :dori/jasper/engine/fill 2003-04-03 14:05 Teodor, I changed the line in the build XML from <javac srcdir="./src" destdir="./classes" debug="true" optimize="false" deprecation="false"> to <javac srcdir="./src" destdir="./classes" debug="true" optimize="false" deprecation="false" encoding="iso-8859-1"> and rebuild with "ant jar", but I'm still getting the same error. Could it make any difference that I'm using JDK 1.2.2 (I have to, that's what my version of JRun supports)? Also, I'm building on my workstation (winXP), and copying the jar to the solaris machine, which is how I've been building all my servlets, so that shouldn't make any differences, but I figured I'd mention it just to be safe. By: g dantas - gsdantas RE: NoClassDefFoundError :dori/jasper/engine/fill 2003-04-10 14:26 I have the same problem running JDK 1.4 and SuSe. The got a solution by setting the JVM parameter -Djava.awt.headless=true
  13. By: Navaneetha Krishnan J - navaneethanj Tips to invoke jasper reports faster. 2003-04-10 08:31 Hi, I am using following code to generate the JasperPrint object. This code taking 10 secs to execute. Is there a better way to do the same? Thanks for your help in advance. String designFileName = rip.getDesignFileName(reportName); String query = rip.getQuery(reportName); JRDataSource jrds = null; Statement stmt = null; ResultSet rs = null; Connection conn = null; dori.jasper.engine.JasperPrint print = null; try { String compileFileName = designFileName + ".jasper"; Class.forName("org.gjt.mm.mysql.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost/MyDB","",""); if(query == null || query.trim().equals("")) { print = dori.jasper.engine.JasperFillManager.fillReport(compileFileName, null, conn); } else { stmt = conn.createStatement(); rs = stmt.executeQuery(query); jrds= new JRResultSetDataSource(rs); } JasperCompileManager.compileReportToFile(designFileName, compileFileName); print = dori.jasper.engine.JasperFillManager.fillReport(compileFileName, null, jrds); return print; Thanks & Regards Navaneethan By: Teodor Danciu - teodord RE: Tips to invoke jasper reports faster. 2003-04-10 09:18 Hi, Question: Why are you compiling the XML design every time? Does your report template change with every execution? If not, you can produce the .jasper file at design time, just like you compile your usual .class files and then use it over and over again. The report compilation process is time consuming and should be avoided. Even if you need to let your users the possibility to define their own report templates, or alter them before filling with data, you should provide them with a way to define those templates and store them in .jasper format for later use. This way you can avoid compiling them every time as I'm sure the users will prefer to reuse already defined templates instead of redefining them over and over again. I hope this helps. Teodor
  14. By: Mark Clarke - mxc4 Java Web Start and jasperreports 2003-04-07 14:19 Hi all, I am writing a java web start app that uses jasperreports. I have a single jar file to which I add the jasperreports.jar. I also add the relevant other libraries. (I may be missing one.) When I run the jar from within the ide all works fine. When I run it as via java web start I get the message SAX2 driver class org.apache.xerces.parsers.SAXParser not found. I have cehcked and the contents of the xercesImpl.jar file have been added to the java web start jar. If anyone has any ideas please let me know, Tia Mark By: Adrian Jetzer - tripletuned RE: Java Web Start and jasperreports 2003-04-10 07:25 Mi Mark! I've discovered the same problems. So I haven't packed alle the necessary jars to one singel jar. Noe I load all the jars separately to the client. That mean, I have signed all the Japser-Jars, and put them one by one in the *.jnlp file.... Greez, Adrian
  15. By: Tony Kay - tkay Different Fonts in PDF and on Printer? 2003-04-10 03:04 When I generate my Report using PDF, everything works fine. The correct fonts are used, bold and underlined items are displayed correcty. I also use a font for barcode, which also works fine. The problem is, when i directly send the report to the printer, the printer's native fonts seem to be used. No bold effects are printed and the Barcode is als substituted by a printer-native font. Is there a way to use the same fonts for printing as for the PDF-generation?
  16. By: Jackie Manning - jmanning Option to print without printDialog 2001-12-04 07:11 Great work! We are trying to replace Crystal Reports with a java report writer in our application and JasperReports is looking very good. So far, Subreports look like the only missing piece that we need. In my app we will be printing batches of reports, always to the default printer. Having the printDialog popup for each report is not really practical. I have commented out the "if (printJob.printDialog())" statement in the JRPrinter.printPages method and it works perfectly. How about adding a printDefault method or a printPages method/methods with a boolean argument option to show/not show the printDialog? Thanks again By: Jackie Manning - jmanning RE: Option to print without printDialog 2001-12-04 07:12 By the way, I would be happy to do this myself and send you the changes. By: Teodor Danciu - teodord RE: Option to print without printDialog 2001-12-04 22:59 Hi, You are perfectly right ! I'm sure many users will want to bypass the print dialog window. In the future version I will provide a way to avoid displaying this window. Thanks, Teodor By: Tony Kay - tkay RE: Option to print without printDialog 2003-04-04 03:23 As far as I have found out, there are two ways now to print a Report: - Print it to the default printer - Print it to a printer selected by the user (PrintDialog) I would need one more option, to pass the printer to Jasper. Something like JasperPrintManager.printReport ("reportname","\serverprintername"); Is something like this available? thx, Tony By: Teodor Danciu - teodord RE: Option to print without printDialog 2003-04-04 08:05 Hi, If you are using JDK1.4, you can print to a specific network printer with the Java Print Service API. There is a sample "printservice" provided with JasperReports that shows hot to use the JRPrintServiceExporter. Thank you, Teodor By: juan david vergara perez - jvergara RE: Option to print without printDialog 2003-04-07 12:12 i've got another idea. The pdf exporter manipules an PdfWriter Object. You can add javascript code to pdf format using this pdfwriter. in this way the follow line prints the document in the printer default, PdfAction jAction = PdfAction.javaScript("this.print(false, 0, this.numPages-1, true);r", pdfWriter); pdfWriter.addJavaScript(jAction); and the next line shows the printDialog box PdfAction jAction = PdfAction.javaScript("this.print(true, 0, this.numPages-1, true);r", pdfWriter); pdfWriter.addJavaScript(jAction); By: juan david vergara perez - jvergara RE: Option to print without printDialog 2003-04-07 13:15 i've got another idea. The pdf exporter manipules an PdfWriter Object. You can add javascript code to pdf format using this pdfwriter. in this way the follow line prints the document in the printer default, PdfAction jAction = PdfAction.javaScript("this.print(false, 0, this.numPages-1, true);r", pdfWriter); pdfWriter.addJavaScript(jAction); and the next line shows the printDialog box PdfAction jAction = PdfAction.javaScript("this.print(true, 0, this.numPages-1, true);r", pdfWriter); pdfWriter.addJavaScript(jAction); By: Tony Kay - tkay RE: Option to print without printDialog 2003-04-10 03:00 Thanks, Theodor. Your solution was exactly what I needed.
  17. By: ryanwu - ryanwu I need help in AIX RS6000 (Websphere 4.01) 2003-04-10 01:34 Hi Everyone.. I deploy a war to webphere 4.01 but I get below exception.. <br> [2003/4/10 15:23:03:191 CST] 17d1e334 WebGroup X Servlet Error: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:77) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java(Compiled Code)) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:72) at dori.jasper.engine.fill.JRBaseFiller.<clinit>(JRBaseFiller.java:175) [2003/4/10 15:24:02:706 CST] 17d1e334 WebGroup X Servlet Error: dori/jasper/engine/fill/JRVerticalFiller: java.lang.NoClassDefFoundError: dori/jasper/engine/fill/JRVerticalFiller [2003/4/10 15:24:03:791 CST] 17eb6334 WebGroup X Servlet Error: dori/jasper/engine/fill/JRVerticalFiller: java.lang.NoClassDefFoundError: dori/jasper/engine/fill/JRVerticalFiller </b> if anyone have successful experience depolying to Websphere 4.01 in AIX... please tell me what can I do..... or I can't use JasperReport to render PDF report in AIX?? By: Adrian Jackson - iapetus RE: I need help in AIX RS6000 (Websphere 4.01 2003-04-10 02:04 Two possible solutions: 1) If the IBM JVM shipped with Websphere supports 'headless' operation, then use that. You'll need to check the documentation for the JVM to find out what the settings are, though it may be the same as Sun's 1.4 JDK if it's supported: -Djava.awt.headless=true 2) Install xvfb, which effectively simulates an X Server on a headless machine. It's open source, so no cost involved, just the extra admin issues involved with running extra software.
  18. By: ryanwu - ryanwu JasperReport on AIX (RS6000) 2003-04-10 01:43 is there anyone deployed jasperreport webapp to AIX successfully? or like Jasper on Solairs ,there will be many problem such like run jasperreport can't without X Server?
  19. By: Dejan - dnikolov chart with dataset? 2003-04-09 23:53 Can somebody show me the example of chart connect with dataset?
  20. By: Toni Charlot - tonicharlot fonts JRGraphics2DExporter 2003-04-09 19:02 I'm having a serious font problem. I'm exporting the report as a png graphics as well as pdf. The pdf looks find with fonts and all but the png does not have the correct fonts. redhat8, resin. I have the fonts installed on the system as well as in the ../jre/lib/fonts directory, as well as in my class path. Any hints. I search the list and forums but apparently no one has encountered this yet. Thank you for a great, evolving product.
  21. By: Adrian Jackson - iapetus Prevent group footer starting new page? 2003-04-08 08:44 I'm sure I'm missing something obvious, but is there any way to prevent the group footer from starting a new page? If the group footer would normally be on its own at the start of the new page, then I'd rather bring one of the lines from the end of the previous page onto the new page as well. On a related note, is there any way to get a text field to not display duplicate entries *except* as the first detail row on a new page? By: Teodor Danciu - teodord RE: Prevent group footer starting new page? 2003-04-08 12:13 Hi, For the second issue, use isPrintRepeatedValues="false" for you text field. For the first one, I'm afraid this is a tricky one. You have to know beforehand how many rows there are in your group to be able to decide to transfer some of them to the next page, so that the group footer does not get lonely. Note that page breaks can be introduced only using the isStartNewPage="true" at group level. So at least a special dummy groups has to be introduced. Very tricky... but doable... Thank you, Teodor By: Adrian Jackson - iapetus RE: Prevent group footer starting new page? 2003-04-08 16:46 The second one isn't quite that easy, I'm afraid. ;) I've already got isPrintRepeatedValues="false" in there. This does half of what I want, and doesn't print repeated values. But I *do* want to see those values when they appear in the first row of a page, so that I don't have to flip back to the last page of a printed report to see what I'm looking at. Is there any way to find out whether a row is the first one on a page? If there is, then there's a simple (if slightly messy) solution - use two fields, one of which has isPrintRepeatedValues="true" and prints only on the first line of each page, and one of which has isPrintRepeatedValues="false" and prints on every line *except* the first of each page. By: Teodor Danciu - teodord RE: Prevent group footer starting new page? 2003-04-08 20:44 Hi, Have you tried isPrintInFirstWholeBand="true"? Check the "Quick Reference" for details. Thank you, Teodor By: Adrian Jackson - iapetus RE: Prevent group footer starting new page? 2003-04-09 03:41 Thanks for the help: almost there now. :) This works in most cases, but where a band from the previous page overflows onto the next page (which I'd actually like to avoid if possible) the first *whole* band still doesn't display the field. Is this a bug, or the intended functionality?
  22. By: Mirko Wawrowsky - mawawrowsky XLS export doesn't work 2003-04-09 01:46 Using JasperReports 0.4.5 Tomcat 3.3a I am generating a report in HTML, PDF and CSV form successfully. But generating an XLS file does not work. Excel cannot open the file saying it could be a wrong version, not an excel file or corrupt. Any idea what could be going wrong? Anyone who succeeded exporting to XLS using JR 0.4.5? Here comes my code: File reportFile = new File( getServlet().getServletContext().getRealPath( "/reports/serviceReport.jasper")); Map parameters = new HashMap(); parameters.put("ReportTitle", reportTitle); parameters.put("BaseDir", reportFile.getParentFile()); try { JasperReport jasperReport = (JasperReport) JRLoader.loadObject(reportFile.getPath()); JasperPrint jasperPrint = JasperFillManager.fillReport( jasperReport, parameters, new ServiceReportDataSource(((ReportForm) form).getResultSet())); ByteArrayOutputStream reportOutputStream = new ByteArrayOutputStream(); JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, reportOutputStream); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.exportReport(); byte[] bytes = reportOutputStream.toByteArray(); response.setContentType("application/x-msexcel"); response.setContentLength(bytes.length); ServletOutputStream servletOutputStream = response.getOutputStream(); reportOutputStream.writeTo(servletOutputStream); servletOutputStream.write(bytes, 0, bytes.length); servletOutputStream.flush(); servletOutputStream.close(); } catch (JRException e) { log.error(e.toString()); } catch (IOException e) { log.error(e.toString()); }
  23. By: N Kumar - kumarn3 Subtracting Variables 2003-04-07 06:45 Hi, Is there a way to subtract Variables? I want to do the following: $F{TOTAL} - ($F(COL1) + $F(COL2)) Thanks By: Gregory A. Swarthout - gswarthout RE: Subtracting Variables 2003-04-07 08:52 Ya, but since they are objects, you'd have to convert them to primitives first. If they were Integers, the code could look like this: new Integer($F{TOTAL).intValue() - ($F{COL1}.intValue() + $F{COL2}.intValue)) By: Gregory A. Swarthout - gswarthout RE: Subtracting Variables 2003-04-07 08:54 Ya, but since they are objects, you'd have to convert them to primitives first. If they were Integers, the code could look like this: new Integer($F{TOTAL).intValue() - ($F{COL1}.intValue() + $F{COL2}.intValue)) By: N Kumar - kumarn3 RE: Subtracting Variables 2003-04-07 15:12 Thanks , but the Variables are using class="java.math.BigDecimal" By: Adrian Jackson - iapetus RE: Subtracting Variables 2003-04-08 08:36 Then it's even easier. What you want is something like: $F{TOTAL}.subtract($F{COL1}).add($F{COL2}) It's all there in the Javadoc for BigDecimal...
  24. By: Tullio Bettinazzi - tullio0106 JRDesignExpression 2003-04-08 04:23 I use API to construct my report. I need to set the Evaluation time but I didn't find any method. Could someone help me ? TIA Tullio By: Teodor Danciu - teodord RE: JRDesignExpression 2003-04-08 05:21 Hi, It's the JRDesignTextField.setEvaluationTime(byte) method that you need. I hope this helps. Teodor
  25. By: Tullio Bettinazzi - tullio0106 JDJ Nomination 2003-03-25 04:02 The JDJ Nomination process is opet at http://www.sys-con.com/java/readerschoice2003/ Could someone post a description of Jasper ? TIA Tullio By: Teodor Danciu - teodord RE: JDJ Nomination 2003-03-25 05:11 Done. Thank you, Teodor
×
×
  • Create New...