Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Dynamic columns

  1. #1

    Default Dynamic columns

    Hi,

    I'm trying to figure out how to display dynamic columns. The user adds the item(s) to the database. Those items in turn are used as column headings. So the column names are dependent on user input.
    Where and how is this worded? I'm using a vector to get the data from the database in the application, and it appears on the report through the fieldname listed in the XML, no problem.
    But as I said, I'm trying to use the data as column headings. I'm only able to display the first data item.
    How can I display all data items input as column headings?

    Thank you

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

    Default

    Hi,

    the only soltion for your problem, is to build the report manually (using the API) after you know how the used TableModel looks like.

    Our reporting lib uses the TableModel definition to define the internal DataRow. From the tablemodel we use the ColumnNames to lookup the various columns, we never use any contents of the tablemodel to control the reporting. The tablemodel meta data is more than sufficient to complete the job.

    If you want to use your user-defined dataset, then use the contents of the vector as ColumnNames for your tablemodel and fill the contents according to the contents of the vector.

    Have more fun,
    said Thomas

    P.S.: As usual, if you have questions or something is not fully clear, just drop a note.

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.