Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: How to set different TableModel in header,itemband,footer ?

  1. #1
    Join Date
    May 2003

    Default How to set different TableModel in header,itemband,footer ?


    I'm using XML to draw the report with TableModel. The model is created for storing the data for the ItemBand. And I don't wish to put the header/footer data into the same model. The model is something like a "database table, has many row and column". And the header/footer data may be unqiue and not neccessary to store in the row/column. But as I know, TableModel seem the only way to store data which the XML needs. Please give me some advices. Thanks.


  2. #2
    Join Date
    Mar 2003



    setting different TableModels is not yet supported, but as you want to put the values into a report header/footer, try the ReportProperties...

    In the functions section of the xml definition, you would simple define all report properties you want to define for your report:

       <property-ref name="">optional a string value</property-ref>
       <property-ref name=""/>
    In your programm, you can define the values for your report after your report definition got parsed.

    JFreeReport report = // parse it ...
    Object anyobject = // should fit the usage, 
    // numbers for Number-elements, images for 
    //image-elements etc ...
    report.setProperty &#40;"", object&#41;;
    The values of the report properties now can be used as if they are constant values in the TableModel.

    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.