Make a subreport use the same height as its master

0

Hi,
I am struggling with a report that should spawn a table where each row can have 1 or more subrows. I solved this by using this structure:

  • Master renders the tableheaders, creates each row via Subreport A
  • Subreport A renders each row, creates each subrow via Subreport B
  • Subreport B renders each subrow

By default, each row is 17px in height, but can get taller if the content is causing a linebreak in a table-cell. If this happens in Subreport A, then Subreport B is not stretching itself to keep up with Report A´s height. In the end, Subreport A creates a row with ,e.g. a height of 25px, while Report B´s row is only 17px height, resulting in a small gap. Does anyone know how to make Report B stretch with Report A ?

What i tried so far:

  • Playing with the strech-options of both subreports
  • Copying the line-breaking text of report A to report B. Sadly, this is not an option anymore.
  • Using the Table-element instead of Subreport B. Same issue.

In the image below, the first 2 columns are part of Subreport A and the last 2 columns are part of Subreport B

 

Edit: Fixed Question styling

Xecu's picture
70
Joined: Dec 16 2013 - 5:49am
Last seen: 4 years 2 months ago

Hello,  I am struggling with the same problem as you did. Did you manage to solve your problem?

knopkiss - 4 years 2 months ago

2 Answers:

1

Hello Buddy 

What I understood from your graphical presentation is that the dates are coming from some subreport. So what you can do is just select your subreport and set the following properties stretch with overflow = true and also select from the dropdown "Relative to tallest Object " from the stretch type property.

 

Thanks

Honey

honeybakliwal's picture
Joined: Sep 8 2010 - 2:37am
Last seen: 11 months 1 week ago

Thanks for the quick response. I tried that, but could see no change in the rendered pdf.
Also, all elements in Subreport B (the one with the dates) are set to stretch with the tallest object.
I think the problem is, that the elements and bands in Subreport B dont know, that their reports height has changed, and thus still think their band / biggest items have the default height of 17px.

Xecu - 4 years 10 months ago
1

Hello I have also faced similar problem some days before.

What you should do is pass the main report column a in your output as a paramter to the subreport and similarly from report b the second column to its

subreport.Place these parameter in a text field and send them back in subreport.Make sure that they have same width as in the main report.

Then put strech type as relative to tallest object you will get the desired output.

shariquerasheed92's picture
Joined: Sep 17 2014 - 11:38pm
Last seen: 7 months 3 weeks ago

If I understood you correctly, you mean i should copy the height-stretching textfield of the master-report and insert it with the same width in the subreport? That was my initial solution, but the problem is that the copied text is still rendered in the finished pdf. It might not be visible there, but it is still searchable and selectable. If it were not for these 2 issues, this solution might be viable for me again.

Xecu - 4 years 9 months ago
Feedback
randomness