How to expand all items in a reportviewer object ?
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
[370 byte] By [
Noemie] at [2007-12-24]
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().
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)