Hitachi Vantara Pentaho Community Forums
Results 1 to 8 of 8

Thread: The page no problem between pageheader and page footer.

  1. #1
    Join Date
    Mar 2003
    Posts
    4,947

    Default The page no problem between pageheader and page footer.

    Hi,

    This is my sample code(incompleted). I display page no in the header and footer. but the result is very strange, my testing display 2 pages. The first page, the header display "2/2", the footer display "1/2".

    <?xml version="1.0" encoding="iso-8859-1"?>
    <report name="report" pageformat="A4_ROTATED" topmargin="0" leftmargin="0" bottommargin="0" rightmargin="0">
    <pageheader height="52" onfirstpage="true" fontstyle="plain" fontsize="8" leftmargin="0" rightmargin="0" topmargin="0" bottormargin="0">
    <string-field x="750" y="12" width="10" height="20" alignment="right" fieldname="pageNo"/>
    <label x="760" y="12" width="10" height="20" alignment="center"> / </label>
    <string-field x="770" y="12" width="10" height="20" alignment="left" fieldname="totalPage"/>

    </pageheader>


    <items height="12" fontstyle="plain" fontsize="8">
    .....
    </items>

    <pagefooter height="50" onfirstpage="true" fontstyle="plain" fontsize="8" leftmargin="0" rightmargin="0" topmargin="0" bottormargin="0">
    <string-field x="750" y="12" width="10" height="20" alignment="right" fieldname="pageNo"/>
    <label x="760" y="12" width="10" height="20" alignment="center"> / </label>
    <string-field x="770" y="12" width="10" height="20" alignment="left" fieldname="totalPage"/>
    </pagefooter>

    <functions>
    <function name="pageNo" class="com.jrefinery.report.function.PageFunction"/>
    <function name="totalPage" class="com.jrefinery.report.function.PageTotalFunction"/>
    </functions>
    </report>

    Please help me to see what's going wrong ? Thanks.

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    which version of JFreeReport do you use?

    A bug which could cause such an effect was found and fixed in version 0.8.2, and I was not able to reproduce that bug for the current version. If everything fails, please upgrade ...

    Have more fun,
    said Thomas

  3. #3
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    Hi,

    Yes, I'm using 0.8.2 now. I ever tried to use 0.8.3, but I've got some problems. All line element are invisible, I don't know what's going on. That's why I remamin using 0.8.2.. Please guide me how to solve it.. Thanks...

  4. #4
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    please try to upgrade to version 0.8.3b to fix your problem. In our tests the line element were printed perfectly with that version.

    Have more fun,
    said Thomas

  5. #5
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    Hi,

    I've upgraded the version to 0.8.3b. The "page no" issue has been fixed. :-) But I can't see the line element I put. My code is :

    <line x1="40" y1="70" x2="140" y2="70" weight="1" color="black" fill="false" draw="true"/>

    Please help me to solve it. Thanks.

  6. #6
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    I located the bug and work on a fix now ...

    Have more fun,
    said Thomas

  7. #7
    Join Date
    Mar 2003
    Posts
    4,947

    Default

    Hi,

    I know the line element is invisible for the moment, so I choose to use rectangle to replace line :

    <rectangle x="40" y="0" width="0.5" height="12" weigth="0.5" color="black" fill="false" draw="true"/>

    but the weird thing is going to happen, some "line" are bold, some are plain. I don't know what's going on. All the code are same... Please help me to solve it .. Thanks...

  8. #8
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Hi,

    the lines not visible bug is fixed now, an updated release will be published tomorrow.

    This can be caused because you are using a rectangle now. The width of 0.5 can be rounded up or down, and if the top line is rounded up and the bottom line rounded down, then the first line may be drawn on y=<40 and the other on y>=41. This may have the same effect as if you draw with an thicker pencil.

    You can safely switch back to the line element now, and this weird behaviour should be gone ...

    Have more fun,
    said Thomas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.