Make Table Detail Rows of the Same Height
Environment
Product | Progress® Telerik® Reporting |
Description
The detail rows of the table may grow vertically to accommodate their content. This may lead to detail rows having different heights in the final report document.
Solution
One way to work around the issue is to ensure the detail cell content always fits in a single row. This should guarantee the same height for all detail rows.
If the incoming data doesn't let predicting whether it will fit within a single row in design time, you may use Bindings to set the height of the table detail row. Here is the Expression that is used to demonstrate the approach in the demo report you may find in the Reporting Samples GitHub repository:
= Ifs(Exec("table1", Max(Len(Fields.data))) <= 13, "0.2in",
Exec("table1", Max(Len(Fields.data))) <= 26, "0.4in",
Exec("table1", Max(Len(Fields.data))) <= 39, "0.6in", "0.8in")
The idea is to take the longest data field and based on its maximum length calculate the number of rows that are needed to fit its content within the cell.
If the scenario is more complicated and the built-in user functions don't fit your needs, you may create a custom user function to return the detail row height.