Jump to content
  • SumVariableCalc doesn't work with splitting GroupHeaderBands


    C-Box
    Assigned User teodord
    CategoryBug report
    PriorityUrgent
    ReproducibilityAlways
    ResolutionFixed
    SeverityCritical
    StatusClosed

    Hi Teodor,

     

    I just have a customer who want's to print the "carry over" at each page-bottom (and page header at next page)

    I already tried that some months (I guess even years) ago and stranded at some circumstances where a simple Variable at pagefooter and pageheader had wrong values.

     

    Now I found out how to reproduce that behaviour (working with 2.0.2)

     

    Following scenario:

     

    1.) I have to work with DUMMY GROUPS because I have different layouts for certain field conditions (So at each DummyGroupHeader I have different SubReports --> works fine for years so far)

     

    2.) a DummyGroupheader has a price-field at line 1

     

    3.) at line2 there is a TextField that has StretchWithOverflow=true and could contain many lines of text

     

    4.) if the last dummygroupheaderband at page 1 is rendered the price is printed at page 1. But now there is not enough space to render the whole text so the page breaks (ok so far).

     

    5.) the variable in page-footer should sum up the prices, this works fine EXCEPT if the band splits over two pages! In this case, the sum doesn't contain the last price from current page.

     

    I created a TestBug Sample out of the standard JasperReport-DataSource Sample that I do attach at this tracker as ZIP File. Just call the ANT Task "testbug" that shows my problem. A screenShot and a sample PDF is included also.

     

    Would be great if you could find the reason for that bug.

     

    regards from sunny Germany

    C-Box

     

     



    User Feedback

    Recommended Comments

     

    Hi, C-Box

     

    The problem you are experiencing come from the fact that you use a group header as a detail.

    I know we recommend dummy groups for various solutions to problems, but we should have gone further with our recommendations and told people to actually use group footers instead of group headers.

     

    Group headers are not that good because of the timing expression evaluation and variable incrementation occur. Variable incrementations usually occur after the detail has been evaluated, so this is why group footers are better positioned, because by the time they print, all variables are already incremented.

     

    Please try to use the group header of the dummy group instead of the group header and see how it works.

     

    If it is OK, then please remember for the future that group footers and better than group headers.

    We\'ll try to add this kind of information to our relevant FAQs and docs.

     

    Thanks,

    Teodor

     

     

    Link to comment
    Share on other sites


×
×
  • Create New...