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]
# 1
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().
BrianHartman-MSFT at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 2

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 = newReportParameter[1];

param[0] = newReportParameter("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)

Noemie at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 3
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

Kuti at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...
# 4
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)

Kuti at 2007-10-8 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...

Visual Studio

Site Classified