Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

cmatthews's Achievements


Contributor (5/14)

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

Recent Badges




Community Answers

  1. What you are asking about is possible with jasperReports. It's a failry complicated scenario to understand based on the amount of information in your post but it sounds completely doable. Personally I approach this sort of thing with a base report, lets say a report called "REPORT_SELECTOR.jrxml" ... The report selector report will do a base query against your persons and letter type and will call in the appropriate subreport. If you have 5 different letter types then you would have 5 possible subreports that could dynamically be called by the parent report. I will put two samples in the cobe block for you as ideas, the first code block is sample SQL from the "REPORT_SELECTOR.jrxml", the second code block is the subreport object subreport expression. The samples obviously will not fit your need exactly but should give you ideas to do what you need. In my case the parent report has a 1px tall detail section and the only thing on the report is a subreport element. The full page reports are called by the subreport element and I can mix and match reports into a single PDF output. Hope this is good food for thought, Good luck Clark Code: Post Edited by cmatthews at 09/16/2012 17:35
  2. Yes, many ways to do this sort of thing ... Hard to say exactly where you would want this "if" block but a common place for it would be in the band "Print When Expression" ... Something like this... If the value was not equal to zero then the section would be hidden... Your question is very open to many different answers. But I hope this helps.. Code:new Boolean({yourParameter}.intValue() != 0)
  3. I think you need something more like the one of the samples in the code block I provided, Good luck, Code:new Boolean( $F{ELAPSED_MINUTES}.intValue() > 3 && $F{ELAPSED_MINUTES}.intValue() < 5 )Although, this looks more like it may be okay if,new Boolean($F{ELAPSED_MINUTES}.intValue() == 4)However either may work...
  4. A way of doing it... Showing how performing a calc against a variable of one type results in a total of another data type. ($V{SUM_Sales}.equals( new BigDecimal(0))) ? new Double(0) : new java.lang.Double( ($V{SUM_Discount}.doubleValue()) / ( $V{SUM_Sales}.doubleValue()) )
  5. The report element for page/column breaks is "Break", when you put it on the page it will ask you which type you want to use. In older versions, like 3.0, there isn't an element you just need to put the break in the xml yourself.
  6. Hard to tell exectly because I don't have your data sources but when I look into the subreport query I see a couple things that are likely to be the problem. Like this, and CASE WHEN $P{job_number} = 0 THEN j.id > 0 ELSE j.id = $P{job_number} END All the parameters you want used in the query need to be $P!{job_number} ... having the ! (bang) ... I notice you have some with the bang and some without. The ones without are not being replaced with an actual value. Hope this helps, Clark
  7. You should be able to add the [] to the end after you select it as the data type. I'm not sure about the list data type... don't use it much.
  8. One idea on this is to use a multi axis chart and use different subdatasets/queries on the embedded charts. Create your queries in such a way that you create sales ranges for the resulting stores. first chart would have stores sales that range from 0 to 10000, second would be from 10001-20000, etc, etc, ranges based on whatever would produce a good quality chart increment. Each of the charts could have different tick. You could choose to show or not show the tick values to keep it less messy and create your own range legend manually. The chart customizer class property is another approach, but I haven't use it yet. Hope this helps,
  9. Anytime I need entire bands to collapse when no contents I use report groups. You can made the band height 1px and supress when not needed. If you don't know if the band is needed or not you may be able to use subreport return value to determine. Hope this helps,
  10. Can you do it in the query with case statements and/or coalesce? Just collapse it down to the left first then the columns to the right will be the blank ones.
  11. This works as a variable class type java.lang.Integer[] or java.lang.String[]. In the expression you can parse or build out arrays, add to them, use the object.split(",") to populate the array, etc. Hope this helps,
  12. Just as an idea, I have made dynamic column headers using subreports for the column headers.
  13. See this related post, http://community.jaspersoft.com/questions/543494/unwanted-merged-rows-excel-export I have been using Jasper Reports for 5+ years now and haven't found a solid way to directly deal with this, work arounds are your best bet I think.
  14. This is a very standard need .. Not sure what is throwing you off but I have attached a working sample with the output in PDF and the JRXML, hope this helps you. Good luck. Clark Matthews
  15. Don't use if in the select, this "if C6CLIEVT."DATE3" <> NULL" should be more like this "CASE WHEN C6CLIEVT."DATE3" IS NOT NULL " Nested case statements should be fine.
  • Create New...