Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Sunday, March 25, 2012

dropdownlist -default value!

hi ,

need your help please

I have got a dropdownlist which is getting it's items and values from the table with in SQL server , everything works fine.

I just want to be able to select default item , so when the page is loaded the dropdown list default will be that selected item.

as an exmple if the drop downlist items and values are as follow

item --> value
-------
city --> 1
tokyo --> 2
london -->3

these info is imported from the database
and I want by default tokyo to be selected

many thanks

M

------------
here is my code:


Dim sqlConnection As SqlConnection
Dim sqlDataAdapter As SqlDataAdapter
Dim sqlCommand As SqlCommand
Dim dataSet As DataSet
Dim dataTable As DataTable

sqlConnection = New SqlConnection("user id=sa;password=testfirm;database=ken_live;server=csfirm03")

'pass the stored proc name and SqlConnection
sqlCommand = New SqlCommand("Select * From _aci",sqlConnection)

'instantiate SqlAdapter and DataSet
sqlDataAdapter = New SqlDataAdapter(sqlCommand)
dataSet = New DataSet()

'populate the DataSet
sqlDataAdapter.Fill(dataSet, "AA")

'apply sort to the DefaultView to sort by CompanyName
dataSet.Tables(0).DefaultView.Sort = "bsheet"
city.DataSource = dataSet.Tables("AA").DefaultView

city.DataTextField ="bsheet" ' what to display
city.DataValueField ="bsheet" ' what to set as value

city.DataBind()


Dim li as ListItem

FOR EACH li in city.Items
IF li.value = 2 THEN
li.selected = true
END IF
NEXT

|||I would also advise using a DataReader object rather than a DataSet and DataAdapter. The DataReader is much faster and does not use nearly as much resources. Also be sure to clean up after you use the objects, for example:


city.DataBind()

sqlCommand.Dispose
sqlCommand = Nohting

sqlDataAdapter.Dispose
sqlDataAdapter = Nothing

dataSet.Dispose
dataSet = Nothing

sqlConnection.Close
sqlConnection = Nothing

HTH|||------ Edited by Colt ------
<code/> tag was added
------ Edited by Colt ------

thanks for the reply

I've changed the code, ( no error messages ) but no effect almost


Dim sqlConnection As SqlConnection
Dim sqlDataAdapter As SqlDataAdapter
Dim sqlCommand As SqlCommand
Dim dataSet As DataSet
Dim dataTable As DataTable
Dim li as listitem

sqlConnection = New SqlConnection("user id=sa;password=testfirm;database=ken_live;server=csfirm03")

'pass the stored proc name and SqlConnection

sqlCommand = New SqlCommand("Select * From _aci",sqlConnection)

'instantiate SqlAdapter and DataSet

sqlDataAdapter = New SqlDataAdapter(sqlCommand)
dataSet = New DataSet()

'populate the DataSet

sqlDataAdapter.Fill(dataSet, "AA")

'apply sort to the DefaultView to sort by CompanyName

dataSet.Tables(0).DefaultView.Sort = "bsheet"

city.DataSource = dataSet.Tables("AA").DefaultView

city.DataTextField ="bsheet" ' what to display

city.DataValueField ="bsheet" ' what to set as value

for each li in city.items
if li.value="CITY" then
li.selected=true
end if
next

city.DataBind()

|||The DataBind() should preceed the For Loop that is selecting the default value.

city.DataBind()

for each li in city.items

if li.value="CITY" then

li.selected=true

end if

next

|||thanks again for following the case
but still the porblem does exist ( no error messages but no effect as well )

code:

session("A")="0"

'object vars
Dim sqlConnection As SqlConnection
Dim sqlDataAdapter As SqlDataAdapter
Dim sqlCommand As SqlCommand
Dim dataSet As DataSet
Dim dataTable As DataTable
Dim li as listitem

sqlConnection = New SqlConnection("user id=sa;password=testfirm;database=ken_live;server=csfirm03")

'pass the stored proc name and SqlConnection

sqlCommand = New SqlCommand("Select * From _aci",sqlConnection)

'instantiate SqlAdapter and DataSet

sqlDataAdapter = New SqlDataAdapter(sqlCommand)
dataSet = New DataSet()

'populate the DataSet

sqlDataAdapter.Fill(dataSet, "AA")

'apply sort to the DefaultView to sort by CompanyName

'dataSet.Tables(0).DefaultView.Sort = "bsheet"

city.DataSource = dataSet.Tables("AA").DefaultView

city.DataTextField ="bsheet" ' what to display

city.DataValueField ="bsheet" ' what to set as value

city.DataBind()

for each li in city.items

if li.value="CITY" then

li.selected=true

end if

next|||As you had presented earlier, the Value property of the DDL was populated with a numeric value and the Text property was propulated with the character description (i.e., CITY).


li.value = 2

or you can use

li.text = "CITY"

HTH|||hi again :(

it didn't work.

always it is coming up wit it's own default one ( which is the fist row of data in database)

please , please , any alternative way

again I'm no getting any error messages

many thanks|||Please post your current code.|||


public Sub page_load(sender As Object, e As EventArgs)

If Not Page.IsPostback Then

session("A")="0"

'object vars
Dim sqlConnection As SqlConnection
Dim sqlDataAdapter As SqlDataAdapter
Dim sqlCommand As SqlCommand
Dim dataSet As DataSet
Dim dataTable As DataTable

sqlConnection = New SqlConnection("user id=sa;password=testfirm;database=ken_live;server=csfirm03")

'pass the stored proc name and SqlConnection

sqlCommand = New SqlCommand("Select * From _aci",sqlConnection)

'instantiate SqlAdapter and DataSet

sqlDataAdapter = New SqlDataAdapter(sqlCommand)
dataSet = New DataSet()

'populate the DataSet

sqlDataAdapter.Fill(dataSet, "AA")

'apply sort to the DefaultView to sort by CompanyName

'dataSet.Tables(0).DefaultView.Sort = "bsheet"

city.DataSource = dataSet.Tables("AA").DefaultView

city.DataTextField ="bsheet" ' what to display

city.DataValueField ="bsheet" ' what to set as value

city.DataBind()

sqlCommand = New SqlCommand("select distinct datepart(yy,dateincur) as tempdate from ken_non_matter where nonmat in (935,1035,1040) order by datepart(yy,dateincur) desc",sqlConnection)

sqlDataAdapter = New SqlDataAdapter(sqlCommand)
dataSet = New DataSet()

'populate the DataSet

sqlDataAdapter.Fill(dataSet, "tempdate")

'apply sort to the DefaultView to sort by CompanyName

' dataSet.Tables(0).DefaultView.Sort = "tempdate"

year.DataSource = dataSet.Tables("tempdate").DefaultView

year.DataTextField ="tempdate" ' what to display

year.DataValueField ="tempdate" ' what to set as value

year.DataBind()

End if

for each li in city.items

if li.value="CITY" then

li.selected=true

end if

next

End Sub

|||As you had presented earlier, the Value property of the DDL was populated with a numeric value and the Text property was propulated with the character description (i.e., CITY).

li.value = 2

or you can use

li.text = "CITY"

You are using li.value="CITY" (this is wrong according to your previous posts)

USE li.value = 2

HTH|||You shouldn't need to loop through the liost collection, either.

After you databind (and you should always bind the list before you attempt to set a default value), simply do the following:

city.Items.FindByValue("YOUR VALUE OR FIELDNAME GOES HERE").selected = true;

You can also use FindByText, if you prefer (city.Items.FindByText("text").selected = true)

If the ddl might have already contained a selected item, be sure to use ClearSelection first, or you'll throw an error...|||this is going arround

I manage to find where I'm going wrong but don't know how to fix it

for each li in city.items

If (li.text = "CITY ") then
li.selected=true
response.write(li.value) ' just Entered it as a test ! which doesn't print at all

End if

next

It runs the FOR loop fine but doesn't enter the IF statment.

just for test if I add

for each li in city.items

response.write("-"+li.value+"-")

if (li.text = "CITY ") then
li.selected=true
response.write(li.value) ' just Entered it as a test ! which doesn't print at all

End if

next

it will print

-AFSC --CITY --HKONG --INDIA --NZ -

whitch there is a space after the string therefore , I add a space after the 'city ' in my code

for each li in city.items

response.write("-"+li.value+"-")

if (li.text = "CITY ") then
li.selected=true
response.write(li.value) ' just Entered it as a test ! which doesn't print at all

End if

next

but still it is not entering the IF section

any ideas|||You're writing too much code. Try the method I posted above...|||it is small code but I've explained it,
it doesn't run

Thursday, March 22, 2012

dropdown list and data from a table

Hi masters

well got a SQL server 7 and a table

and got drop down list in my asp page

what I want to do is that the content and value of the drop down list will be grabbed from the database, when page loads.

can you please guide me

many thanks

STry these links:

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20738865.html

http://www.codeguru.com/net_data/0672325241_ch13a.html

HTH

Monday, March 19, 2012

DROP ot TRUNCATE a table

How do I DROP or TRUNCATE a SQL Server's table in a Stored Procedure by
passing a parameter value for the tabble name; something like the following:
CREATE PROCEDURE [dbo].[MyTestTable]
@.MyTable nvarchar(50)=''
AS
If @.MyTable<>''
BEGIN
IF OBJECT_ID(@.MyTable) IS NOT NULL
TRUNCATE TABLE @.MyTable --DROP TABLE @.MyTable
END
GO
The code above returns error message on line:
TRUNCATE TABLE @.MyTableSaima wrote:
> How do I DROP or TRUNCATE a SQL Server's table in a Stored Procedure
> by passing a parameter value for the tabble name; something like the
> following:
> CREATE PROCEDURE [dbo].[MyTestTable]
> @.MyTable nvarchar(50)=''
> AS
> If @.MyTable<>''
> BEGIN
> IF OBJECT_ID(@.MyTable) IS NOT NULL
> TRUNCATE TABLE @.MyTable --DROP TABLE @.MyTable
> END
> GO
> The code above returns error message on line:
> TRUNCATE TABLE @.MyTable
Declare @.sql nvarchar(100)
Set @.sql = N'Truncate Table [' + @.MyTable + N']'
EXEC (@.sql)
David Gugick - SQL Server MVP
Quest Software

Friday, March 9, 2012

Drop Column with default constraint in T-SQL

Hello,
I'm making an SQL script that has to drop some columns. The problem is that
the column has a default value and therefore I can't use the DROP COLUMN
directly. I've got to drop the 'default' constraint, but the problem is that
we have to use this script on different database and then the constraint nam
e
is not always the same.
(example:)
DB1 -> DF_COLUMNX_ddf87d67s68
DB2 -> DF_COLUMNX_ddf79djks90
I know how to get the Constraint name but I can't use that as a variable in
the DROP CONSTRAINT function.
Has someone a solution for this problem? It has to be done with scripting!examnotes (Martijn@.discussions.microsoft.com) writes:
> I'm making an SQL script that has to drop some columns. The problem is
> that the column has a default value and therefore I can't use the DROP
> COLUMN directly. I've got to drop the 'default' constraint, but the
> problem is that we have to use this script on different database and
> then the constraint name is not always the same.
> (example:)
> DB1 -> DF_COLUMNX_ddf87d67s68
> DB2 -> DF_COLUMNX_ddf79djks90
> I know how to get the Constraint name but I can't use that as a variable
> in the DROP CONSTRAINT function.
> Has someone a solution for this problem? It has to be done with scripting!
SELECT @.default_name = o2.name
FROM syscolumns c
JOIN sysobjects o ON c.id = o.id
JOIN sysobjects o2 ON c.cdefault = o2.id
WHERE o.name = @.tbl
AND c.name = @.col
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You'll have to resort to dynamic SQL:
declare @.constraint varchar(8000), @.str varchar (8000)
set @.constraint = 'DF_COLUMNX_ddf87d67s68'
set @.str = 'alter table MyTable drop constraint ' + @.constraint
exec (@.str)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Martijn" <Martijn@.discussions.microsoft.com> wrote in message
news:3C62E773-C60A-46ED-A8A0-32E5AFDC7ACF@.microsoft.com...
Hello,
I'm making an SQL script that has to drop some columns. The problem is that
the column has a default value and therefore I can't use the DROP COLUMN
directly. I've got to drop the 'default' constraint, but the problem is that
we have to use this script on different database and then the constraint
name
is not always the same.
(example:)
DB1 -> DF_COLUMNX_ddf87d67s68
DB2 -> DF_COLUMNX_ddf79djks90
I know how to get the Constraint name but I can't use that as a variable in
the DROP CONSTRAINT function.
Has someone a solution for this problem? It has to be done with scripting!|||To have more control over constraint names, create constraints using the
ALTER TABLE:
alter table owner.table
add constraint constraint_name
default (<default_value | default_expression> )
for column_name
with values
go
This way you control the names of constraints (in this case the name of the
default constraint).
ML

Sunday, February 19, 2012

Drillthrough from matrix subtotal value

I've got a matrix as shown below:
c1 c2 Total
r1 1 2 3
r2 4 5 9
Total 5 7 12
I've set the matrix up to drillthrough to a report when I click on the cell values. But I'm having a problem getting the right results when I click on the subtotal values. I'd like to be able to click on (for example) 9 and get a got to the report getting all detail for r2 regarless of the column group. Ditto for rows if I click on a column subtotal. And I'd like to get a complete detail report if I click on 12. However, I'm not sure how to set up the drillthrough on the cell to make this happen. And it doesn't appear to be possible to set up a different drillthrough on the subtotal row/column as you cannot access their properties explicitly.Take a look at the InScope function. It was designed with this scenario in
mind. There should be an example of exactly this usage in the
documentation.
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"virtualfergy" <virtualfergy@.discussions.microsoft.com> wrote in message
news:4D5302B1-6768-4E24-83BE-F16665CF7B2A@.microsoft.com...
> I've got a matrix as shown below:
> c1 c2 Total
> r1 1 2 3
> r2 4 5 9
> Total 5 7 12
> I've set the matrix up to drillthrough to a report when I click on the
cell values. But I'm having a problem getting the right results when I click
on the subtotal values. I'd like to be able to click on (for example) 9 and
get a got to the report getting all detail for r2 regarless of the column
group. Ditto for rows if I click on a column subtotal. And I'd like to get a
complete detail report if I click on 12. However, I'm not sure how to set up
the drillthrough on the cell to make this happen. And it doesn't appear to
be possible to set up a different drillthrough on the subtotal row/column as
you cannot access their properties explicitly.|||Thanks Chris. That worked great. I looked at InScope at first but I didn't understand its purpose correctly. Not it makes perfect sense.
"Chris Hays [MSFT]" wrote:
> Take a look at the InScope function. It was designed with this scenario in
> mind. There should be an example of exactly this usage in the
> documentation.
> --
> My employer's lawyers require me to say:
> "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> "virtualfergy" <virtualfergy@.discussions.microsoft.com> wrote in message
> news:4D5302B1-6768-4E24-83BE-F16665CF7B2A@.microsoft.com...
> > I've got a matrix as shown below:
> >
> > c1 c2 Total
> > r1 1 2 3
> > r2 4 5 9
> > Total 5 7 12
> >
> > I've set the matrix up to drillthrough to a report when I click on the
> cell values. But I'm having a problem getting the right results when I click
> on the subtotal values. I'd like to be able to click on (for example) 9 and
> get a got to the report getting all detail for r2 regarless of the column
> group. Ditto for rows if I click on a column subtotal. And I'd like to get a
> complete detail report if I click on 12. However, I'm not sure how to set up
> the drillthrough on the cell to make this happen. And it doesn't appear to
> be possible to set up a different drillthrough on the subtotal row/column as
> you cannot access their properties explicitly.
>
>|||Can u share the example. Please.
"virtualfergy" wrote:
> I've got a matrix as shown below:
> c1 c2 Total
> r1 1 2 3
> r2 4 5 9
> Total 5 7 12
> I've set the matrix up to drillthrough to a report when I click on the cell values. But I'm having a problem getting the right results when I click on the subtotal values. I'd like to be able to click on (for example) 9 and get a got to the report getting all detail for r2 regarless of the column group. Ditto for rows if I click on a column subtotal. And I'd like to get a complete detail report if I click on 12. However, I'm not sure how to set up the drillthrough on the cell to make this happen. And it doesn't appear to be possible to set up a different drillthrough on the subtotal row/column as you cannot access their properties explicitly.

Friday, February 17, 2012

drilldown values

When you use the action property of a text box for drill down, how do you
pass the selected value to the report? or is sql reporting smart enough to
know?
--
Thanks,
CGWNever mind... found the button for parameters.
"CGW" wrote:
> When you use the action property of a text box for drill down, how do you
> pass the selected value to the report? or is sql reporting smart enough to
> know?
> --
> Thanks,
> CGW

Drilldown in RS?

I have structure like this:
A1
B1
C11
C12
C13
B2
C21
C22
A2
Currently, I set up so at C level, it will appear only if its value > 0. I
would like to have a drilldown structure so when I click on A level, B level
will appear but not the Cx. B will have the + only if it has child items (if
one of its child items has value > 0). If B has the + sign, it indicates it
has child items and when I click on the + sign, the C level appear only if
its value >0.
Please advice if this is doable (please show how) or this is a no-no in RS.
ThanksAlthough I have never done exactly what you wish , I think it is doable...
Set C to initially Visible = false
Set A as the Visibility Toggle for B
Set B as the Visibility Toggle for C, AND use an expression for the initial
appearance of the toggle item
All of this is set in the Advanced Textbox properties.
Good luck... This sounds nice!
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"John R" <JohnR@.hotmail.com> wrote in message
news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
>I have structure like this:
> A1
> B1
> C11
> C12
> C13
> B2
> C21
> C22
> A2
> Currently, I set up so at C level, it will appear only if its value > 0. I
> would like to have a drilldown structure so when I click on A level, B
> level will appear but not the Cx. B will have the + only if it has child
> items (if one of its child items has value > 0). If B has the + sign, it
> indicates it has child items and when I click on the + sign, the C level
> appear only if its value >0.
> Please advice if this is doable (please show how) or this is a no-no in
> RS. Thanks
>|||I tried this before I posted initially but it didn't work. The toggle always
switches the hidden state of items. So if an item has the hidden initial
state set to false, toggle will set it back to true and it doesn't take the
expression into account. What I'm looking for is a way to set the toggle
item in a expression, not statically assigned..
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:%23c3GSSqEFHA.2756@.TK2MSFTNGP15.phx.gbl...
> Although I have never done exactly what you wish , I think it is doable...
> Set C to initially Visible = false
> Set A as the Visibility Toggle for B
> Set B as the Visibility Toggle for C, AND use an expression for the
initial
> appearance of the toggle item
> All of this is set in the Advanced Textbox properties.
> Good luck... This sounds nice!
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "John R" <JohnR@.hotmail.com> wrote in message
> news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
> >I have structure like this:
> >
> > A1
> > B1
> > C11
> > C12
> > C13
> >
> > B2
> > C21
> > C22
> >
> > A2
> >
> > Currently, I set up so at C level, it will appear only if its value > 0.
I
> > would like to have a drilldown structure so when I click on A level, B
> > level will appear but not the Cx. B will have the + only if it has child
> > items (if one of its child items has value > 0). If B has the + sign, it
> > indicates it has child items and when I click on the + sign, the C level
> > appear only if its value >0.
> >
> > Please advice if this is doable (please show how) or this is a no-no in
> > RS. Thanks
> >
>|||VNN,
This is possible, I do it all the time. RS does this function well,
it's just not that obvious. Just perservere, you'll get there in the
end.
Be careful WHERE you are setting these properties. You can set them at
line level and/or cell level. The differences may seem subtle but
produce completely different results.
Set it at line level by using the row selector, this generally works
better and also transfers to Excel well.
You can set both the initial state of the +/- symbol programatically as
well as hiding/showing a row programatically, but these two things are
completely seperate as far as RS is concerned.
If in the visibility tab of the advanced properties of a cell you set
the toggle image to be expanded or collapsed or use an expression, it
has absolutely no affect on any rows toggled by that cell. It just sets
the view of the toggle to + or -.
If your rows are not behaving correctly, then the expression on the
rows 'Hidden' property is wrong. It has to evaluate to True or False,
and don't forget to start the expression with =
If you are setting the visibility at cell level, you will just get
empty cells not hidden rows.
Hope that helps.
Regards
Chris
VNN wrote:
> I tried this before I posted initially but it didn't work. The toggle
> always switches the hidden state of items. So if an item has the
> hidden initial state set to false, toggle will set it back to true
> and it doesn't take the expression into account. What I'm looking for
> is a way to set the toggle item in a expression, not statically
> assigned..
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:%23c3GSSqEFHA.2756@.TK2MSFTNGP15.phx.gbl...
> > Although I have never done exactly what you wish , I think it is
> > doable...
> >
> > Set C to initially Visible = false
> > Set A as the Visibility Toggle for B
> > Set B as the Visibility Toggle for C, AND use an expression for the
> initial
> > appearance of the toggle item
> >
> > All of this is set in the Advanced Textbox properties.
> >
> > Good luck... This sounds nice!
> >
> > --
> > Wayne Snyder, MCDBA, SQL Server MVP
> > Mariner, Charlotte, NC
> > www.mariner-usa.com
> > (Please respond only to the newsgroups.)
> >
> > I support the Professional Association of SQL Server (PASS) and it's
> > community of SQL Server professionals.
> > www.sqlpass.org
> >
> > "John R" <JohnR@.hotmail.com> wrote in message
> > news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
> > > I have structure like this:
> > >
> > > A1
> > > B1
> > > C11
> > > C12
> > > C13
> > >
> > > B2
> > > C21
> > > C22
> > >
> > > A2
> > >
> > > Currently, I set up so at C level, it will appear only if its
> > > value > 0.
> I
> > > would like to have a drilldown structure so when I click on A
> > > level, B level will appear but not the Cx. B will have the + only
> > > if it has child items (if one of its child items has value > 0).
> > > If B has the + sign, it indicates it has child items and when I
> > > click on the + sign, the C level appear only if its value >0.
> > >
> > > Please advice if this is doable (please show how) or this is a
> > > no-no in RS. Thanks
> > >
> >
> >|||I have a similar visibility issue. I have the following report parameters
(This is not my actual report but I recreated the problem using Northwind to
keep it simple)
Sort Order = Customer, Contact, Contact Title
Use drilldown = True/False
I have two groups
1st: SortOrder
2nd: Customer
I want the second group row to stay hidden when the sort option selected is
â'Customerâ' otherwise it should print and toggle. I want to be able to expand
all toggled items optionally.
Is this possible?
If you choose Sort Order: â'Customerâ' the 2nd Condition is displayed when it
should be suppressed based on and expression for the row IIF(SortOrder =â'Customerâ', True, Use drilldown)
Hope this is clear
Any thoughts?
See attached rdl
RRRRRRRRRRRRDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>350a5864-d0e6-4264-b05e-c0bd850548d8</rd:DataSourceID>
<DataSourceReference>Northwind</DataSourceReference>
</DataSource>
</DataSources>
<rd:ReportID>cd305670-04e9-4365-90d1-cc642e18fe5b</rd:ReportID>
<Body>
<ReportItems>
<Table Name="table1">
<DataSetName>DataSet1</DataSetName>
<KeepTogether>true</KeepTogether>
<TableGroups>
<TableGroup>
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox13">
<rd:DefaultName>textbox13</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>8</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox14">
<rd:DefaultName>textbox14</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>7</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox15">
<rd:DefaultName>textbox15</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>6</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
<Grouping Name="table1_Group1">
<GroupExpressions>
<GroupExpression>=Fields(
Parameters!SortOrder.Value).Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<rd:DefaultName>textbox6</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<FontWeight>700</FontWeight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>16</ZIndex>
<CanGrow>true</CanGrow>
<Value>=Fields(Parameters!SortOrder.Value).Value</Value>
</Textbox>
</ReportItems>
<ColSpan>2</ColSpan>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox12">
<rd:DefaultName>textbox12</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>15</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
</TableGroup>
<TableGroup>
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox19">
<rd:DefaultName>textbox19</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>5</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox20">
<rd:DefaultName>textbox20</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>4</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox21">
<rd:DefaultName>textbox21</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>3</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
<Grouping Name="table1_Group2">
<GroupExpressions>
<GroupExpression>=Fields!CompanyName.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Header>
<TableRows>
<TableRow>
<Visibility>
<Hidden>=iif( Parameters!SortOrder.Value="Company",True,
Parameters!SuppressDrildown.Value )</Hidden>
<ToggleItem>textbox6</ToggleItem>
</Visibility>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox16">
<rd:DefaultName>textbox16</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>14</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="CompanyName">
<rd:DefaultName>CompanyName</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>13</ZIndex>
<CanGrow>true</CanGrow>
<Value>=Fields!CompanyName.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox18">
<rd:DefaultName>textbox18</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>12</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
</TableGroup>
</TableGroups>
<Width>5.95833in</Width>
<Details>
<TableRows>
<TableRow>
<Visibility>
<Hidden>=Parameters!SuppressDrildown.Value</Hidden>
<ToggleItem>textbox6</ToggleItem>
</Visibility>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<rd:DefaultName>textbox4</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>2</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox5">
<rd:DefaultName>textbox5</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>1</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Phone">
<rd:DefaultName>Phone</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!Phone.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Details>
<Style />
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>19</ZIndex>
<CanGrow>true</CanGrow>
<Value>Sort Order</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>18</ZIndex>
<CanGrow>true</CanGrow>
<Value>Company Name</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>17</ZIndex>
<CanGrow>true</CanGrow>
<Value>Phone</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
<RepeatOnNewPage>true</RepeatOnNewPage>
</Header>
<TableColumns>
<TableColumn>
<Width>1.625in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
</TableColumns>
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>11</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<rd:DefaultName>textbox8</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>10</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<rd:DefaultName>textbox9</rd:DefaultName>
<Style>
<PaddingBottom>2pt</PaddingBottom>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<ZIndex>9</ZIndex>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
</Table>
</ReportItems>
<Height>1.75in</Height>
<Style />
</Body>
<rd:DrawGrid>true</rd:DrawGrid>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="CustomerID">
<DataField>CustomerID</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CompanyName">
<DataField>CompanyName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ContactName">
<DataField>ContactName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ContactTitle">
<DataField>ContactTitle</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Address">
<DataField>Address</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="City">
<DataField>City</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Region">
<DataField>Region</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="PostalCode">
<DataField>PostalCode</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Country">
<DataField>Country</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Phone">
<DataField>Phone</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Fax">
<DataField>Fax</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT * FROM Customers</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<Language>en-US</Language>
<RightMargin>1in</RightMargin>
<BottomMargin>1in</BottomMargin>
<TopMargin>1in</TopMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Width>6.5in</Width>
<LeftMargin>1in</LeftMargin>
<ReportParameters>
<ReportParameter Name="SortOrder">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>CompanyName</Value>
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Sort order</Prompt>
<ValidValues>
<ParameterValues>
<ParameterValue>
<Value>CompanyName</Value>
<Label>Customers</Label>
</ParameterValue>
<ParameterValue>
<Value>ContactName</Value>
<Label>Contact</Label>
</ParameterValue>
<ParameterValue>
<Value>ContactTitle</Value>
<Label>Title</Label>
</ParameterValue>
</ParameterValues>
</ValidValues>
</ReportParameter>
<ReportParameter Name="SuppressDrildown">
<DataType>Boolean</DataType>
<DefaultValue>
<Values>
<Value>True</Value>
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Use drilldown</Prompt>
</ReportParameter>
</ReportParameters>
</Report>
RRRRRRRRRRRRRDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
"Chris McGuigan" wrote:
> VNN,
> This is possible, I do it all the time. RS does this function well,
> it's just not that obvious. Just perservere, you'll get there in the
> end.
> Be careful WHERE you are setting these properties. You can set them at
> line level and/or cell level. The differences may seem subtle but
> produce completely different results.
> Set it at line level by using the row selector, this generally works
> better and also transfers to Excel well.
> You can set both the initial state of the +/- symbol programatically as
> well as hiding/showing a row programatically, but these two things are
> completely seperate as far as RS is concerned.
> If in the visibility tab of the advanced properties of a cell you set
> the toggle image to be expanded or collapsed or use an expression, it
> has absolutely no affect on any rows toggled by that cell. It just sets
> the view of the toggle to + or -.
> If your rows are not behaving correctly, then the expression on the
> rows 'Hidden' property is wrong. It has to evaluate to True or False,
> and don't forget to start the expression with => If you are setting the visibility at cell level, you will just get
> empty cells not hidden rows.
> Hope that helps.
> Regards
> Chris
>
> VNN wrote:
> > I tried this before I posted initially but it didn't work. The toggle
> > always switches the hidden state of items. So if an item has the
> > hidden initial state set to false, toggle will set it back to true
> > and it doesn't take the expression into account. What I'm looking for
> > is a way to set the toggle item in a expression, not statically
> > assigned..
> >
> > "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> > news:%23c3GSSqEFHA.2756@.TK2MSFTNGP15.phx.gbl...
> > > Although I have never done exactly what you wish , I think it is
> > > doable...
> > >
> > > Set C to initially Visible = false
> > > Set A as the Visibility Toggle for B
> > > Set B as the Visibility Toggle for C, AND use an expression for the
> > initial
> > > appearance of the toggle item
> > >
> > > All of this is set in the Advanced Textbox properties.
> > >
> > > Good luck... This sounds nice!
> > >
> > > --
> > > Wayne Snyder, MCDBA, SQL Server MVP
> > > Mariner, Charlotte, NC
> > > www.mariner-usa.com
> > > (Please respond only to the newsgroups.)
> > >
> > > I support the Professional Association of SQL Server (PASS) and it's
> > > community of SQL Server professionals.
> > > www.sqlpass.org
> > >
> > > "John R" <JohnR@.hotmail.com> wrote in message
> > > news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
> > > > I have structure like this:
> > > >
> > > > A1
> > > > B1
> > > > C11
> > > > C12
> > > > C13
> > > >
> > > > B2
> > > > C21
> > > > C22
> > > >
> > > > A2
> > > >
> > > > Currently, I set up so at C level, it will appear only if its
> > > > value > 0.
> > I
> > > > would like to have a drilldown structure so when I click on A
> > > > level, B level will appear but not the Cx. B will have the + only
> > > > if it has child items (if one of its child items has value > 0).
> > > > If B has the + sign, it indicates it has child items and when I
> > > > click on the + sign, the C level appear only if its value >0.
> > > >
> > > > Please advice if this is doable (please show how) or this is a
> > > > no-no in RS. Thanks
> > > >
> > >
> > >
>|||I use another parameter, 'Expand All' True/False. Then use that
parameter in the Initial Visibilty properties.
You could use an exression something like this;
=Not Parameter!Expand.Value Or Parameter!Sort.Value = "Customer"
Chris
John wrote:
> I have a similar visibility issue. I have the following report
> parameters
> (This is not my actual report but I recreated the problem using
> Northwind to keep it simple)
> Sort Order = Customer, Contact, Contact Title
> Use drilldown = True/False
> I have two groups
> 1st: SortOrder
> 2nd: Customer
> I want the second group row to stay hidden when the sort option
> selected is â'Customerâ' otherwise it should print and toggle. I
> want to be able to expand all toggled items optionally.
> Is this possible?
> If you choose Sort Order: â'Customerâ' the 2nd Condition is
> displayed when it should be suppressed based on and expression for
> the row IIF(SortOrder = â'Customerâ', True, Use drilldown)
> Hope this is clear
> Any thoughts?
> See attached rdl
> RRRRRRRRRRRRDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/report
> definition"
> xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesig
> ner"> <DataSources> <DataSource Name="Northwind">
> <rd:DataSourceID>350a5864-d0e6-4264-b05e-c0bd850548d8</rd:DataSourceID
> > <DataSourceReference>Northwind</DataSourceReference>
> </DataSource> </DataSources>
> <rd:ReportID>cd305670-04e9-4365-90d1-cc642e18fe5b</rd:ReportID>
> <Body>
> <ReportItems>
> <Table Name="table1">
> <DataSetName>DataSet1</DataSetName>
> <KeepTogether>true</KeepTogether>
> <TableGroups>
> <TableGroup>
> <Footer>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox13">
> <rd:DefaultName>textbox13</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>8</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox14">
> <rd:DefaultName>textbox14</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>7</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox15">
> <rd:DefaultName>textbox15</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>6</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Footer>
> <Grouping Name="table1_Group1">
> <GroupExpressions>
> <GroupExpression>=Fields(
> Parameters!SortOrder.Value).Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> <Header>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox6">
> <rd:DefaultName>textbox6</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <FontWeight>700</FontWeight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>16</ZIndex>
> <CanGrow>true</CanGrow>
> <Value>=Fields(Parameters!SortOrder.Value).Value</Value>
> </Textbox>
> </ReportItems>
> <ColSpan>2</ColSpan>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox12">
> <rd:DefaultName>textbox12</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>15</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Header>
> </TableGroup>
> <TableGroup>
> <Footer>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox19">
> <rd:DefaultName>textbox19</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>5</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox20">
> <rd:DefaultName>textbox20</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>4</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox21">
> <rd:DefaultName>textbox21</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>3</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Footer>
> <Grouping Name="table1_Group2">
> <GroupExpressions>
> <GroupExpression>=Fields!CompanyName.Value</GroupExpression>
> </GroupExpressions> </Grouping>
> <Header>
> <TableRows>
> <TableRow>
> <Visibility>
> <Hidden>=iif(
> Parameters!SortOrder.Value="Company",True,
> Parameters!SuppressDrildown.Value )</Hidden>
> <ToggleItem>textbox6</ToggleItem> </Visibility>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox16">
> <rd:DefaultName>textbox16</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <VerticalAlign>Middle</VerticalAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>14</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="CompanyName">
> <rd:DefaultName>CompanyName</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>13</ZIndex>
> <CanGrow>true</CanGrow>
> <Value>=Fields!CompanyName.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox18">
> <rd:DefaultName>textbox18</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>12</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Header>
> </TableGroup>
> </TableGroups>
> <Width>5.95833in</Width>
> <Details>
> <TableRows>
> <TableRow>
> <Visibility>
> <Hidden>=Parameters!SuppressDrildown.Value</Hidden>
> <ToggleItem>textbox6</ToggleItem>
> </Visibility>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox4">
> <rd:DefaultName>textbox4</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>2</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox5">
> <rd:DefaultName>textbox5</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>1</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="Phone">
> <rd:DefaultName>Phone</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Phone.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Details>
> <Style />
> <Header>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox1">
> <rd:DefaultName>textbox1</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>19</ZIndex>
> <CanGrow>true</CanGrow>
> <Value>Sort Order</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox2">
> <rd:DefaultName>textbox2</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>18</ZIndex>
> <CanGrow>true</CanGrow>
> <Value>Company Name</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox3">
> <rd:DefaultName>textbox3</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>17</ZIndex>
> <CanGrow>true</CanGrow>
> <Value>Phone</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> <RepeatOnNewPage>true</RepeatOnNewPage>
> </Header>
> <TableColumns>
> <TableColumn>
> <Width>1.625in</Width>
> </TableColumn>
> <TableColumn>
> <Width>2.16667in</Width>
> </TableColumn>
> <TableColumn>
> <Width>2.16667in</Width>
> </TableColumn>
> </TableColumns>
> <Footer>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox7">
> <rd:DefaultName>textbox7</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>11</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox8">
> <rd:DefaultName>textbox8</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>10</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox9">
> <rd:DefaultName>textbox9</rd:DefaultName>
> <Style>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <ZIndex>9</ZIndex>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Footer>
> </Table>
> </ReportItems>
> <Height>1.75in</Height>
> <Style />
> </Body>
> <rd:DrawGrid>true</rd:DrawGrid>
> <DataSets>
> <DataSet Name="DataSet1">
> <Fields>
> <Field Name="CustomerID">
> <DataField>CustomerID</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="CompanyName">
> <DataField>CompanyName</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="ContactName">
> <DataField>ContactName</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="ContactTitle">
> <DataField>ContactTitle</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Address">
> <DataField>Address</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="City">
> <DataField>City</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Region">
> <DataField>Region</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="PostalCode">
> <DataField>PostalCode</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Country">
> <DataField>Country</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Phone">
> <DataField>Phone</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Fax">
> <DataField>Fax</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> </Fields>
> <Query>
> <DataSourceName>Northwind</DataSourceName>
> <CommandText>SELECT * FROM Customers</CommandText>
> <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> </Query>
> </DataSet>
> </DataSets>
> <Language>en-US</Language>
> <RightMargin>1in</RightMargin>
> <BottomMargin>1in</BottomMargin>
> <TopMargin>1in</TopMargin>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <Width>6.5in</Width>
> <LeftMargin>1in</LeftMargin>
> <ReportParameters>
> <ReportParameter Name="SortOrder">
> <DataType>String</DataType>
> <DefaultValue>
> <Values>
> <Value>CompanyName</Value>
> </Values>
> </DefaultValue>
> <AllowBlank>true</AllowBlank>
> <Prompt>Sort order</Prompt>
> <ValidValues>
> <ParameterValues>
> <ParameterValue>
> <Value>CompanyName</Value>
> <Label>Customers</Label>
> </ParameterValue>
> <ParameterValue>
> <Value>ContactName</Value>
> <Label>Contact</Label>
> </ParameterValue>
> <ParameterValue>
> <Value>ContactTitle</Value>
> <Label>Title</Label>
> </ParameterValue>
> </ParameterValues>
> </ValidValues>
> </ReportParameter>
> <ReportParameter Name="SuppressDrildown">
> <DataType>Boolean</DataType>
> <DefaultValue>
> <Values>
> <Value>True</Value>
> </Values>
> </DefaultValue>
> <AllowBlank>true</AllowBlank>
> <Prompt>Use drilldown</Prompt>
> </ReportParameter>
> </ReportParameters>
> </Report>
>
> RRRRRRRRRRRRRDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
>
> "Chris McGuigan" wrote:
> > VNN,
> > This is possible, I do it all the time. RS does this function well,
> > it's just not that obvious. Just perservere, you'll get there in the
> > end.
> >
> > Be careful WHERE you are setting these properties. You can set them
> > at line level and/or cell level. The differences may seem subtle but
> > produce completely different results.
> >
> > Set it at line level by using the row selector, this generally works
> > better and also transfers to Excel well.
> >
> > You can set both the initial state of the +/- symbol
> > programatically as well as hiding/showing a row programatically,
> > but these two things are completely seperate as far as RS is
> > concerned.
> >
> > If in the visibility tab of the advanced properties of a cell you
> > set the toggle image to be expanded or collapsed or use an
> > expression, it has absolutely no affect on any rows toggled by that
> > cell. It just sets the view of the toggle to + or -.
> >
> > If your rows are not behaving correctly, then the expression on the
> > rows 'Hidden' property is wrong. It has to evaluate to True or
> > False, and don't forget to start the expression with => >
> > If you are setting the visibility at cell level, you will just get
> > empty cells not hidden rows.
> >
> > Hope that helps.
> >
> > Regards
> > Chris
> >
> >
> > VNN wrote:
> >
> > > I tried this before I posted initially but it didn't work. The
> > > toggle always switches the hidden state of items. So if an item
> > > has the hidden initial state set to false, toggle will set it
> > > back to true and it doesn't take the expression into account.
> > > What I'm looking for is a way to set the toggle item in a
> > > expression, not statically assigned..
> > >
> > > "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in
> > > message news:%23c3GSSqEFHA.2756@.TK2MSFTNGP15.phx.gbl...
> > > > Although I have never done exactly what you wish , I think it is
> > > > doable...
> > > >
> > > > Set C to initially Visible = false
> > > > Set A as the Visibility Toggle for B
> > > > Set B as the Visibility Toggle for C, AND use an expression for
> > > > the
> > > initial
> > > > appearance of the toggle item
> > > >
> > > > All of this is set in the Advanced Textbox properties.
> > > >
> > > > Good luck... This sounds nice!
> > > >
> > > > --
> > > > Wayne Snyder, MCDBA, SQL Server MVP
> > > > Mariner, Charlotte, NC
> > > > www.mariner-usa.com
> > > > (Please respond only to the newsgroups.)
> > > >
> > > > I support the Professional Association of SQL Server (PASS) and
> > > > it's community of SQL Server professionals.
> > > > www.sqlpass.org
> > > >
> > > > "John R" <JohnR@.hotmail.com> wrote in message
> > > > news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
> > > > > I have structure like this:
> > > > >
> > > > > A1
> > > > > B1
> > > > > C11
> > > > > C12
> > > > > C13
> > > > >
> > > > > B2
> > > > > C21
> > > > > C22
> > > > >
> > > > > A2
> > > > >
> > > > > Currently, I set up so at C level, it will appear only if its
> > > > > value > 0.
> > > I
> > > > > would like to have a drilldown structure so when I click on A
> > > > > level, B level will appear but not the Cx. B will have the +
> > > > > only if it has child items (if one of its child items has
> > > > > value > 0). If B has the + sign, it indicates it has child
> > > > > items and when I click on the + sign, the C level appear only
> > > > > if its value >0.
> > > > >
> > > > > Please advice if this is doable (please show how) or this is a
> > > > > no-no in RS. Thanks
> > > > >
> > > >
> > > >
> >
> >|||Thanks for responding Chris.
This is what I'm doing on the second group, but it appears that the
"ToggleItem" property takes precedence over "Hidden" and as far as I can tell
you can't add an expression to a ToggleItem. It's important that the second
group row be suppressed when "Customer" is selected and not merely blank.
"Chris McGuigan" wrote:
> I use another parameter, 'Expand All' True/False. Then use that
> parameter in the Initial Visibilty properties.
> You could use an exression something like this;
> =Not Parameter!Expand.Value Or Parameter!Sort.Value = "Customer"
> Chris
>
> John wrote:
> > I have a similar visibility issue. I have the following report
> > parameters
> >
> > (This is not my actual report but I recreated the problem using
> > Northwind to keep it simple)
> >
> > Sort Order = Customer, Contact, Contact Title
> > Use drilldown = True/False
> >
> > I have two groups
> > 1st: SortOrder
> > 2nd: Customer
> >
> > I want the second group row to stay hidden when the sort option
> > selected is â'Customerâ' otherwise it should print and toggle. I
> > want to be able to expand all toggled items optionally.
> >
> > Is this possible?
> >
> > If you choose Sort Order: â'Customerâ' the 2nd Condition is
> > displayed when it should be suppressed based on and expression for
> > the row IIF(SortOrder = â'Customerâ', True, Use drilldown)
> >
> > Hope this is clear
> >
> > Any thoughts?
> >
> > See attached rdl
> >
> > RRRRRRRRRRRRDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
> > <?xml version="1.0" encoding="utf-8"?>
> > <Report
> > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/report
> > definition"
> > xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesig
> > ner"> <DataSources> <DataSource Name="Northwind">
> >
> > <rd:DataSourceID>350a5864-d0e6-4264-b05e-c0bd850548d8</rd:DataSourceID
> > > <DataSourceReference>Northwind</DataSourceReference>
> > </DataSource> </DataSources>
> > <rd:ReportID>cd305670-04e9-4365-90d1-cc642e18fe5b</rd:ReportID>
> > <Body>
> > <ReportItems>
> > <Table Name="table1">
> > <DataSetName>DataSet1</DataSetName>
> > <KeepTogether>true</KeepTogether>
> > <TableGroups>
> > <TableGroup>
> > <Footer>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox13">
> > <rd:DefaultName>textbox13</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>8</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox14">
> > <rd:DefaultName>textbox14</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>7</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox15">
> > <rd:DefaultName>textbox15</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>6</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Footer>
> > <Grouping Name="table1_Group1">
> > <GroupExpressions>
> > <GroupExpression>=Fields(
> > Parameters!SortOrder.Value).Value</GroupExpression>
> > </GroupExpressions>
> > </Grouping>
> > <Header>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox6">
> > <rd:DefaultName>textbox6</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <FontWeight>700</FontWeight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>16</ZIndex>
> > <CanGrow>true</CanGrow>
> >
> > <Value>=Fields(Parameters!SortOrder.Value).Value</Value>
> > </Textbox>
> > </ReportItems>
> > <ColSpan>2</ColSpan>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox12">
> > <rd:DefaultName>textbox12</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>15</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Header>
> > </TableGroup>
> > <TableGroup>
> > <Footer>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox19">
> > <rd:DefaultName>textbox19</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>5</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox20">
> > <rd:DefaultName>textbox20</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>4</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox21">
> > <rd:DefaultName>textbox21</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>3</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Footer>
> > <Grouping Name="table1_Group2">
> > <GroupExpressions>
> >
> > <GroupExpression>=Fields!CompanyName.Value</GroupExpression>
> > </GroupExpressions> </Grouping>
> > <Header>
> > <TableRows>
> > <TableRow>
> > <Visibility>
> > <Hidden>=iif(
> > Parameters!SortOrder.Value="Company",True,
> > Parameters!SuppressDrildown.Value )</Hidden>
> > <ToggleItem>textbox6</ToggleItem> </Visibility>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox16">
> > <rd:DefaultName>textbox16</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <VerticalAlign>Middle</VerticalAlign>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>14</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="CompanyName">
> > <rd:DefaultName>CompanyName</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>13</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!CompanyName.Value</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox18">
> > <rd:DefaultName>textbox18</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>12</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Header>
> > </TableGroup>
> > </TableGroups>
> > <Width>5.95833in</Width>
> > <Details>
> > <TableRows>
> > <TableRow>
> > <Visibility>
> > <Hidden>=Parameters!SuppressDrildown.Value</Hidden>
> > <ToggleItem>textbox6</ToggleItem>
> > </Visibility>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox4">
> > <rd:DefaultName>textbox4</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>2</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox5">
> > <rd:DefaultName>textbox5</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>1</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="Phone">
> > <rd:DefaultName>Phone</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!Phone.Value</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Details>
> > <Style />
> > <Header>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox1">
> > <rd:DefaultName>textbox1</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>19</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value>Sort Order</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox2">
> > <rd:DefaultName>textbox2</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>18</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value>Company Name</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox3">
> > <rd:DefaultName>textbox3</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>17</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value>Phone</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > <RepeatOnNewPage>true</RepeatOnNewPage>
> > </Header>
> > <TableColumns>
> > <TableColumn>
> > <Width>1.625in</Width>
> > </TableColumn>
> > <TableColumn>
> > <Width>2.16667in</Width>
> > </TableColumn>
> > <TableColumn>
> > <Width>2.16667in</Width>
> > </TableColumn>
> > </TableColumns>
> > <Footer>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox7">
> > <rd:DefaultName>textbox7</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>11</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox8">
> > <rd:DefaultName>textbox8</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>10</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox9">
> > <rd:DefaultName>textbox9</rd:DefaultName>
> > <Style>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <ZIndex>9</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Footer>
> > </Table>
> > </ReportItems>
> > <Height>1.75in</Height>
> > <Style />
> > </Body>
> > <rd:DrawGrid>true</rd:DrawGrid>
> > <DataSets>
> > <DataSet Name="DataSet1">
> > <Fields>
> > <Field Name="CustomerID">
> > <DataField>CustomerID</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="CompanyName">
> > <DataField>CompanyName</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="ContactName">
> > <DataField>ContactName</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="ContactTitle">
> > <DataField>ContactTitle</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="Address">
> > <DataField>Address</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="City">
> > <DataField>City</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="Region">
> > <DataField>Region</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="PostalCode">
> > <DataField>PostalCode</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="Country">
> > <DataField>Country</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="Phone">
> > <DataField>Phone</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > <Field Name="Fax">
> > <DataField>Fax</DataField>
> > <rd:TypeName>System.String</rd:TypeName>
> > </Field>
> > </Fields>
> > <Query>
> > <DataSourceName>Northwind</DataSourceName>
> > <CommandText>SELECT * FROM Customers</CommandText>
> > <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> > </Query>
> > </DataSet>
> > </DataSets>
> > <Language>en-US</Language>
> > <RightMargin>1in</RightMargin>
> > <BottomMargin>1in</BottomMargin>
> > <TopMargin>1in</TopMargin>
> > <rd:SnapToGrid>true</rd:SnapToGrid>
> > <Width>6.5in</Width>
> > <LeftMargin>1in</LeftMargin>
> > <ReportParameters>
> > <ReportParameter Name="SortOrder">
> > <DataType>String</DataType>
> > <DefaultValue>
> > <Values>
> > <Value>CompanyName</Value>
> > </Values>
> > </DefaultValue>
> > <AllowBlank>true</AllowBlank>
> > <Prompt>Sort order</Prompt>
> > <ValidValues>
> > <ParameterValues>
> > <ParameterValue>
> > <Value>CompanyName</Value>
> > <Label>Customers</Label>
> > </ParameterValue>
> > <ParameterValue>
> > <Value>ContactName</Value>
> > <Label>Contact</Label>
> > </ParameterValue>
> > <ParameterValue>
> > <Value>ContactTitle</Value>
> > <Label>Title</Label>
> > </ParameterValue>
> > </ParameterValues>
> > </ValidValues>
> > </ReportParameter>
> > <ReportParameter Name="SuppressDrildown">
> > <DataType>Boolean</DataType>
> > <DefaultValue>
> > <Values>
> > <Value>True</Value>
> > </Values>
> > </DefaultValue>
> > <AllowBlank>true</AllowBlank>
> > <Prompt>Use drilldown</Prompt>
> > </ReportParameter>
> > </ReportParameters>
> > </Report>
> >
> >
> > RRRRRRRRRRRRRDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
> >
> >
> > "Chris McGuigan" wrote:
> >
> > > VNN,
> > > This is possible, I do it all the time. RS does this function well,
> > > it's just not that obvious. Just perservere, you'll get there in the
> > > end.
> > >
> > > Be careful WHERE you are setting these properties. You can set them
> > > at line level and/or cell level. The differences may seem subtle but
> > > produce completely different results.
> > >
> > > Set it at line level by using the row selector, this generally works
> > > better and also transfers to Excel well.
> > >
> > > You can set both the initial state of the +/- symbol
> > > programatically as well as hiding/showing a row programatically,
> > > but these two things are completely seperate as far as RS is
> > > concerned.
> > >
> > > If in the visibility tab of the advanced properties of a cell you
> > > set the toggle image to be expanded or collapsed or use an
> > > expression, it has absolutely no affect on any rows toggled by that
> > > cell. It just sets the view of the toggle to + or -.
> > >
> > > If your rows are not behaving correctly, then the expression on the
> > > rows 'Hidden' property is wrong. It has to evaluate to True or
> > > False, and don't forget to start the expression with => > >
> > > If you are setting the visibility at cell level, you will just get
> > > empty cells not hidden rows.
> > >
> > > Hope that helps.
> > >
> > > Regards
> > > Chris
> > >
> > >
> > > VNN wrote:
> > >
> > > > I tried this before I posted initially but it didn't work. The
> > > > toggle always switches the hidden state of items. So if an item
> > > > has the hidden initial state set to false, toggle will set it
> > > > back to true and it doesn't take the expression into account.
> > > > What I'm looking for is a way to set the toggle item in a
> > > > expression, not statically assigned..
> > > >
> > > > "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in
> > > > message news:%23c3GSSqEFHA.2756@.TK2MSFTNGP15.phx.gbl...
> > > > > Although I have never done exactly what you wish , I think it is
> > > > > doable...
> > > > >
> > > > > Set C to initially Visible = false
> > > > > Set A as the Visibility Toggle for B
> > > > > Set B as the Visibility Toggle for C, AND use an expression for
> > > > > the
> > > > initial
> > > > > appearance of the toggle item
> > > > >
> > > > > All of this is set in the Advanced Textbox properties.
> > > > >
> > > > > Good luck... This sounds nice!
> > > > >
> > > > > --
> > > > > Wayne Snyder, MCDBA, SQL Server MVP
> > > > > Mariner, Charlotte, NC
> > > > > www.mariner-usa.com
> > > > > (Please respond only to the newsgroups.)
> > > > >
> > > > > I support the Professional Association of SQL Server (PASS) and
> > > > > it's community of SQL Server professionals.
> > > > > www.sqlpass.org
> > > > >
> > > > > "John R" <JohnR@.hotmail.com> wrote in message
> > > > > news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
> > > > > > I have structure like this:
> > > > > >
> > > > > > A1
> > > > > > B1
> > > > > > C11
> > > > > > C12
> > > > > > C13
> > > > > >
> > > > > > B2
> > > > > > C21
> > > > > > C22
> > > > > >
> > > > > > A2
> > > > > >
> > > > > > Currently, I set up so at C level, it will appear only if its
> > > > > > value > 0.
> > > > I
> > > > > > would like to have a drilldown structure so when I click on A
> > > > > > level, B level will appear but not the Cx. B will have the +
> > > > > > only if it has child items (if one of its child items has
> > > > > > value > 0). If B has the + sign, it indicates it has child
> > > > > > items and when I click on the + sign, the C level appear only
> > > > > > if its value >0.
> > > > > >
> > > > > > Please advice if this is doable (please show how) or this is a
> > > > > > no-no in RS. Thanks
> > > > > >
> > > > >
> > > > >
> > >
> > >
>|||FYI: ToggleItem can only be a cell name. You also cannot tell the state
of the toggleitem.
Are you saying that the user is still able to 'toggle' to group 2 even
if sort order = customer?
If you need to hide the toggle, create another column, make it about
0.5cm wide, make the appropriate cell in this column the toggle for
group 2. Then in that cells visibility/hidden property, set it to
=Parameter!SortOrder.Value = "Customer"
This will make the toggle disappear if sort order is customer.
Chris
John wrote:
> Thanks for responding Chris.
> This is what I'm doing on the second group, but it appears that the
> "ToggleItem" property takes precedence over "Hidden" and as far as I
> can tell you can't add an expression to a ToggleItem. It's important
> that the second group row be suppressed when "Customer" is selected
> and not merely blank.
> "Chris McGuigan" wrote:
> > I use another parameter, 'Expand All' True/False. Then use that
> > parameter in the Initial Visibilty properties.
> >
> > You could use an exression something like this;
> > =Not Parameter!Expand.Value Or Parameter!Sort.Value = "Customer"
> >
> > Chris
> >
> >
> >
> > John wrote:
> >
> > > I have a similar visibility issue. I have the following report
> > > parameters
> > >
> > > (This is not my actual report but I recreated the problem using
> > > Northwind to keep it simple)
> > >
> > > Sort Order = Customer, Contact, Contact Title
> > > Use drilldown = True/False
> > >
> > > I have two groups
> > > 1st: SortOrder
> > > 2nd: Customer
> > >
> > > I want the second group row to stay hidden when the sort option
> > > selected is â'Customerâ' otherwise it should print and toggle.
> > > I want to be able to expand all toggled items optionally.
> > >
> > > Is this possible?
> > >
> > > If you choose Sort Order: â'Customerâ' the 2nd Condition is
> > > displayed when it should be suppressed based on and expression for
> > > the row IIF(SortOrder = â'Customerâ', True, Use drilldown)
> > >
> > > Hope this is clear
> > >
> > > Any thoughts?
> > >
> > > See attached rdl
> > >
> > > RRRRRRRRRRRRDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <Report
> > > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/re
> > > port definition"
> > > xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportd
> > > esig ner"> <DataSources> <DataSource Name="Northwind">
> > >
> > > <rd:DataSourceID>350a5864-d0e6-4264-b05e-c0bd850548d8</rd:DataSour
> > > ceID
> > > > <DataSourceReference>Northwind</DataSourceReference>
> > > </DataSource> </DataSources>
> > > <rd:ReportID>cd305670-04e9-4365-90d1-cc642e18fe5b</rd:ReportID>
> > > <Body>
> > > <ReportItems>
> > > <Table Name="table1">
> > > <DataSetName>DataSet1</DataSetName>
> > > <KeepTogether>true</KeepTogether>
> > > <TableGroups>
> > > <TableGroup>
> > > <Footer>
> > > <TableRows>
> > > <TableRow>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox13">
> > >
> > > <rd:DefaultName>textbox13</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>8</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox14">
> > >
> > > <rd:DefaultName>textbox14</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>7</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox15">
> > >
> > > <rd:DefaultName>textbox15</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>6</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > </Footer>
> > > <Grouping Name="table1_Group1">
> > > <GroupExpressions>
> > > <GroupExpression>=Fields(
> > > Parameters!SortOrder.Value).Value</GroupExpression>
> > > </GroupExpressions>
> > > </Grouping>
> > > <Header>
> > > <TableRows>
> > > <TableRow>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox6">
> > >
> > > <rd:DefaultName>textbox6</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <FontWeight>700</FontWeight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>16</ZIndex>
> > > <CanGrow>true</CanGrow>
> > >
> > > <Value>=Fields(Parameters!SortOrder.Value).Value</Value>
> > > </Textbox>
> > > </ReportItems>
> > > <ColSpan>2</ColSpan>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox12">
> > >
> > > <rd:DefaultName>textbox12</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>15</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > </Header>
> > > </TableGroup>
> > > <TableGroup>
> > > <Footer>
> > > <TableRows>
> > > <TableRow>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox19">
> > >
> > > <rd:DefaultName>textbox19</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>5</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox20">
> > >
> > > <rd:DefaultName>textbox20</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>4</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox21">
> > >
> > > <rd:DefaultName>textbox21</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>3</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > </Footer>
> > > <Grouping Name="table1_Group2">
> > > <GroupExpressions>
> > >
> > > <GroupExpression>=Fields!CompanyName.Value</GroupExpression>
> > > </GroupExpressions> </Grouping>
> > > <Header>
> > > <TableRows>
> > > <TableRow>
> > > <Visibility>
> > > <Hidden>=iif(
> > > Parameters!SortOrder.Value="Company",True,
> > > Parameters!SuppressDrildown.Value )</Hidden>
> > > <ToggleItem>textbox6</ToggleItem> </Visibility>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox16">
> > >
> > > <rd:DefaultName>textbox16</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <VerticalAlign>Middle</VerticalAlign>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>14</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="CompanyName">
> > >
> > > <rd:DefaultName>CompanyName</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>13</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value>=Fields!CompanyName.Value</Value>
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox18">
> > >
> > > <rd:DefaultName>textbox18</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop> </Style>
> > > <ZIndex>12</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > </Header>
> > > </TableGroup>
> > > </TableGroups>
> > > <Width>5.95833in</Width>
> > > <Details>
> > > <TableRows>
> > > <TableRow>
> > > <Visibility>
> > >
> > > <Hidden>=Parameters!SuppressDrildown.Value</Hidden>
> > > <ToggleItem>textbox6</ToggleItem> </Visibility>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox4">
> > > <rd:DefaultName>textbox4</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>2</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox5">
> > > <rd:DefaultName>textbox5</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>1</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="Phone">
> > > <rd:DefaultName>Phone</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <CanGrow>true</CanGrow>
> > > <Value>=Fields!Phone.Value</Value>
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > </Details>
> > > <Style />
> > > <Header>
> > > <TableRows>
> > > <TableRow>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox1">
> > > <rd:DefaultName>textbox1</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>19</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value>Sort Order</Value>
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox2">
> > > <rd:DefaultName>textbox2</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>18</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value>Company Name</Value>
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox3">
> > > <rd:DefaultName>textbox3</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>17</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value>Phone</Value>
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > <RepeatOnNewPage>true</RepeatOnNewPage>
> > > </Header>
> > > <TableColumns>
> > > <TableColumn>
> > > <Width>1.625in</Width>
> > > </TableColumn>
> > > <TableColumn>
> > > <Width>2.16667in</Width>
> > > </TableColumn>
> > > <TableColumn>
> > > <Width>2.16667in</Width>
> > > </TableColumn>
> > > </TableColumns>
> > > <Footer>
> > > <TableRows>
> > > <TableRow>
> > > <TableCells>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox7">
> > > <rd:DefaultName>textbox7</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>11</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox8">
> > > <rd:DefaultName>textbox8</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>10</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > <TableCell>
> > > <ReportItems>
> > > <Textbox Name="textbox9">
> > > <rd:DefaultName>textbox9</rd:DefaultName>
> > > <Style>
> > > <PaddingBottom>2pt</PaddingBottom>
> > > <PaddingLeft>2pt</PaddingLeft>
> > > <PaddingRight>2pt</PaddingRight>
> > > <PaddingTop>2pt</PaddingTop>
> > > </Style>
> > > <ZIndex>9</ZIndex>
> > > <CanGrow>true</CanGrow>
> > > <Value />
> > > </Textbox>
> > > </ReportItems>
> > > </TableCell>
> > > </TableCells>
> > > <Height>0.25in</Height>
> > > </TableRow>
> > > </TableRows>
> > > </Footer>
> > > </Table>
> > > </ReportItems>
> > > <Height>1.75in</Height>
> > > <Style />
> > > </Body>
> > > <rd:DrawGrid>true</rd:DrawGrid>
> > > <DataSets>
> > > <DataSet Name="DataSet1">
> > > <Fields>
> > > <Field Name="CustomerID">
> > > <DataField>CustomerID</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="CompanyName">
> > > <DataField>CompanyName</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="ContactName">
> > > <DataField>ContactName</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="ContactTitle">
> > > <DataField>ContactTitle</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="Address">
> > > <DataField>Address</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="City">
> > > <DataField>City</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="Region">
> > > <DataField>Region</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="PostalCode">
> > > <DataField>PostalCode</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="Country">
> > > <DataField>Country</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="Phone">
> > > <DataField>Phone</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > <Field Name="Fax">
> > > <DataField>Fax</DataField>
> > > <rd:TypeName>System.String</rd:TypeName>
> > > </Field>
> > > </Fields>
> > > <Query>
> > > <DataSourceName>Northwind</DataSourceName>
> > > <CommandText>SELECT * FROM Customers</CommandText>
> > > <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> > > </Query>
> > > </DataSet>
> > > </DataSets>
> > > <Language>en-US</Language>
> > > <RightMargin>1in</RightMargin>
> > > <BottomMargin>1in</BottomMargin>
> > > <TopMargin>1in</TopMargin>
> > > <rd:SnapToGrid>true</rd:SnapToGrid>
> > > <Width>6.5in</Width>
> > > <LeftMargin>1in</LeftMargin>
> > > <ReportParameters>
> > > <ReportParameter Name="SortOrder">
> > > <DataType>String</DataType>
> > > <DefaultValue>
> > > <Values>
> > > <Value>CompanyName</Value>
> > > </Values>
> > > </DefaultValue>
> > > <AllowBlank>true</AllowBlank>
> > > <Prompt>Sort order</Prompt>
> > > <ValidValues>
> > > <ParameterValues>
> > > <ParameterValue>
> > > <Value>CompanyName</Value>
> > > <Label>Customers</Label>
> > > </ParameterValue>
> > > <ParameterValue>
> > > <Value>ContactName</Value>
> > > <Label>Contact</Label>
> > > </ParameterValue>
> > > <ParameterValue>
> > > <Value>ContactTitle</Value>
> > > <Label>Title</Label>
> > > </ParameterValue>
> > > </ParameterValues>
> > > </ValidValues>
> > > </ReportParameter>
> > > <ReportParameter Name="SuppressDrildown">
> > > <DataType>Boolean</DataType>
> > > <DefaultValue>
> > > <Values>
> > > <Value>True</Value>
> > > </Values>
> > > </DefaultValue>
> > > <AllowBlank>true</AllowBlank>
> > > <Prompt>Use drilldown</Prompt>
> > > </ReportParameter>
> > > </ReportParameters>
> > > </Report>
> > >
> > >
> > > RRRRRRRRRRRRRDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLL
> > >
> > >
> > > "Chris McGuigan" wrote:
> > >
> > > > VNN,
> > > > This is possible, I do it all the time. RS does this function
> > > > well, it's just not that obvious. Just perservere, you'll get
> > > > there in the end.
> > > >
> > > > Be careful WHERE you are setting these properties. You can set
> > > > them at line level and/or cell level. The differences may seem
> > > > subtle but produce completely different results.
> > > >
> > > > Set it at line level by using the row selector, this generally
> > > > works better and also transfers to Excel well.
> > > >
> > > > You can set both the initial state of the +/- symbol
> > > > programatically as well as hiding/showing a row programatically,
> > > > but these two things are completely seperate as far as RS is
> > > > concerned.
> > > >
> > > > If in the visibility tab of the advanced properties of a cell
> > > > you set the toggle image to be expanded or collapsed or use an
> > > > expression, it has absolutely no affect on any rows toggled by
> > > > that cell. It just sets the view of the toggle to + or -.
> > > >
> > > > If your rows are not behaving correctly, then the expression on
> > > > the rows 'Hidden' property is wrong. It has to evaluate to True
> > > > or False, and don't forget to start the expression with => > > >
> > > > If you are setting the visibility at cell level, you will just
> > > > get empty cells not hidden rows.
> > > >
> > > > Hope that helps.
> > > >
> > > > Regards
> > > > Chris
> > > >
> > > >
> > > > VNN wrote:
> > > >
> > > > > I tried this before I posted initially but it didn't work. The
> > > > > toggle always switches the hidden state of items. So if an
> > > > > item has the hidden initial state set to false, toggle will
> > > > > set it back to true and it doesn't take the expression into
> > > > > account. What I'm looking for is a way to set the toggle
> > > > > item in a expression, not statically assigned..
> > > > >
> > > > > "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in
> > > > > message news:%23c3GSSqEFHA.2756@.TK2MSFTNGP15.phx.gbl...
> > > > > > Although I have never done exactly what you wish , I think
> > > > > > it is doable...
> > > > > >
> > > > > > Set C to initially Visible = false
> > > > > > Set A as the Visibility Toggle for B
> > > > > > Set B as the Visibility Toggle for C, AND use an expression
> > > > > > for the
> > > > > initial
> > > > > > appearance of the toggle item
> > > > > >
> > > > > > All of this is set in the Advanced Textbox properties.
> > > > > >
> > > > > > Good luck... This sounds nice!
> > > > > >
> > > > > > --
> > > > > > Wayne Snyder, MCDBA, SQL Server MVP
> > > > > > Mariner, Charlotte, NC
> > > > > > www.mariner-usa.com
> > > > > > (Please respond only to the newsgroups.)
> > > > > >
> > > > > > I support the Professional Association of SQL Server (PASS)
> > > > > > and it's community of SQL Server professionals.
> > > > > > www.sqlpass.org
> > > > > >
> > > > > > "John R" <JohnR@.hotmail.com> wrote in message
> > > > > > news:uyXGnAIEFHA.624@.TK2MSFTNGP15.phx.gbl...
> > > > > > > I have structure like this:
> > > > > > >
> > > > > > > A1
> > > > > > > B1
> > > > > > > C11
> > > > > > > C12
> > > > > > > C13
> > > > > > >
> > > > > > > B2
> > > > > > > C21
> > > > > > > C22
> > > > > > >
> > > > > > > A2
> > > > > > >
> > > > > > > Currently, I set up so at C level, it will appear only if
> > > > > > > its value > 0.
> > > > > I
> > > > > > > would like to have a drilldown structure so when I click
> > > > > > > on A level, B level will appear but not the Cx. B will
> > > > > > > have the + only if it has child items (if one of its
> > > > > > > child items has value > 0). If B has the + sign, it
> > > > > > > indicates it has child items and when I click on the +
> > > > > > > sign, the C level appear only if its value >0.
> > > > > > >
> > > > > > > Please advice if this is doable (please show how) or this
> > > > > > > is a no-no in RS. Thanks
> > > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >