I am exporting a crystal report to pdf document. I have a detail section that contains two sub reports side by side. When I view the pdf, I see that the boxes in which the sub reports data is shown has different heights in-spite of setting both the boxes to same height. Also the height of detail section in both the sub reports is also same.
2 Answers
The vertical size of the subreport object in the main report doesn't really matter, as the subreport will grow as large as it needs to in order to fit (This is not the case for the horizontal dimension).
So, in order to have two side-by-side subreports that are exactly the same size, you need to meet two conditions:
The size of the subreports themselves need to be exactly the same size. This includes all visible subreport sections.
The same number of records should be in each subreport. If one subreport has 1 record and the other has 5 records, obviously those two subreports will ultimately be different sizes.
The easiest way to prevent this is to just not place them side-by-side. If you don't want to do that, then you can try to increase each subreport's size such that they already accommodate the maximum 5 records and therefore won't need to ever grow in size. If those things don't work, you can add placeholder sections to each subreport and conditionally suppress them depending on the number of records in each subreport. For example, each subreport has 5 sections and for each additional record that is to appear, you suppress one of those sections.