locked
How to prevent hidden table from exporting in CSV RRS feed

  • Question

  • I have two table in my report which I am showing/hiding based on user selection. On the report output table doesn't get displayed but in CSV export I can see hidden table data.

    I have tried setting =IIF(Globals!RenderFormat.Name="CSV", True, False) in hidden expression but didn't work out. On microsoft support site it is mentioned that DataElementOutput property control CSV rendering but it doesn't support dynamic expression.

    Is there any way to set DataElementOutput  property dynamically or remove dataset from table dynamically?



    Thursday, December 15, 2016 3:58 AM

Answers

  • Hi Yulina,

    Thanks for the confirmation. But I have found a solution or you can say workaround for the issue.

    Here, we can implement custom CSV renderer as mentioned in link below and need to override DataElementOutput property of controls.

    https://msdn.microsoft.com/en-us/library/ms153624.aspx


    • Edited by AmolBadhe Tuesday, December 20, 2016 4:21 AM Updated
    • Proposed as answer by Yuliana Gu Tuesday, December 20, 2016 6:10 AM
    • Marked as answer by AmolBadhe Wednesday, December 21, 2016 5:10 AM
    Tuesday, December 20, 2016 4:19 AM

All replies

  • Hi AmolBadhe,

    In my test, setting the expression =IIF(Globals!RenderFormat.Name="CSV", True, False) didn't work in CSV export either. It is a limitation in CSV file. Interactivity is not supported by CSV formats including conditional visibility. So, currently, the requirement to make the second tablix hidden dynamically in CSV export cannot be achieved.

    Here is a similar thread: Hide Tablix during CSV Export.

    To get more information about the behavior when exporting to CSV, please refer to: Exporting to a CSV File.

    If you still have any question, please feel free to ask.

    Best regards,
    Yuliana Gu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 16, 2016 9:28 AM
  • Hi Yulina,

    Thanks for the confirmation. But I have found a solution or you can say workaround for the issue.

    Here, we can implement custom CSV renderer as mentioned in link below and need to override DataElementOutput property of controls.

    https://msdn.microsoft.com/en-us/library/ms153624.aspx


    • Edited by AmolBadhe Tuesday, December 20, 2016 4:21 AM Updated
    • Proposed as answer by Yuliana Gu Tuesday, December 20, 2016 6:10 AM
    • Marked as answer by AmolBadhe Wednesday, December 21, 2016 5:10 AM
    Tuesday, December 20, 2016 4:19 AM
  • Hi AmolBadhe,

    Thanks for sharing your solution to this question. If implementing custom CSV renderer can indeed achieve your requirement, please mark your post as an answer so that it can help more people.

    Thanks,
    Yuliana Gu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 20, 2016 6:13 AM