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

Telos

Members
  • Posts

    13
  • 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 Telos

  1. That's an interesting idea. Is it possible to return a value that is calculated by Jasper itself (e.g. the height of a band when it is rendered?). If I need to re-evaluate all of the values that control the printWhen expressions for the sub-elements just so I can produce my own return value, then I'm essentially in the same place as I started.
  2. Is there a way to reference a property of one report element in the printWhen expression of another? In particular, I want to not have a page break if a certain subreport is blank (the subreport is composed of several elements each with their own printWhen expressions, and I do not want to duplicate all of that logic in one compound statement just for the sake of the page break)
  3. A slightly ugly solution that comes to mind is to create an intermediate subreport that has only your rectangle and the original subreport. It should have the same datasource as the original subreport, and therefore if the datasource is empty the intermediate subreport (and the therefore the rectangle) won't be shown. Alternatively, if you have a way of determining the size of your datasource you could use that information in the printWhenExpression of the rectangle.
  4. $P{REPORT_PARAMETERS_MAP}.get("myKey")
  5. The behavior you are reporting makes sense, since JRViewer will use the font specified in fontName. Try changing it's value from "Times New Roman" to "Times.ttf"
  6. There are a variety of calls in the Jasper API for filling your report and exporting it to a particular format. Once the selected format is known you can put it in the parameter map that you pass to the method for filling the report (I'm assuming that you're asking how to get a parameter available in the .jrxml) and then use it to call the appropriate method for exporting it. I'll leave you to research the Jasper API to find exactly which fill and export methods you need.
  7. We'd need the errors to give you any specific advice, but at glance I notice that you have an unopened paren right before .intValue(). Also from my experience, autoboxing doesn't always work when compiling jrxml, so you might want to replace intValue()==0?0 with intValue()==0? new Double(0)
  8. A couple of things that I did to make this work for me: 1) Put the fonts in the default package (i.e. at the very top level of the jar). 2) Use the full file name in your text field elements. For example Code:<font fontName="Arial" pdfFontName="arialbd.ttf" size="10" isBold="true"/>(note that in this example I was only worried about the pdf font).
  9. I have a subreport expression that calls into a Java class (to handle selection of the appropriate report based on a few criteria), and it appears that exceptions thrown there are swallowed without any sort of indication that they occurred. In my particular case I fail to receive a DataSource because of a NullPointerException, and I'm using JasperFillManager.fillReport to fill my report and JRSaver.saveObject to export it. I have a lot of code surrounding this subreport expression, so if there is a particular point you'd like to focus on I can provide examples on request. Post edited by: Telos, at: 2008/01/29 22:14
  10. Thank you for the reply. However, after implementing your suggestion the element still displays on the first page of the subreport. Post edited by: Telos, at: 2008/01/29 00:02
  11. I have a parent report whose data source is a list of beans that contain the file names of subreports and their titles. In the detail band I have elements for the title and subreport. In the PageHeader I have an element for $P{title} + " continued" that I want to display ONLY when the detail band overflows. I also tried to define a group with the expression set to $P{title}, but apparently there is no way to have $V{PAGE_COUNT} evaluate per-group for the Print When expression. Can anyone see a way to print $P{title} before each subreport and then $P{title} + " continued" on the top of every page that it overflows on to?
  12. The subreport is actually in the PageHeader. I want it to appear on every page, but it currently is only appearing on the first. If I place the contents of the subreport directly in the PageHeader, then it appears on every page. However, this won't work for me because I need to support more than one header design, which I think I should be able to do by using a SubReport expression to select which subreport to place in the PageHeader. So, is there something in the subreport element I placed in the PageHeader that I need to change to get the contents of the subreport to show up on more than the first page?
  13. I need to generate a report for two different companies, and therefore the page header will differ. I am trying to handle this by using a subreport element in the PageHeader of the parent report, and then relying on the SubReport expression to dynamically select the appropriate header. The selection logic seems to work fine, but I'm now seeing the header on only the first page. If I take the contents of one of these subreports and place it directly in the header, it displays on all pages. Print Repeated values is checked in the subreport element, and changing the value of Using Cache seems to have no effect. Does anyone have any suggestions for other settings that would affect this?
×
×
  • Create New...