none
I am showing only five column from dataset into table but While export reports to excel then I want to export all coumns of dataset.

    Question

  • I am using SSRS.

    In Report view , I am showing only five column from dataset into table but While export reports to excel then I want to export all coumns of dataset.

    Dataset has 25 columns.

    If any one can Help on this .

    Please suggest me.

    Tuesday, August 19, 2014 2:17 PM

Answers

  • You can add all dataset columns to report and for the 20 columns set an expression for hidden property as below

    IIF(InStr(Globals!RenderFormat.Name,"EXCEL") > 0 , False,True)


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Tuesday, August 19, 2014 2:27 PM
  • You are doing Mistake. you are using Tablix Properties but as I mentioned you have to set this expression on Column Visibility Option.

    On 1,2,3,4,5 column -> column visibity -- > SHOW

    ON 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25  column -> column visibity -- >

    IIF(InStr(Globals!RenderFormat.Name,"EXCEL") > 0 , False,True)

    Tablix Proprties will set this proprties on all columns that is why nothing is shown in your report.

    Refer below image;

    Thanks



    Tuesday, August 19, 2014 3:40 PM

All replies

  • You can add all dataset columns to report and for the 20 columns set an expression for hidden property as below

    IIF(InStr(Globals!RenderFormat.Name,"EXCEL") > 0 , False,True)


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Tuesday, August 19, 2014 2:27 PM
  • Hi ,

    You can try below;

    1. Take a Tablix and bind all 25 columns in Report .

    2. Select all 20 columns other than these 5 column that you want to show in report

     and right click on other 20 columns and set Column visibity Expression as ;

    IIF(InStr(Globals!RenderFormat.Name,"excel") > 0 , False,True)
    Thanks
    Tuesday, August 19, 2014 2:39 PM
  • I have added all dataset columns to table after that select 20 columns of table 

    goto 

    Property window --> visiblity tab --> show hide based on expression --> fx-->

    IIF(InStr(Globals!RenderFormat.Name,"EXCEL") > 0 , False,True)

    after setting this expression . no one records showing in table.

    Pls suggest.

    Tuesday, August 19, 2014 2:53 PM
  • Thanks for your kind reply...

    It made hidden on report  preview but When I exported report to excel sheet then it does not show hidden column in excel sheet .

    pls suggest.

    Tuesday, August 19, 2014 2:59 PM
  • Hi ,

    Kindly make sure that all the 5 columns that you want to show in report have column visibility option is SHOW.

    Right click on 5 columns one by one then right click -> column visibity - > Show.

    Please refer below image;

    Thanks

    Tuesday, August 19, 2014 2:59 PM

  • Tuesday, August 19, 2014 3:37 PM
  • You are doing Mistake. you are using Tablix Properties but as I mentioned you have to set this expression on Column Visibility Option.

    On 1,2,3,4,5 column -> column visibity -- > SHOW

    ON 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25  column -> column visibity -- >

    IIF(InStr(Globals!RenderFormat.Name,"EXCEL") > 0 , False,True)

    Tablix Proprties will set this proprties on all columns that is why nothing is shown in your report.

    Refer below image;

    Thanks



    Tuesday, August 19, 2014 3:40 PM
  • Thanks you very much..... It works perfectly ..
    Tuesday, August 19, 2014 3:50 PM