Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Set header Text Dynamically

  1. #1
    Join Date
    Jun 2003

    Default Set header Text Dynamically

    I would like to set my page header text dynamically. Is this possible? If so which xml element do I use and how do I set the property.

    Any help would be much appreciated as I am new Jfreereport user. :?:

  2. #2
    Join Date
    Jun 2003


    yes you can.

    Use the Jreport apis.

    Below I am adding another footer to one already defined in the XML
                JFreeReport report = parseReport(in);
                Element element = ItemFactory.createLabelElement("My_Tag",
                new Rectangle2D.Double(0.0, 20.0, 500.0, 20.0),
                null, // font
                "TEXT to APPEAR in FOOTER");
          ReportFooter rf = report.getReportFooter();
          rf.addElement(1, element);// add after the original footer
    Hope this helps


  3. #3
    Join Date
    Mar 2003



    if you want to modify the contents of an page header (or maybe read the contents from the tablemodel), then just do it, there is no obstacle there ...

    The page header is an ordinary band, and can be filled like any other band. If an element references the tablemodel, then it would print the same data as the first itemband of that page (more detailed: the contents from the same column as the next itemband that would be printed).

    You can use all elements as in the other bands, the behaviour and possibities is the same for all bands.

    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.