Stretch a row with data overflow while having multiple rows in a single band

前端 未结 3 1447
说谎
说谎 2020-11-30 02:04

My requirements bind me to have multiple rows in a single \"Details\" band.

Right now I am having a static text field (which is highlighted in color) in the leftmost

相关标签:
3条回答
  • 2020-11-30 02:35

    I have found the answer. The key to the solution is grouping the elements inside a row together.

    1. Remove all the static text labels. Use text fields instead, with the text in quotes. They can be grouped with other text fields and data fields.
    2. Put all the data fields after the quoted text field in the same group as the quoted text field.
    3. Now, do the same with all the rows that you want to display. Separate group for individual row.

    Select all the elements in a group, or, all the elements in all the gorups and do this:

    • Set "Position" to "Float"
    • Set "Stretch Type" to "Relative to the tallest object"
    • Check "Print when detail overflows" checkbox.
    • Check the "Stretch with overflow" checkbox.

    That's all we can do to make things "stretch" together.

    Now, the band would have to stretch dynamically with these stretched details. Just go to the band properties, set Split type to "Default" and split allowed to true. This did the trick for me.

    0 讨论(0)
  • 2020-11-30 02:35

    In case someone comes up to this problem and above answers don't work. I suggest checking your xml's root element. If it has the following attribute then remove it:

    printOrder="Horizontal"
    

    Then above answers should work.

    Hope I'll save someone a day of googling the same stuff.

    0 讨论(0)
  • 2020-11-30 02:52

    In my case doing as you advised didn't work. I had to modify your solution a little bit - I made a "frame" instead of grouping objects, and put previuosly grouped elements in that frame. I set positionType="Float" and stretchType="No stretch" in that frame, and set stretchType="RelativeToTallestObject" to its child items - then it all works.

    0 讨论(0)
提交回复
热议问题