locked
How to expand all items in a reportviewer object ? RRS feed

  • Question

  • Hi,

    Is there an event, a method, a property or something to expand all  items of a report?

    I'm working with a local report i just want to allow the user to expand or collapse all the report details.

    I'm also having the same kind of problem when I export it, the first level of item appear expand but not the other levels.

    Thanks

     

     

    Tuesday, September 26, 2006 8:16 PM

Answers

  • There is no method on the report viewer object that will do this, but you can get a similar effect by configuring your toggle options to expand when a given report parameter is set to true.  You could set that parameter using ReportViewer.LocalReport.SetParameters().
    Thursday, September 28, 2006 3:45 AM

All replies

  • There is no method on the report viewer object that will do this, but you can get a similar effect by configuring your toggle options to expand when a given report parameter is set to true.  You could set that parameter using ReportViewer.LocalReport.SetParameters().
    Thursday, September 28, 2006 3:45 AM
  • Thanks a lot.

    Just if somebody else try to do it, here what i did :

    ExpandEmployee is a ReportParameter of type string

    On aspx.cs file (onclick button )

    ReportParameter[] param = new ReportParameter[1];

    param[0] = new ReportParameter("ExpandEmployee", 1);

    this.ReportViewer1.LocalReport.SetParameters(param);

    ReportViewer1.LocalReport.Refresh();

    On your report :

    In initiateToggle :  =IIF(Parameters!ExpandEmployee.Value.ToString ="1",False, True)

    In visibility -> Hidden : =IIF(Parameters!ExpandEmployee.Value.ToString ="1",False, True)

     

     

    Thursday, September 28, 2006 3:36 PM
  • I'm having the same issue but don't understand the solution.
    Where exactly do I have to enter the code:

    In initiateToggle :  =IIF(Parameters!ExpandEmployee.Value.ToString ="1",False, True)
    In visibility -> Hidden : =IIF(Parameters!ExpandEmployee.Value.ToString ="1",False, True)

    And what is initiateToggle? Is it a method created by you? Couldn't find anything about it on the net.

    kind regards
    Kuti
    Sunday, January 21, 2007 4:50 PM
  • OK got it:
    select a row in a table, rightclick - "edit group" - "visibility" - "Expression", then enter:
    =IIF(Parameters![Parametername].Value.ToString ="1",False, True)

    (translated from German to English)

    Wednesday, January 24, 2007 10:22 PM
  • This thread is already replied, but for anyone have the same problem see this:

    http://forums.asp.net/p/1458649/4153033.aspx#4153033


    Gabriel Bauermann
    Wednesday, November 3, 2010 12:55 PM