Jump to content
Changes to the Jaspersoft community edition download ×

striperfishingmail.com

Members
  • Posts

    4
  • Joined

  • Last visited

striperfishingmail.com'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. I have one update to my original post. I am able to add a Field (GraduateStudentCount) to the report with a description of "count(Grade[text()=Graduate])" which renders a count of the number of records with Grade=Graduate. This will be either 1 or 0 depending upon whether the Grade is set to Graduate. I can then a variable with the following attributes: Variable Class: java.lang.Integer Calculation: SUM Reset Type: Group Reset Group: <my group name> Variable Expression: $F{GraduateStudentCount} Initial Value Expression: new Integer(0) If I add this variable to the header band of my group and then set the Eval Time to GROUP, it correctly renders the number of Students in the Group with Grade=Graduate. However, I need to use this value in an expression. If I try to use the Variable directly, it is always 0. Is there a way to set the Variable's eval time to Group?
  2. I have a similar problem. I can DISPLAY the sum in the Header if I follow the instructions given here. In my case though, I would like to use the sum variable in an expression to determine whether or not to print a particular heading. For instance, if the sum > 0, display a static message. Is there a way to either use a Text Field in a "printWhenExpression" or force a variable to evaluate at the GROUP level just as the Text Field does?
  3. I have a report I am developing in iReport 3.7.1 which uses XML as a datasource. The XML is structured as follows: <Students> <Student> <Name>Mark</Name> <Major>Computer Science</Major> <Grade>Undergrad</Grade> </Student> <Student> <Name>John</Name> <Major>Computer Science</Major> <Grade>Graduate</Grade> </Student> <Student> <Name>Bill</Name> <Major>English</Major> <Grade>Undergrad</Grade> </Student> </Students> In my Jasper report, I have a QueryString for "/Students/Student" and I am grouping the records on the element "Major". This works fine, however, I only want to print one particular value(static label) in my Group Header if at least one record exists in the Group with Grade="Graduate". Is anyone aware of a way I can accomplish this? I was wondering if there was any way to use a Variable with a reset type of Group to do it, but can't seem to find a solution that works.
  4. I have a Main Report that is structured with 3 detail bands (via 2 "dummy" groups and a detail band). Each detail band simply contains a subreport. I am trying to make each subreport start on a new page, if the contents can't fit on the same page as the end of the prior subreport. Each detail band may or may not be displayed depending on the content of the datasource (eg. only Detail band 1 and 2 night display, or only detail band 2 and 3, or just detail band 2, etc). I have set the SplitType=Prevent for each of the detail bands which works great UNLESS the data for the first detail band that prints can't fit on the first page of the report. In this case, JasperReports generates a blank first page (header/footer only), and then print the contents starting on the second page. Does anyone have a suggestion?
×
×
  • Create New...