Jump to content
We've recently updated our Privacy Statement, available here ×

martynhiemstra

Members
  • Posts

    144
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by martynhiemstra

  1. Hi All I find this really strange. I am using Java 5. In java 5 Boolean and boolean are both allowed and dont need to be casted. According to jasperreports, the printWhen expression must contain valid Java code and must return a boolean. Then why on earth must the print when expression generate Boolean and not boolean. For example: $F{FieldName} != null (Mot allowed) new Boolean($F{FieldName} != null) (Is allowed) That is really strange behavior because in Java 5 it would be $F{FieldName} != null (Is allowed) new Boolean($F{FieldName} != null) (Is allowed) Could someone explaing this please?
  2. Hi All Jasperreport 2.0.2 contains a new class named JROriginExporterFilter. I looked at the javadoc but there is no information on what the methods do. I only want to export the detail band when doing an excel export. Which method should I use? addOrigin, removeOrigin or isToExport origin? Also how do I get a certain origin from a compiled report? I have compiled a report into a JasperPrint object. I saw methods like getOriginsMap and such. How do I get the detail band? Thanks in advance Martyn
  3. Using == to compare strings isnt badness its just plain stupid. It will almost always return false because you are comparing memory locations and not the string contents
  4. I was wondering. When I export my report to excel, is it possible to only export the detail band? If not, maybe this is a good idea to create. Often excel is only used for information and then headers arent neccessary in the reports.
  5. I downloaded it without any problems. Did you read the words in red saying you need to be logged in? If you are logged in then check your browser. I can indicate that it is a problem on your end.
  6. I think you got the whole concept of jasperreports wrong. With Jasperreport you supply a datasource and a query and you display it's data. If you had a class that loads values from the database and you want to display those values half way in a report? You cant't. If you want to display a list of values then create a collection of those values and then pass a collectiondatasource to the report, but loading values in the middle of a report and showing them is impossible or you need to create a subreport but even then you need to load the values before the main report is created and then pass the list of values on to the subreport in the form of a parameter.
  7. You can only supply 1 query. If you want to supply more then you need to create your own Java code that loads the report, updates the query before compilation and then compiles and exports the report.
  8. When you compile the report a .java file is created. Can you check to see if a serialuid is created in that file? If so could you post it here?
  9. What is the exact problem? Cant the nullpx image be found by the report? By the way try to use absolute urls. exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../../servlets/image?image="); Relative url's are a bi*ch. The request object has many tools that allow constructing the correct image link by constructing the hostname and context path.
  10. Could you please improve your english. I did not understand what you meant with: My requirement is to include the different queries in the same xml itself or whether there is another approach What I can advise is not to include the queries in your xml datasource. A datasource is a source of data and not what created the data. Instead ensure that your search results generate the same fields (Columns).
  11. That non english characters appear as ?????? is just a encoding problem. You need to learn how to set encoding in your jsp pages. Try this link: http://www.theserverside.com/discussions/thread.tss?thread_id=28944 Post edited by: martynhiemstra, at: 2007/07/27 08:38
  12. Load your reports by putting them in your classpath. Then load them with your ClassLoader. Then create a jasperprint and then let the JRViewer display the report. Then there is no need for a outputstream what so ever, JRViewer will just appear in front of the applet.
  13. Make sure you are using the same version of jasperreports when creating your reports and where your load your .jasper files. This means you need to take the jasperreport.jar file from the ireport directory and put that file in the classpath of the application that is loading your jasperreports.
  14. No wonder. You are putting two totally different beans into your collection. list.add(customerList); list.add(studyList); You are putting study and customer beans into the same list which is just screaming for problems in jasperreports. There is a field that exists in the study bean and not in the customer bean. If you want to display two different bean lists then create 2 subreports. 1 for each bean and then put those two sub reports in the main report.
  15. Hi All, I am using the JRRtfExporter exporter to export a report to a rtf document. At least something that is readable in Word. I can export my report to pdf and excel but wen I use the JRRtfExporter I see this on the screen. {rtf1ansideff0 {fonttbl {f0fnil sansserif;}{f1fnil Arial;}} {colortbl ;red0green0blue0;red255green255blue255;} {info{nofpages7}} etc etc....a long file I am using the following code: JRRtfExporter exporterRTF = new JRRtfExporter ( ); exporterRTF.setParameter ( JRXlsExporterParameter.JASPER_PRINT, jasperPrint ); exporterRTF.setParameter ( JRXlsExporterParameter.OUTPUT_STREAM, response.getOutputStream ( ) ); exporterRTF.exportReport ( ); When I use the pdf and excel exporter the browser askes me the question if I want to save or open the file but the JRRtfExporter just streams the contents to the screen. I want the browser to stream the file and not display the contents on the screen so our clients can download the rtf file. Thanks in advance, Martyn
  16. Hi Lucian, Thanks for the great input. I think I was using an older version in which somethings havent been solved or implemented yet. I also think that it was easier for me to implement our reportserver because I first saw jasperserver and saw how it could improve for me making it easier to list the points menthioned above. It's too bad I havent got the latest version. I could of cleaned up the jsp pages for you. My boss has assigned me full-time to our own reportserver so I cant help out anymore. I may compain a bit but if I had the time I would really help out. I think we can conclude by saying that you created jasperserver knowing that many people would use it. Creating such a system is always going to suit many people and not suit a few. If you plan a new project in the future, fell free you share it with us developers. I am always willing to help out. Thanks for the input, Martyn
  17. Thank you for your explaination. Please also forgive the bluntness of my first response. I had discovered many difficulties with jasperserver and the frustration I took out on this post. First of all jasperserver is good enough in most standard situations. I needed more and better in some cases. I can explain what I liked and disliked. 1. I hated the fact that nearly every page is POST'ed. If a client presses F5 then the client is asked if they want to repost. This should only happen after a form post but never where simply information is being loaded. I know it's a samll thing but I just dont like it. 2. I hate acegi. It's probaly well implemented but if I look at how many classes you need and how much configuration for the security it's just overkill. It gave me the chills. I used 1 filter class. Just one. It's really easy. If a url starts with /secure/ then only logged in users are allowed to visit the requested page. If the url starts with /admin/ then only administrators are allowed. So simple. 3. The jasperserver code was so static. All the different options under 'Add new' where all hoked in the code as far as a could see. I could be wrong but I got the impression that everything was entangled. I created a modulair system. If I want a new module, I create a new module, add 1 line to the database and the new module is active. The core only contains things like User and Usergroup models etc. For example I creayed a datasource module. It allows other modules to load datasources and use them. This still creates some dependancies for example the jasperreport module relies on the datasource module but it is far less entangled. 4. The fact that mysql must be used as a datasource. I saw mysql queries in the code. Since you use Hibernate I beleive you should use HQL or criteria objects. This will allow the use of Hibernate Dialects. In my situation our development system is running on mysql where as our live system is running oracle. Due to licencing reasons, we cant run oracle on each development system only on a few live systems. This is real easy when using HQL or Critaeria. Each system can use any type of database. 5. The front end was really really bad. I saw the jsp pages and wondered who on earth designed it. They were unclean, no tab spacing (no structure). But the worst thing of all no c:url tags. These means that after each page the a new session would be created if the visitor would have cookies turned of. I replaced all the href's with encased url's. Meaning all the href url's where put in <c:url value="" /> tags. This includes jsessionid to the url. Allowing the session id to be passed to the url keeping the session intact. I also compared the amount of lines of the jasperserver css and my own css file. My css was about 10 times smaller than the css file in jasperserver. You can do alot with css and in theorie you should be able you design your website with css but at a certain point the css file becomes unreadable. I know the code wasnt meant to be altered by others outside jasperforge but for yourself it's really helpfull too. 6. I wanted to stream the output of a report to another website. In short, another website uses frames and we wanted the report to be displayed in the main frame making it look like the report was generated by the website and not jasperserver. This also removed the login procedure of jasperserver. Also clients wouldnt have to click on all those folders to look for the right report. In our situation we have created a url on our website that loads our report from the report server in a certain frame displaying the report on the screen right away. Just the ways clients want it. Fast and easy. 7. By designing our own report server, we have full control of the report server source code. We arent tied down by possible restrictions layed down by jasperserver like the ones defined by GPL and other licenses that apply to jasperserver. Making adjustments is easy in our reportserver. I could make adjustments in jasperserver but there is a chance that updates could undo these changes for example updates in jsp pages. Please consider these points as positive critism that is meant to help out. Please if you have any comments on these points, I would like to hear your thoughts. Post edited by: martynhiemstra, at: 2007/07/09 10:36
  18. I have a beter idea. Just right your own jasperserver. I did just that. It took me 3 weeks and the result is so much beter than jasperforge could ever imagine. It's really fast, it has a much beter and easier to understand security, beter design etc etc. Jasperserver uses hibernate just to execute sql queries. This is just bad. I use hibernate using criteria and HQl allowing my own report tool to run on any database that is supported by Hibernate. It is designed so that it allows modules. Meaning you can plug in modules. For example a datasource module, a jasperreport module, you could even write a excel module that could allow the displaying and editing of excel files online. It's a one time investment but it will really benifite your company.
  19. Hi All I was wandering if this a known bug or if someone else has expierenced this before. I have a report with a group. The group has a header and a footer so it looks like this: group header detail group footer Both my header and footer are always printed. When I view my report I see this: Detail Header Detail Footer Header Detail Footer As you can see a detail is printed before the header. I'm not absolutely sure but I think this is a bug in the jasperreport. Thanks in advance, Martyn Post edited by: martynhiemstra, at: 2007/07/02 09:42
  20. Hi All I am using a mysql connection to display information from the database. I have a String report field that displays 2 mysql values in 1 report field. The first value is 3-4 characters long and the second can be really short or really long (3-200 characters). These values are seperated by a space. For example: 030 testtesttesttesttesttesttest 030 testtest If the joined value becomes too big only 030 is displayed. It seams that if the field value is too long it will cut away everything past the space. I would like to trim the string so that the part of the string that fits within the field is displayed. How can I do this? Thanks in advance, Martyn
  21. Hi All I am suffering from a sudden ConcurrentModificationException that is being thrown when I export my report. I am using custom code and a custom bean to export my data. This worked fine but suddenly one day for no reason I started getting this error. I am the only user who is executing the code. The datasource that I pass to isnt modified after this call. This is the code I use to compile my report: JasperFillManager.fillReport ( jr, parameterValues, beanCollectionDataSource ); This is the stack trace: ava.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449) at java.util.AbstractList$Itr.next(AbstractList.java:420) at com.test.BeanCollectionDataSource.next(BeanCollectionDataSource.java:70) at net.sf.jasperreports.engine.fill.JRFillDataset.advanceDataSource(JRFillDataset.java:856) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:774) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1106) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:763) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:688) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at com.test.JasperReportFactory.createJasperPrint(JasperReportFactory.java:195) The next method in the bean datasource looks like this: Code: public boolean next( ) { boolean hasNext = false; if ( this.iterator != null ) { hasNext = this.iterator.hasNext ( ); if ( hasNext ) this.currentBean = this.iterator.next ( ); } return hasNext; } As you can see there is nothing strange with this method. Has anybody got an idea what is causing this really weird problem? Thanks in advance Martyn Post edited by: martynhiemstra, at: 2007/06/25 09:44
  22. Hi Lucianc I wasnt awear that use of the jdt-compiler.jar prevents compilation to the harddisk. I'll try it immediately. Thanks for your time. Martyn
  23. Hi All I have designed my own web application that runs under tomcat. The web application runs perfectly on 1 machine but on the other machine the reports are trying to be compiled to /root. I dont know what the default behavior should be but compiling a report in a home directory let alone /root is a bad idea. I haven't set the compile directory anywhere so I am assuming that the home directory of the user running tomcat is used to compile a report. How can I set the compile directory when using JasperCompileManager.compileReport ( InputStream ) to for example /tmp Thanks in advance. ------------------ Edit 14:34 1 juni 2007 I have just examined the source code and I have discovered that the default behaviour is that reports are compiled to the home directory -> System.getProperty("user.dir"); Althought each programmer thinks differently I think we can agree that compiling to the users home directory is just plain poor programming thinking. Why not use System.getProperty("java.io.tmpdir") property to get the temp directory. That's what a temp directory is for, for doing such operations. Or File temp = File.createTempFile("jasperreport_",".java"); and then save the java file to that file Please dont see this as a jasperreport bashing, on the contrary I am very grateful that jasperreport exists, but please see this as positive critism. Post edited by: martynhiemstra, at: 2007/06/01 14:43
  24. Hi lucianc, Unfornately I deleted the file so I can't remember which one. I did a new checkout this morning of the trunk and now the compilation error is gone. It's possible it was in the trunk only for a small periode of time. The deprecated warnings are still there. It's possible that's it's my error or a few files in the trunk do have deprecation errors which eventually need to be solved.
  25. There is absolutlety no need to type cast a BigDecimal. When you change a fields property in iReport. it will allow you to do exactly what you want with very little fuss. 1. Set print empty when null 2. Set print format expression Post edited by: martynhiemstra, at: 2007/05/31 11:01
×
×
  • Create New...