Flexreport hide subreport when empty

Posted by: saidnai on 17 November 2021, 4:36 am EST

    • Post Options:
    • Link

    Posted 17 November 2021, 4:36 am EST

    Good day,

    Is there away to hide a subreport in any section and not printing it’s space on the report if needed.

    Best regards

    Said

  • Posted 18 November 2021, 6:54 am EST

    Hello Said,

    You can use the OnFormat property of the Detail section of the FlexReport and manage the visibility of the Subreport.

    To manage the space set the AutoHeight property of the Detail subsection to GrowandShrink.

    Please find the attached report implementing the same.

    Regards,

    Prabhat Sharma.

    demo.flxr.zip

  • Posted 22 November 2021, 9:05 am EST

    Dear Prabhat,

    I need this function in the head setion of the main report. I have done the same as you said. The problem that i still have is the space. The sub report does not shrink.

    Do you have an idea why so?

    Best regards

    Said

  • Posted 23 November 2021, 4:51 am EST

    Hello Said,

    Please find the attached report file that we have created as per your given comments.

    If you are doing anything else then please let us know and modify it accordingly so that we can assist you further.

    Regards,

    Prabhat Sharma.

    demo (2).zip

  • Posted 23 November 2021, 10:06 am EST

    Dear Prabhat,

    Thank for you support. I have attached a sample report with a Access DB. It still not working. The disable is working but the space still exist.

    Best regards

    Said

    Sub Report.zip

  • Posted 24 November 2021, 1:50 am EST

    Hi Said,

    Setting the AutoHeight property of the Header section and Subsection to GrowAndShrink removes the blank space of Subreport.

    Regards,

    Prabhat Sharma.

    MRZHM.zip

  • Posted 24 November 2021, 3:34 am EST

    Dear Prabhat,

    Thank for you support. It works now. The problem at my side is when i click on any section to see the propereties. I have to click twice. Each click gives a figure.

    Best regards

    Said

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels