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

tdiffenbach

Members
  • Posts

    4
  • 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 tdiffenbach

  1. I have a result set that may have 1 or more than one row for a group. Example: grouping on parent_id: parent_id | child_id | data 1 | 1 | foo 2 | 2 | bar 2 | 3 | baz When the number of rows in the parent_id group is one, I want to suppress printing of the detail band. So I create the following variable: <variable name="childen_per_parent" class="java.lang.Integer" resetType="Group" incrementType="Group" incrementGroup="parent_id" resetGroup="parent_id" calculation="DistinctCount"> <variableExpression> <![CDATA[$F{child_id}]]> </variableExpression> </variable> In the parent group band, I get the correct count of children. For the detail band, I use the following print-when expression: <printWhenExpression> <![CDATA[boolean.valueOf($V{ichilden_per_parent}.intValue() > 1)]]> </printWhenExpression> Unfortunately, this results in the first row of child data being suppressed, even if the total children for that parent is greater than one. What am I missing here? Thanks.
  2. For a report, I have a detail band showing fields, and a group footer that shows the sum of each field for the group, and a summary band that shows sums for each field for the entire report. This works well for reports were the report user wants to make sure that totals "tail out". This is appropriate to accountants, etc. For users who are planners, executives, etc., it sometimes makes more sense to show totals first, then "drill down" into the details. To my surprise, placing the group sums in the group header results in null for all sums, as the detail band has not yet run, so the group has not changed, and the group sum variables are not updated. This temporal dependency seems an oversight, and failure (in MVC terms) to separate Model from View/Rendering.
  3. I wish to reuse, in its entirety, a datasource in multiple subreports. The SQL is relatively expensive, so I'd like to avoid generating it multiple times. It appears that this will require a. Using a JRRewindableDataSource in the main report, and b. calling moveFirst() on that datasource in each subreport. How can I do this? I don't see a way to specify the type of the main report's datasource type, and I'm not clear how to ensure the call moveFirst() on the datasource in the subreport happens prior to the subreport accessing the datasource's data. Thanks.
  4. I've given several "columns" on a jasper report "print when" expressions which conditionally suppress the printing of those columns. I'd like columns to the right of the suppressed columns to "float" left when the columns to their left are suppressed. E.g.: No columns suppressed: Code: [Col1 Header][Col2 Header][Col3 Header] [Col1 Data ][Col2 Data ][Col3 Data ] Column 1 suppressed with a print when expression: Code:[code] [Col2 Header][Col3 Header] [Col2 Data ][Col3 Data ] Columns 1 and 2 suppressed with a print when expression: Code:[code] [Col3 Header] [Col3 Data ] The "columns" are actually static text and text fields which are vertically aligned, over several bands. (In fact what I've trying to do is "rotate" the data (monthly figures), depending on a start month, to "wrap around" a year boundary. So my end goal is something like this, if e.g., the start month were month three (I've elided months 4 through 11): Code:[code] [Month3 Header] ... [Month12 Header][Month1 Header][Month2 Header] [Month3 Data ] ... [Month12 Data ][Month1 Data ][Month2 Data ]) Is this possible using jasper "out of the box"? Is it possible if I extend jasper with my own Java code? My preferred output is PDF. Thanks. Post edited by: tdiffenbach, at: 2007/10/17 23:47 Post edited by: tdiffenbach, at: 2007/10/17 23:48 Post edited by: tdiffenbach, at: 2007/10/17 23:53
×
×
  • Create New...