Hide objects when exported to Excel

Posted by: steven.truss on 22 August 2022, 12:25 am EST

    • Post Options:
    • Link

    Posted 22 August 2022, 12:25 am EST

    In MS SSRS you could use RenderFormat to hide particular objects of your report when exported to specific formats. For instance if I wanted a row to show on normal rendering, but not show when exported to Excel, I would set the row visibility expression to ```

    =not Globals!RenderFormat.Name = “EXCEL” AND not Globals!RenderFormat.Name = “EXCELOPENXML”

    
    This does not appear to be functional in ActiveReports.NET however. Even if I just try and display the RenderFormat name as a textbox value, it returns blank. 
    
    Is there some kind of alternative method I can use in ARN that would allow me to show/hide certain elements depending on export format?
  • Posted 28 August 2022, 10:26 pm EST

    Hello,

    If you wish to hide a given object or a group of objects on exporting, you could try using Layers to do the same. For more information on the same, please refer to the below link for more information:

    https://www.grapecity.com/activereportsnet/docs/latest/online/target-device-specific-output.html

    However, please note this approach does not allow us to perform this with a specific export format. It can either be used to hide the objects on exporting to any format or not.

    Please let us know if this works out for you.

    Regards

    Dushyant Sharma

  • Posted 28 August 2022, 11:44 pm EST

    Thank you for the reply and link. That appears to be exactly what we need in this case. Appreciate it!

Need extra support?

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

Learn More

Forum Channels