locked
hide or unhide columns in my report with Reportviewer RRS feed

  • Question

  • User1301115778 posted

    i am building a report.rdlc and using the report viewer and i wanted to know how can i hide or unhide columns in my report is this possible? can anyone assist me?

    Tuesday, May 24, 2011 8:21 AM

Answers

  • User1983249378 posted

    You can accomplish this by using the visibility property of your table in report , bind that column to your sql select boolean column that is returning you true of false value or you can use "case when then" structure in your select to show hide column in report like

    Select (Case When col1>col2 Then True Else False end) as  IsColVisible

    Then assign IsColVisible to your table visibility property , i did it in datapresentation controls and here i see that report alos have visibility property.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 26, 2011 12:30 AM
  • User1471008070 posted

    Hi dhanasekaransri,

    To this requirement of yours, I still recommend you follow this thread to get some reference http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/2f0f681b-6fc2-44a6-b257-c8d69d770da6/ 

    Thanks,
    Challen Fu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 28, 2011 11:50 PM

All replies

  • User1983249378 posted

    You can accomplish this by using the visibility property of your table in report , bind that column to your sql select boolean column that is returning you true of false value or you can use "case when then" structure in your select to show hide column in report like

    Select (Case When col1>col2 Then True Else False end) as  IsColVisible

    Then assign IsColVisible to your table visibility property , i did it in datapresentation controls and here i see that report alos have visibility property.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 26, 2011 12:30 AM
  • User1471008070 posted

    Hi dhanasekaransri,

    To this requirement of yours, I still recommend you follow this thread to get some reference http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/2f0f681b-6fc2-44a6-b257-c8d69d770da6/ 

    Thanks,
    Challen Fu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 28, 2011 11:50 PM