Yanıt Hide a column and dont show white space

  • Friday, February 15, 2013 11:15 PM
     
      Has Code

    My report has a table which has these 7 static columns: Department, Week1, Week2, Week3, Week4, Week5, Total

    User run the report for a period. The data retrieved for that period could be for 4 weeks or 5 weeks.  The dataset has a field 'week5_include_flag' which tells me if the data is for 4 weeks or 5 weeks. If week5_include_flag = 1 then the data is for 5 weeks else data is for 4 weeks.

    I want to hide Week5 column if the field 5th_week_include has value 1. That was easy as I defined this expression for the Hidden property of Week5 column:

    =IIf(Fields!week5_include_flag.Value = 1, false, true)

    It is working and the Week5 column is hiding correctly based on the value of week5_include_flag field. But when Week5 column is hidden, the table is showing a white space in place of Week5 column and then the Total column. That does not look good. I want to show the Total column instead of the white space just beside the Week4 column so the table looks good. How can I do that?

    I am using SQL Server Reporting 2008 R2.

    Thanks


All Replies