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

aklingel

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

aklingel's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. I am having a problem between my dev and prod environments. Both sides seems to have the same code, but I get this in production: Class not found when loading object from URL : file:/mystuff/mycode.jasper The file /mystuff/mycode.jasper DOES exist with global read privileges. What does this error mean? How can I get a more descriptive error message?
  2. I am getting TONS of these messages when generating a PDF with Jasper now: INFO: Overriding bean definition for bean 'stackedAreaType': replacing [Generic bean: class [org.springframework.beans.factory.config.FieldRetrievingFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.beans.factory.config.FieldRetrievingFactoryBean]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] Sep 26, 2011 10:42:57 AM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition Obviously I need to set the log level somewhere, just not sure of the command. Any help is appreciated!
  3. I need to know the name of the file my report is using as it's XML Data Source. Unfortunately, it appears that: XML_DATA_SOURCE REPORT_DATA_SOURCE return object implementations of the actual XML. I don't want that. I just want to know the file name. Can anyone help me with this seemingly simple task?
  4. Thanks very much for your reply. I found an approach that worked, similar to one of my ideas above. First of all, I could NOT get a subreport to return a value to the calling report, and then retrieve that value using getVariableValue from inside a scriptlet. I tried forever, and I just could not get that to work. The value was always null. But it turned out to be unnecessary anyway. Instead, I went with the approach where I attached the same scriptlet to both the master and subreports. The scriptlet has a *class* variable where I can keep a running tally of all the product numbers I encounter in the detail, and this code goes inside the afterDetailEval() method of the scriptlet. Note that I only want this code to run for the subreport, so I do a check to see if a particular detail field, which will never be null, is present. If it's not, I don't run the code. So when that event is called by the master report, the code doesn't run. Now for the part that I learned from the example. The admirable side-effect programming in the example is that there is a line of dimensions 1x1 that contains a call to a custom scriptlet method in the "Print When Expression" property. That's a great idea! So this custom method returns false no matter what, and the line never prints. I did the same thing in the Page Footer band, and this method collects the values from the class variable, retrieves the page number, and stores the results in a hash. Then it resets the class variable so that the products of the next page can be collected. In the Report Summary band, I have another line that will never print, that calls another custom method. All I do here is iterate through a map of product numbers and show all the pages each one appears on. Works like a champ!
  5. I'm using iReport 3.7.6. I'm trying to return a Collection of certain values that have been encountered in the subreport back to the parent report. I have the Collection set up as a variable called "parts" in both the main report and the subreport. Using the "Return Values" box in the Properties of the subreport object, I attempt to set up the destination variable and the subreport variable. The destination variable is no problem. But in the subreport variable dropdown box, the only options are: PAGE_NUMBER COLUMN_NUMBER REPORT_COUNT PAGE_COUNT COLUMN_COUNT My "parts" variable is nowhere to be seen. Why is that? Anyway, it lets me type in the variable name. I test this by typing in a bad name and trying to run. Failed as expected, good. So I type in "parts". I compile and run the main report, runs just fine. Except here is the problem. I have a scriptlet attached to the main report where I want to check the contents of that "parts" variable in the afterPageInit method. It is always null! That means the assignment is not working. I am checking the values in both the subreport and the parent. The "parts" variable has a value in the subreport, but it is always null in the parent. What am I doing wrong? Code: // In the parent report scriptlet @Override public void afterPageInit() throws JRScriptletException { Collection<String> parts = (Collection<String>)getVariableValue("parts"); // parts IS ALWAYS NULL!!! if (parts!=null) { System.out.println("parts size in parent is " + parts.size()); if (parts.size()>0) { Iterator<String> iter = parts.iterator(); String page = getVariableValue("PAGE_NUMBER").toString(); System.out.println("page is " + page); while (iter.hasNext()) { System.out.println(iter.next()); } } } } // In the subreport scriptlet @Override public void afterDetailEval() throws JRScriptletException { Set parts = (Set<String>) getVariableValue("parts"); String part = ""; // Grab all of the parts and put them in a set for (int i=1; i <= 15; i++) { try { part = getFieldValue("Part" + i).toString(); if ((part==null) || (part=="")) { continue; } System.out.println("Adding " + part + " to set."); parts.add(part); } catch (Exception e) { // There is no such part, no need to check the rest break; } } setVariableValue("parts",(Collection)parts); System.out.println("parts size in detail is " + parts.size()); // parts is NEVER null! }
  6. I have a report and subreport for a product catalog. I need to build a table of contents that shows on which pages a particular product number occurs. The example that ships with jasperreports doesn't help me, because in my case, the detail is only known in the subreport. Here's how it works: My datasource is an XML file. I pass a detail section of the XML to a subreport. My predicament is that only the master knows what page it is on, yet only the subreport knows what part numbers are in the detail. I thought I could create a scriptlet with a static variable to collect the parts, and attach that scriptlet to BOTH the master report and the subreport. Unfortunately, when you do this, the main report ceases to call the scriptlet after the detail report first takes control. That would have been perfect if it worked. I tried another method where I passed the page number from the parent report to the subreport. Here is why that doesn't work: The subreport may contain enough information to span multiple pages. Next time the subreport is called, the page counter from the parent may be incremented by more than one because it had to paginate the results from the last subreport call. Fail. I know there must be something that I can do in my situation, but I am really struggling after 8 hours of trying. Can anyone help?
  7. I mean "Install a TrueType font in iReport using the Preferences pane. We are working with font extensions and have them packaged up in a jar file for distribution, but we need the fonts in iReport in order to render the design correctly on the Mac with the fresh install. I suspect the error is an actual Mac OS X error, but it results from using a feature of ireport (adding the font).
  8. We have two Macs with Snow Leopard on them. On one of them, version 3.7.6 runs without an issue. It was, however, upgraded from a previous version. 3.7.6 does not appear to have a Mac installer, however. So when we open the .dmg file on the other Mac, and copy the Jaspersoft Report Designer over to the Applications folder, the application must still think it is on a DMG archive. When we try to install a TT font on that machine, we get the error that the fonts directory (in the App package contents) is on a read-only filesystem. Changing privileges to 777 does not alleviate this issue. Can anybody tell us what we're doing wrong?
  9. Carl, It's your "even worse" scenario. I have a single subreport, and the value is changing within the subreport. The subreport gets broken between the end of one page and the beginning of the next. I want a particular field to print when that subreport overflows onto the next page. Think of an employee record, with a bunch of child records in other tables. There's not enough room on one page to print it all, so I want the employee's name to print at the top of the next page, so that someone randomly opening the report onto that page will know whose data they are looking at.
  10. I am using iReport 3.7.6 to create this report. I have a report based off of an XML file. There is a 2-column master report and it has a detail band with a subreport. I have a field called "Name" in the subreport. I want it to print at the top of every page. Or even at the top of every column. I have tried virtually everything I know how to do. "Print When Detail Overflows" doesn't work, because this setting is in the detail. I sure hope I don't need to create a subreport for every report break I want. I'll have like 4 or 5 subreports. Is there some way to determine when the page has changed, and then use that event in a "Print When" expression?
  11. In a so-far failed attempt to deploy a Helvetica font like the one my Mac uses to a Linux machine, I purchased one and installed it in iReport. Looks like I purchased the wrong font! Once I uninstalled the font from iReport, the problem disappeared. This issue had nothing to do with iReport or any particular version.
  12. Something happened sometime after my upgrade to 3.7.0. Any time I open one of my previously-created reports, all of the words in all of the static text boxes are stretched to the entire length of the text boxes. So the words are all spaced out. The reports still generate normally, but they appear really strange in iReport. Please see the attached image file. I am not on version 3.7.2 with the same results.
  13. I'm using 3.7.2. Thanks for the information Lucian, I'll file a bug report.
  14. I am trying to ensure that the fonts we use in JasperReports are always embedded so that our customers can send the files to a print company. We have purchased a couple of fonts for this purpose: HelveticaLTCom-Roman and HelveticLTCom-Bold. They are TTF files, and have been added to iReport and also in a jar file with a fonts.xml file. However, when we generate a PDF using either iReport or running a java command, there is ALWAYS an additional font called "Helvetica" in the PDF file. To see if it was my problem, I created a simple report with only one static text field in the file, and ran it. The static text field has HelveticaLTCom-Roman assigned to it. Sure enough, both fonts appear in the PDF file in Acrobat when I do File --> Properties. There are NO undefined fonts in the file. Why is JasperReports doing this? It's maddening! I'm certain there is something I am missing. The Linux server on which this is running has no regular Helvetica font, so I couldn't embed it even if I wanted to. I must get rid of it. I also saved PDF output as a .ps file so that I could read it and sure enough, you can see findfont Helvetica in there.
×
×
  • Create New...