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

m00hk00h

Members
  • Posts

    5
  • Joined

  • Last visited

m00hk00h's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hey there! I have an application that compiles a lot of reports as build time and fills them at user requests during runtime. I use the library version of jasperreports as dependency through Maven and just increased the version number. I was prepared for API changes and different behaviour with the new version. However there is one thing I just can't seem to work out... I use a utility package in some "text field"-elements in report designs that use static methods for stuff like formatting or validation. The package is in the same project and after compiling in the same .jar-file as the reports. Example: The problem is that this package or even the classes in my own packages are no longer recognized when trying to compile reports: "de.company.app.utils cannot be resolved" These packages are definitely on classpath of the project. Also, external libraries referenced as Maven dependencies (like Apache commons) are recognized without trouble. Only my own packages in the project are affected. Even when trying to compile directly through the Eclipse plugin or a fresh installation of Jaspersoft Studio 6.4.3 compiling fails with the same error. I've gone through the changelog and didn't find anything relating to this. Please help! Thanks in Advance! UPDATE: The weird behaviour starts kicking in with Version 6.3.1. 6.3.0 works flawlessly!
  2. It's friggin' annoying. As soon as a style template is referenced the performance goes down the drain. Whener I try to modify a text field, add a parameter or save the report Eclipse just stops responding for 40 seconds. My CPU goes up to 30% and stays the whole tim euntil Eclipse becomes responsive again when it suddenly drops back to 0%. I am about to report a bug. And I am surprised that not more people are running into this issue...?
  3. I have a report report.jrxml. All of the resources that the report uses are located in the same directory. Images, subreports and styles, etc. The directory might be: classpath:path/to/report/. All resources are referenced in the report design by filename only - no directories are given. e.g. <imageExpression><![CDATA["logo.png"]]></imageExpression> <template><![CDATA["style.jrtx"]]></template> Reports are compiled by using the maven plug-in. The application is delivered as a single jar file. It is a webapp running on an embedded tomcat (via java -jar app.jar). It not classically deployed and not unpacked into any kind of known directory structure. All resources are loaded directly from the jar. It works fine with images referenced this way. It doesn't work at all for styles or subreports. JasperReports expects me to implement the FileResolver to help it find resources it cannot resolve itself. Problem is that the return type is file which does not support loading files from archives... And this is where I'm stuck. Why can the Jasper engine find images this ways but not other resources? What can I do now? Any ideas?
  4. Lucian, thank you for trying to help me. I didn't know that expression classes were deprecated. Your answer didn't help me directly, but the word "depricated" somehow inspired me to go through the code line by line and indeed, I found the source of all the errors I encountered. Somebody thought it was a good idea to have a helper to compile the reports. That class was inside a package that a) did not comply with company naming rules and b) was easily mistaken for a part of the JR API ("JRCompilerHelper"). That package used it's own depency on JR - version 1.0.3(!). Guess that was long before said naming rules were introduced. So basically, all reports have been compiled by the 1.0.3-compiler. I kicked the package out and re-wrote the functionality directly into the app. Everything's working as intended now. Thanks again!
  5. In my report, I define an image in the following way: -Image expression: new File("./path/to/image.jpg") -Expression class: java.io.File When I save the report design using iReport 5.1.0 the resulting jrxml image expression looks like this: <imageExpression><![CDATA[new java.io.File(".... What I want to have is this: <imageExpression class="java.io.File"><![CDATA[new File(".... Of course, when I close and open the report again in iReport, the field is reset to "java.lang.String". Is there something I am missing? Background: Ever since jasperreports 4.5 (?) I have had trouble with image expression paths, giving me a "byte data not found at location"-exception and producing empty PDFs with my Java application, that fills and compiles the reports and exports them as PDF. With jasper 5 I don't even get the exception any more, PDFs are just empty. Using a "new File()" was a workaround I could live with and that worked very well, but now it's just a pain in the butt: I have to open all edited jrxml files in an editor and add the image expression class tag myself (search -> replace). The reports compile and export just like they used to afterwards, as long as I don't change something using iReport 5.1.0 - because that removes the tag and Jasper defaults back to String.
×
×
  • Create New...