'Is there a way to autoadjust subreports when they're supressed by a custom condition or blank?
I would like to know if there is a way to autoadjust the subreports of a Crystal Report document when they're supressed by a custom condition or wheter they're blank.
I currently have the layout of the report as defined in this image

If there is no records to show in the "CMDA del Turno" subreport then it isn't visible but the whitespace remains, as shown in this image:
My goal is to set the positions of the reports automatically so it can appear this way:

Is there a configuration i'm missing to achieve this?
Thanks in advance
Solution 1:[1]
To do this you will need to isolate the sub-report into a section that contains nothing but the sub-report. You can do this by adding two additional Details sections to your report. The top-most details section will contain all of the report objects that are printed above the sub-report. The bottom-most details section will contain all of the report objects that print below the sub-report. The details section in between will contain the sub-report. Now set all sections of the sub-report to "Suppress when blank" using the Section Expert, then set the middle details section of the main report to "Suppress when blank" as well using the Section Expert.
Now right-click the sub-report and click on "Format Subreport...". Then go to the "Subreport" tab on the Format Editor window and check the box for "Suppress Blank Subreport".
Be aware that the label that prints to the left of your sub-report will need to be relocated inside the sub-report for this to work though. You should be able to set the sub-report to the same width as your main report and then you should have room in the sub-report for the label object as well.
Once you have followed these steps, the report should display as desired.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | R. McMillan |

