Home Analytics Designing reports
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

How do you set the heights of all rows to the largest row in a table?

Using the properties in BIRT, is there a way to extend the height of all rows to the largest height of a row? Or can this only be done by script? If so, do you have a suggestion?

Please have a look at my example. Above is the status quo, below is the expected result:

Thank you.


  • Can you please post an example report with the top table. If possible, use data that allows me to run the report (i.e. Classic Models). Also, in your Designer's Help > About window, what is the Build ID?

    I understand what you are asking and it should be possible to format the table like your bottom table, but there are a lot of different ways to create the top table. The design of the top table affects the steps required to turn it into the second table.

    Jeff F.
    Customer Support Engineer I
  • edited August 2, 2019

    Hello Jeff,

    I am working with Eclipse Platform (Version: Photon (4.8), Build id: I20180611-0500) and BIRT Version 4.8.0.v201806261756.
    To create the layout I just used a table, set the binding to the desired data set and dropped in the column.

    Thank you for your help.

  • I cannot find a way to get the maximum row height prior to the rows being rendered. The row.height property always returns null.

    The attached example is the best solution I have found. I added a computed column to the data set. There is code in beforeFactory of the report, onFetch of the data set, onCreate of the table, and onCreate of the table row. The table code is in the first table.

    It's less complicated than it sounds. The code simply passes the character count for the longest row of data from the data set into the table. The table onCreate script has logic to set the row height based on the count. The only tricky part is the logic to set the height. I created very simple logic just as an example. The logic will need to be edited and tested.

    Jeff F.
    Customer Support Engineer I
  • Hello, Jeff,

    thank you for the proposed solution. It's already going in the right direction and, as you have already said, you have to adapt the logic accordingly (e.g. if the field in the line has no width of 100% etc.).

    Using "getHeight" on the line I had also tried to get the value, but came to the same result as you. Is this possibly a BUG or can BIRT simply not evaluate this value for technical reasons?

    1.) Is there perhaps a solution that at least works when exporting to PDF?
    2.) Is there a possibility to use the "ElementFactory" or the "DesignHandle" of the field / cell / row?

  • I don't think this is a bug. I think it is a timing issue. You can't get the max value until the last row is rendered because the last row could be the max value. At the point where it is possible to know the max value, the table is done rendering.

    The example I posted exports to PDF with the adjusted row height.

    If I come up with any other ideas I will post them.

    Jeff F.
    Customer Support Engineer I
Sign In or Register to comment.