Showing posts with label dimension. Show all posts
Showing posts with label dimension. Show all posts

Thursday, March 22, 2012

Distinct Count with Junk Dimension Attribute

Hi,

Suppose I have following Model Dimension which is formed based on Junk Dimension definition.

JunkID

ModelID

ModelCode

ModelTypeID

ModelTypeCode

ModelSpecificationID

ModelSpecificationCode

50

50

BAO

2

FFCVT

2

F1C1

53

53

BGO

1

FFAT

1

FW4A4

55

55

NBO

3

FRAT

9

V4A5

60

60

NCO

3

FRAT

9

V5A5

97

55

NBO

3

FRAT

11

V4A5

99

53

BGO

1

FFAT

13

F4A4

And In Fact Table Suppose there is data as below...

JunkID

Amount

50

5210983

53

9576

55

7994

60

7872

97

4306

99

6519

Now my requirement is to make Distinct Count on ModelID. If I makes Distinct Count on DimModel.ModelID then it gives me 5 on every combination in Cube. If I make Distinct Count on FactTable.JunkID then it gives me 6 in places of 5 as above seen data.

Please help, how can I make Distinct Count on ModelID in this situation?

Thanks in Advance

Bhudev

Are you excluding the ALL member? Take a look at the code sample below? It calculates a count 3 ways. In the first, I count the members of the dimension's attribute hierarchy. It includes the members from all levels including the ALL member because I didn't specify a level. In the next one, I specify the leaf level of the hierarchy which does not include the ALL member. The third example uses DISTINCTCOUNT.

Code Snippet

with

member measures.a as

COUNT([Geography].[Country].Members)

member measures.b as

COUNT([Geography].[Country].[Country].Members)

member measures.c as

DISTINCTCOUNT([Geography].[Country].Country.Members)

select

{[a],[b],[c]} on 0

from [Adventure Works]

;

Good luck,
Bryan

|||

Hi,

It works fine when we are making Calculated Members, but when Analysis Services 2005 has introduced Junk Dimension Concept. So I feel it should give facility to add Distinct Count Cube Measure based on its [Junk Dimension] associated Attribute Dimensions. As per my understanding if there is Junk Dimension and we have very important Attribute Dimension, in Junk Dimension, On which I have to add Distinct Count Measure which can be used across all combination, In that situation we can not, because I can add Distinct Count only on JunkID which will be wrong or not of my use, As I have explained above.

But we can add Several Calculated members as per our need.

Thanks Bryan C. Smith for your suggestion overall it was helpfull.

Bhudev

|||

Just to be clear, SSAS 2005 didn't add support for Junk dimensions. Junk dimensions are a concept from the Kimball group that are documented in their "The Data Warehouse Toolkit" and other books. They can be implemented in SSAS 2005 (and just about any other technology that supports regular old dimensions). :-)

B

Distinct Count with Junk Dimension Attribute

Hi,

Suppose I have following Model Dimension which is formed based on Junk Dimension definition.

JunkID

ModelID

ModelCode

ModelTypeID

ModelTypeCode

ModelSpecificationID

ModelSpecificationCode

50

50

BAO

2

FFCVT

2

F1C1

53

53

BGO

1

FFAT

1

FW4A4

55

55

NBO

3

FRAT

9

V4A5

60

60

NCO

3

FRAT

9

V5A5

97

55

NBO

3

FRAT

11

V4A5

99

53

BGO

1

FFAT

13

F4A4

And In Fact Table Suppose there is data as below...

JunkID

Amount

50

5210983

53

9576

55

7994

60

7872

97

4306

99

6519

Now my requirement is to make Distinct Count on ModelID. If I makes Distinct Count on DimModel.ModelID then it gives me 5 on every combination in Cube. If I make Distinct Count on FactTable.JunkID then it gives me 6 in places of 5 as above seen data.

Please help, how can I make Distinct Count on ModelID in this situation?

Thanks in Advance

Bhudev

Are you excluding the ALL member? Take a look at the code sample below? It calculates a count 3 ways. In the first, I count the members of the dimension's attribute hierarchy. It includes the members from all levels including the ALL member because I didn't specify a level. In the next one, I specify the leaf level of the hierarchy which does not include the ALL member. The third example uses DISTINCTCOUNT.

Code Snippet

with

member measures.a as

COUNT([Geography].[Country].Members)

member measures.b as

COUNT([Geography].[Country].[Country].Members)

member measures.c as

DISTINCTCOUNT([Geography].[Country].Country.Members)

select

{[a],[b],[c]} on 0

from [Adventure Works]

;

Good luck,
Bryan

|||

Hi,

It works fine when we are making Calculated Members, but when Analysis Services 2005 has introduced Junk Dimension Concept. So I feel it should give facility to add Distinct Count Cube Measure based on its [Junk Dimension] associated Attribute Dimensions. As per my understanding if there is Junk Dimension and we have very important Attribute Dimension, in Junk Dimension, On which I have to add Distinct Count Measure which can be used across all combination, In that situation we can not, because I can add Distinct Count only on JunkID which will be wrong or not of my use, As I have explained above.

But we can add Several Calculated members as per our need.

Thanks Bryan C. Smith for your suggestion overall it was helpfull.

Bhudev

|||

Just to be clear, SSAS 2005 didn't add support for Junk dimensions. Junk dimensions are a concept from the Kimball group that are documented in their "The Data Warehouse Toolkit" and other books. They can be implemented in SSAS 2005 (and just about any other technology that supports regular old dimensions). :-)

B

Distinct Count with Junk Dimension Attribute

Hi,

Suppose I have following Model Dimension which is formed based on Junk Dimension definition.

JunkID

ModelID

ModelCode

ModelTypeID

ModelTypeCode

ModelSpecificationID

ModelSpecificationCode

50

50

BAO

2

FFCVT

2

F1C1

53

53

BGO

1

FFAT

1

FW4A4

55

55

NBO

3

FRAT

9

V4A5

60

60

NCO

3

FRAT

9

V5A5

97

55

NBO

3

FRAT

11

V4A5

99

53

BGO

1

FFAT

13

F4A4

And In Fact Table Suppose there is data as below...

JunkID

Amount

50

5210983

53

9576

55

7994

60

7872

97

4306

99

6519

Now my requirement is to make Distinct Count on ModelID. If I makes Distinct Count on DimModel.ModelID then it gives me 5 on every combination in Cube. If I make Distinct Count on FactTable.JunkID then it gives me 6 in places of 5 as above seen data.

Please help, how can I make Distinct Count on ModelID in this situation?

Thanks in Advance

Bhudev

Are you excluding the ALL member? Take a look at the code sample below? It calculates a count 3 ways. In the first, I count the members of the dimension's attribute hierarchy. It includes the members from all levels including the ALL member because I didn't specify a level. In the next one, I specify the leaf level of the hierarchy which does not include the ALL member. The third example uses DISTINCTCOUNT.

Code Snippet

with

member measures.a as

COUNT([Geography].[Country].Members)

member measures.b as

COUNT([Geography].[Country].[Country].Members)

member measures.c as

DISTINCTCOUNT([Geography].[Country].Country.Members)

select

{[a],[b],[c]} on 0

from [Adventure Works]

;

Good luck,
Bryan

|||

Hi,

It works fine when we are making Calculated Members, but when Analysis Services 2005 has introduced Junk Dimension Concept. So I feel it should give facility to add Distinct Count Cube Measure based on its [Junk Dimension] associated Attribute Dimensions. As per my understanding if there is Junk Dimension and we have very important Attribute Dimension, in Junk Dimension, On which I have to add Distinct Count Measure which can be used across all combination, In that situation we can not, because I can add Distinct Count only on JunkID which will be wrong or not of my use, As I have explained above.

But we can add Several Calculated members as per our need.

Thanks Bryan C. Smith for your suggestion overall it was helpfull.

Bhudev

|||

Just to be clear, SSAS 2005 didn't add support for Junk dimensions. Junk dimensions are a concept from the Kimball group that are documented in their "The Data Warehouse Toolkit" and other books. They can be implemented in SSAS 2005 (and just about any other technology that supports regular old dimensions). :-)

B

Distinct Count Problem

I am using a standard star schema structure with a sales fact table and dimension tables joined by surrogate foreign keys. My product's dimension contains a hierarchy for SKU (the lowest level) and product class. I created a distinct count measure for "SKU Count" using the product key in the sales fact table. This works fine with no problem. Now I need to create a second distinct count measure for product class. I cannot get this to work. Product class exists as an attribute in the product dimension. I have tried several ways to get this to work but each time it results in an error. For example, I created an MDX calculation using both COUNT and DISTINCT COUNT and none of these worked. I also added the product class attribute into the fact table to see if this could work by creating a new distinct count against this column. This resulted in an error message.

Can anyone help with this? Basically, I am looking to create a distinct count measure against the product key in the fact table (which works fine) and than I want to create a second distinct count measure against the product class attribute that comes from the product dimension but is based off of the unique occurences of each product class in the fact table (referenced through the product class key).

David

Both these approaches should work, the MDX Calc would not perform as well as adding the product class attribute to the fact table. Can you tell us exact what errors you were getting.

With the fact table approach I think you will need to create a second measure group (based on the same fact table) as you can only have one distinct count measure in each measure group.

|||

Darren,

In order to create a second fact group based on the same table, would I need to create an alias table in the dsv first. This approach seems like it would be more resource intensive since I'm technically adding another 700,000 records with the "new" fact table.

David

|||

Yes, that's right you would have to scan through the fact table again, but each distinct count measure you create means another scan through the fact table. It depends how often you are processing your cube as this sort of volume should only take minutes. Technically you don't need to create an alias table, but I think it is the only way to do this through the UI, through an XMLA script you can create multiple measure groups off the one dsv object.

The alternative is to use the DistinctCount() function in a calculated measure, you would have to test it and see, but it can be quite slow depending on the size of your queries.

Distinct count in case of Custom Rollup formula in a dimension very Urgent.........

how we can calculate the dictinct customer ID in case
of custom rollup formula
BrhanCreate a separate cube for the distinct count measure, and remove any custom
rollup formula in cube editor.
Ohjoo Kwon
"Burhan" <burhanuddin.ahmed@.gonetbpo.com> wrote in message
news:%233m4VeSMFHA.436@.TK2MSFTNGP09.phx.gbl...
> how we can calculate the dictinct customer ID in case
> of custom rollup formula
>
> Brhan
>
>

Wednesday, March 21, 2012

Displaying value from another dimension

Hi.
I'm relatively new to MDX and have what should be a simple problem to
solve.
I have a Hotel dimension and a hierarchial Geography
(Region/Market/SubMarket) dimension. There's a join between the two on
Geography_ID.
All I'm trying to do is display a few measures for the Hotel as well as
its Market value. I can't get it to display the Market.
SELECT
{[Measures].[CountUserReview], NonEmptyCrossJoin({[Hotel]},
{[Geography]})} ON COLUMNS,
{TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[CountUserReview],
BDESC), 10, [Measures].[CountUserReview])} ON ROWS
FROM [UserReview]
I've tried several different things with the NonEmptyCrossJoin (among
others), please help.
A dimension can only appear on one axis, so I suspect your sample is
giving you a syntax error.
The following should give you the top 10 hotels in the rows, and the
markets in the columns, with the CountUserReview in each cell. Is this
the sort of result you are after? If not it would help to have a sample
of how you would like the output to appear.
SELECT
NON EMPTY {[Geography].Market.Members} ON COLUMNS,
{TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[CountUserReview],
BDESC), 10, [Measures].[CountUserReview])} ON ROWS
FROM [UserReview]
WHERE
(
[Measures].[CountUserReview]
)
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell
In article <1129766281.949669.289920@.g43g2000cwa.googlegroups .com>,
query_squidier@.speakeasy.net says...
> Hi.
> I'm relatively new to MDX and have what should be a simple problem to
> solve.
> I have a Hotel dimension and a hierarchial Geography
> (Region/Market/SubMarket) dimension. There's a join between the two on
> Geography_ID.
> All I'm trying to do is display a few measures for the Hotel as well as
> its Market value. I can't get it to display the Market.
> SELECT
> {[Measures].[CountUserReview], NonEmptyCrossJoin({[Hotel]},
> {[Geography]})} ON COLUMNS,
> {TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[CountUserReview],
> BDESC), 10, [Measures].[CountUserReview])} ON ROWS
> FROM [UserReview]
>
> I've tried several different things with the NonEmptyCrossJoin (among
> others), please help.
>
|||Thanks for the response Darren and yes I was getting an error.
Each Hotel has only one Market value.
I'm hoping to display each Hotel name ON ROWS and the following ON
COLUMNS:
HotelID, HotelName, Market, and Count.
The trouble I'm having is figuring out how to display stuff from the
Hotel dimension and the Geography dimension both ON COLUMNS.
Thanks for your help, this is very very different than T-SQL.
|||This is my latest attempt:
WITH
MEMBER [Measures].[Hotel_ID] AS
'[Hotel].CurrentMember.Properties("Hotel_ID")'
MEMBER [Measures].[HotelName] AS
'[Hotel].CurrentMember.Properties("HotelName")'
--MEMBER [Measures].[Market] AS '[Geography].[Market].CurrentMember'
--SET [Market] AS '[Geography].[Market].MEMBERS'
--MEMBER [Measures].[Market] AS '[Market].CurrentMember'
SELECT
{[Measures].[Hotel_ID], [Measures].[HotelName],
[Measures].[CountUserReview], [Geography].[Market].CurrentMember} ON
COLUMNS,
{TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[CountUserReview],
BDESC), 10, [Measures].[CountUserReview])} ON ROWS
FROM [UserReview]
WHERE ([ReviewStatus].[APPROVE])
|||The problem is that your geography dimension needs to be given a context
by being placed on one of the axis or in the slicer (where clause)
The other thing you were doing was mixing members of different
dimensionality in a set on the columns.
In order to get the market for each hotel I have crossjoined the
geography dimension (using the * operator). This will generate every
market for every hotel and I then exclude the empty ones with the NON
EMPTY clause.
Note: I would have thought that the HotelName and Market measures were
redundant as these names should appear in the rows of the returned
cellset. As such I have commented them out of the query below, if the
names of your dimension members are different you can remove the comment
dashes to include these measures again.
[vbcol=seagreen]
WITH
MEMBER [Measures].[Hotel_ID] AS
'[Hotel].CurrentMember.Properties("Hotel_ID")'
MEMBER [Measures].[HotelName] AS
'[Hotel].CurrentMember.Properties("HotelName")'
MEMBER [Measures].[Market] AS '[Geography].[Market].CurrentMember.Name'
SELECT
{[Measures].[Hotel_ID]
--, [Measures].[HotelName]
, [Measures].[CountUserReview]
--, [Measures].[Market]
} ON COLUMNS,
NON EMPTY {TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].
[CountUserReview],
BDESC), 10, [Measures].[CountUserReview])} * {[Geography].
[Market].Members} ON ROWS
FROM [UserReview]
WHERE ([ReviewStatus].[APPROVE])[vbcol=seagreen]
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell
|||Thank you very much, Darren. This helps bunches.
The only thing, though, I'm getting a syntax error near axis
definition: " * {[Geography]. [Market].Members}".
Thoughts?
|||Got it.
WITH
MEMBER [Measures].[Hotel_ID] AS
'[Hotel].CurrentMember.Properties("Hotel_ID")'
MEMBER [Measures].[HotelName] AS
'[Hotel].CurrentMember.Properties("HotelName")'
SELECT
{[Measures].[Hotel_ID], [Measures].[HotelName],
[Measures].[CountUserReview]} ON COLUMNS,
{ NonEmptyCrossJoin ({TOPCOUNT(ORDER([Hotel].[Name].MEMBERS,
[Measures]. [CountUserReview], BDESC), 10,
[Measures].[CountUserReview])}, {[Geography].[Market].Members})} ON
ROWS
FROM [UserReview]
WHERE ([ReviewStatus].[APPROVE])
The only other question I might have is if I did want to show the
Market value ON COLUMNS, how to do that. It didn't recognize
[Geography].[Market].CurrentMember.Name and [Geography].[Market].Name
just returns "Market".
Thanks so much, Darren, I've got lightbulbs going off all over.
|||> Thanks so much, Darren, I've got lightbulbs going off all over.
That's great to hear, glad I could help.
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

Displaying value from another dimension

Hi.
I'm relatively new to MDX and have what should be a simple problem to
solve.
I have a Hotel dimension and a hierarchial Geography
(Region/Market/SubMarket) dimension. There's a join between the two on
Geography_ID.
All I'm trying to do is display a few measures for the Hotel as well as
its Market value. I can't get it to display the Market.
SELECT
{[Measures].[CountUserReview], NonEmptyCrossJoin({[Hot
el]},
{[Geography]})} ON COLUMNS,
{TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[Cou
ntUserReview],
BDESC), 10, [Measures].[CountUserReview])} ON ROWS
FROM [UserReview]
I've tried several different things with the NonEmptyCrossJoin (among
others), please help. A dimension can only appear on one axis, so I suspect your sample is
giving you a syntax error.
The following should give you the top 10 hotels in the rows, and the
markets in the columns, with the CountUserReview in each cell. Is this
the sort of result you are after? If not it would help to have a sample
of how you would like the output to appear.
SELECT
NON EMPTY {[Geography].Market.Members} ON COLUMNS,
{TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[Cou
ntUserReview],
BDESC), 10, [Measures].[CountUserReview])} ON ROWS
FROM [UserReview]
WHERE
(
[Measures].[CountUserReview]
)
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell
In article <1129766281.949669.289920@.g43g2000cwa.googlegroups.com>,
query_squidier@.speakeasy.net says...
> Hi.
> I'm relatively new to MDX and have what should be a simple problem to
> solve.
> I have a Hotel dimension and a hierarchial Geography
> (Region/Market/SubMarket) dimension. There's a join between the two on
> Geography_ID.
> All I'm trying to do is display a few measures for the Hotel as well as
> its Market value. I can't get it to display the Market.
> SELECT
> {[Measures].[CountUserReview], NonEmptyCrossJoin({[H
otel]},
> {[Geography]})} ON COLUMNS,
> {TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[C
ountUserReview],
> BDESC), 10, [Measures].[CountUserReview])} ON ROWS
> FROM [UserReview]
>
> I've tried several different things with the NonEmptyCrossJoin (among
> others), please help.
>|||Thanks for the response Darren and yes I was getting an error.
Each Hotel has only one Market value.
I'm hoping to display each Hotel name ON ROWS and the following ON
COLUMNS:
HotelID, HotelName, Market, and Count.
The trouble I'm having is figuring out how to display stuff from the
Hotel dimension and the Geography dimension both ON COLUMNS.
Thanks for your help, this is very very different than T-SQL. |||This is my latest attempt:
WITH
MEMBER [Measures].[Hotel_ID] AS
'[Hotel].CurrentMember.Properties("Hotel_ID")'
MEMBER [Measures].[HotelName] AS
'[Hotel].CurrentMember.Properties("HotelName")'
--MEMBER [Measures].[Market] AS '[Geography].[Market].Curren
tMember'
--SET [Market] AS '[Geography].[Market].MEMBERS'
--MEMBER [Measures].[Market] AS '[Market].CurrentMember'
SELECT
{[Measures].[Hotel_ID], [Measures].[HotelName],
[Measures].[CountUserReview], [Geography].[Market].CurrentMe
mber} ON
COLUMNS,
{TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures].[Cou
ntUserReview],
BDESC), 10, [Measures].[CountUserReview])} ON ROWS
FROM [UserReview]
WHERE ([ReviewStatus].[APPROVE])|||The problem is that your geography dimension needs to be given a context
by being placed on one of the axis or in the slicer (where clause)
The other thing you were doing was mixing members of different
dimensionality in a set on the columns.
In order to get the market for each hotel I have crossjoined the
geography dimension (using the * operator). This will generate every
market for every hotel and I then exclude the empty ones with the NON
EMPTY clause.
Note: I would have thought that the HotelName and Market measures were
redundant as these names should appear in the rows of the returned
cellset. As such I have commented them out of the query below, if the
names of your dimension members are different you can remove the comment
dashes to include these measures again.
[vbcol=seagreen]
WITH
MEMBER [Measures].[Hotel_ID] AS
'[Hotel].CurrentMember.Properties("Hotel_ID")'
MEMBER [Measures].[HotelName] AS
'[Hotel].CurrentMember.Properties("HotelName")'
MEMBER [Measures].[Market] AS '[Geography].[Market].CurrentM
ember.Name'
SELECT
{[Measures].[Hotel_ID]
--, [Measures].[HotelName]
, [Measures].[CountUserReview]
--, [Measures].[Market]
} ON COLUMNS,
NON EMPTY {TOPCOUNT(ORDER([Hotel].[Name].MEMBERS, [Measures
].
[CountUserReview],
BDESC), 10, [Measures].[CountUserReview])} * {[Geography].
[Market].Members} ON ROWS
FROM [UserReview]
WHERE ([ReviewStatus].[APPROVE])[vbcol=seagreen]
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell|||Thank you very much, Darren. This helps bunches.
The only thing, though, I'm getting a syntax error near axis
definition: " * {[Geography]. [Market].Members}".
Thoughts?|||Got it.
WITH
MEMBER [Measures].[Hotel_ID] AS
'[Hotel].CurrentMember.Properties("Hotel_ID")'
MEMBER [Measures].[HotelName] AS
'[Hotel].CurrentMember.Properties("HotelName")'
SELECT
{[Measures].[Hotel_ID], [Measures].[HotelName],
[Measures].[CountUserReview]} ON COLUMNS,
{ NonEmptyCrossJoin ({TOPCOUNT(ORDER([Hotel].[Name].MEMBER
S,
[Measures]. [CountUserReview], BDESC), 10,
[Measures].[CountUserReview])}, {[Geography].[Market].M
embers})} ON
ROWS
FROM [UserReview]
WHERE ([ReviewStatus].[APPROVE])
The only other question I might have is if I did want to show the
Market value ON COLUMNS, how to do that. It didn't recognize
[Geography].[Market].CurrentMember.Name and [Geography].[Mar
ket].Name
just returns "Market".
Thanks so much, Darren, I've got lightbulbs going off all over.|||> Thanks so much, Darren, I've got lightbulbs going off all over.
That's great to hear, glad I could help.
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

Sunday, March 11, 2012

Displaying Parent-Child OLAP data in a report in SQL2005 RS

I'm trying to use an OLAP cube as my data source (built using SSAS 2005)
The cube has a parent-child dimension and a fact table. I would like to
display the parent-child data in a report . Does anyone know how to build an
MDX query that would give me the ID and the ParentID from the dimension to
build the parent-child grouping relationship in the report? The MDX builder
does not let me access the ID field or the ParentID field. I always get the
Name of the dimension.
Also, if there's another way to do this, please let me know.
Any help is greatly appreciated.
ThanksI attached a sample report that shows how to do this.
Notes:
* in the graphical query designer you have to select a recursive hierarchy
from the cube (such as Employee.Employees in the AdventureWorks DW cube).
Based on the metadata, RS should automatically detect that this is a
recursive parent-child hierarchy and there will be additional extended field
properties available (such as .UniqueName and .ParentUniqueName)
* add a grouping in the report. The grouping expression is based on
=Fields!Employees.UniqueName and for the parent of the group set it to
=Fields!Employees.ParentUniqueName
* right now, you will need to have table columns that also reference the
UniqueName and the ParentUniqueName in the report - but you can hide them so
they are not visible. If you don't have these columns, the recursive
hierarchy won't work correctly.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Raghu" <Raghu@.discussions.microsoft.com> wrote in message
news:A3B4E2B3-B78D-4571-9D90-69EC03FD18E4@.microsoft.com...
> I'm trying to use an OLAP cube as my data source (built using SSAS 2005)
> The cube has a parent-child dimension and a fact table. I would like to
> display the parent-child data in a report . Does anyone know how to build
> an
> MDX query that would give me the ID and the ParentID from the dimension to
> build the parent-child grouping relationship in the report? The MDX
> builder
> does not let me access the ID field or the ParentID field. I always get
> the
> Name of the dimension.
> Also, if there's another way to do this, please let me know.
> Any help is greatly appreciated.
> Thanks
==========================================================
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="DataSource1">
<ConnectionProperties>
<IntegratedSecurity>true</IntegratedSecurity>
<ConnectString>Data Source=(local);Initial Catalog="Adventure Works
DW"</ConnectString>
<DataProvider>OLEDB-MD</DataProvider>
</ConnectionProperties>
<rd:DataSourceID>5aaa5577-4975-4616-a136-0b713dab6948</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Table Name="table1">
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<ZIndex>9</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<rd:DefaultName>textbox9</rd:DefaultName>
<ZIndex>8</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<rd:DefaultName>textbox8</rd:DefaultName>
<ZIndex>7</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox11">
<rd:DefaultName>textbox11</rd:DefaultName>
<ZIndex>6</ZIndex>
<Style>
<TextAlign>Center</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox13">
<rd:DefaultName>textbox13</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
<DataSetName>DataSet1</DataSetName>
<Top>0.5in</Top>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="Employees">
<rd:DefaultName>Employees</rd:DefaultName>
<ZIndex>4</ZIndex>
<Style>
<PaddingLeft>=2 + Level() * 8 &
"pt"</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!Employees.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox10">
<ZIndex>3</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!Employees.UniqueName</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox5">
<rd:DefaultName>textbox5</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!Employees.ParentUniqueName</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Reseller_Sales_Amount">
<rd:DefaultName>Reseller_Sales_Amount</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<TextAlign>Center</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Level()</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="Reseller_Sales_Amount_1">
<rd:DefaultName>Reseller_Sales_Amount_1</rd:DefaultName>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Sum(Fields!Reseller_Sales_Amount.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
<Grouping Name="table1_Details_Group">
<Parent>=Fields!Employees.ParentUniqueName</Parent>
<GroupExpressions>
<GroupExpression>=Fields!Employees.UniqueName</GroupExpression>
</GroupExpressions>
</Grouping>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>14</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Employees</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox4">
<rd:DefaultName>textbox4</rd:DefaultName>
<ZIndex>13</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>12</ZIndex>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<rd:DefaultName>textbox3</rd:DefaultName>
<ZIndex>11</ZIndex>
<Style>
<TextAlign>Center</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Level</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox6">
<rd:DefaultName>textbox6</rd:DefaultName>
<ZIndex>10</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Reseller Sales Amount</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<TableColumns>
<TableColumn>
<Width>1.625in</Width>
</TableColumn>
<TableColumn>
<Width>0.875in</Width>
<Visibility>
<Hidden>true</Hidden>
</Visibility>
</TableColumn>
<TableColumn>
<Width>0.875in</Width>
<Visibility>
<Hidden>true</Hidden>
</Visibility>
</TableColumn>
<TableColumn>
<Width>0.5in</Width>
</TableColumn>
<TableColumn>
<Width>1.75in</Width>
</TableColumn>
</TableColumns>
<Height>0.75in</Height>
</Table>
</ReportItems>
<Height>1.375in</Height>
</Body>
<rd:ReportID>380d94a9-e8f4-4147-8f13-1f6d88259335</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<rd:SuppressAutoUpdate>true</rd:SuppressAutoUpdate>
<CommandText> SELECT NON EMPTY { [Measures].[Reseller Sales
Amount] } ON COLUMNS, NON EMPTY {
(DESCENDANTS([Employee].[Employees].[Employee Level 02].ALLMEMBERS) ) }
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME, PARENT_UNIQUE_NAME,
LEVEL_NUMBER ON ROWS FROM [Adventure Works] CELL PROPERTIES VALUE,
BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME,
FONT_SIZE, FONT_FLAGS</CommandText>
<DataSourceName>DataSource1</DataSourceName>
<rd:MdxQuery><QueryDefinition
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="<CommandType>MDX</CommandType><QuerySpecification">http://schemas.microsoft.com/AnalysisServices/QueryDefinition"><CommandType>MDX</CommandType><QuerySpecification
xsi:type="MDXQuerySpecification"><Select><Items><Item><ID
xsi:type="Level"><DimensionName>Employee</DimensionName><HierarchyName>Employees</HierarchyName><HierarchyUniqueName>[Employee].[Employees]</HierarchyUniqueName><LevelName>Employee
Level 02</LevelName><UniqueName>[Employee].[Employees].[Employee Level
02]</UniqueName></ID><ItemCaption>Employees</ItemCaption><UniqueName>true</UniqueName><IsParentChild>true</IsParentChild></Item><Item><ID
xsi:type="Measure"><MeasureName>Reseller Sales
Amount</MeasureName><UniqueName>[Measures].[Reseller Sales
Amount]</UniqueName></ID><ItemCaption>Reseller Sales
Amount</ItemCaption><BackColor>true</BackColor><ForeColor>true</ForeColor><FontFamily>true</FontFamily><FontSize>true</FontSize><FontWeight>true</FontWeight><FontStyle>true</FontStyle><FontDecoration>true</FontDecoration><FormattedValue>true</FormattedValue><FormatString>true</FormatString></Item></Items></Select><From>Adventure
Works</From><Filter><FilterItems /></Filter><Calculations /><Aggregates
/><QueryProperties /></QuerySpecification><Query><Statement> SELECT NON
EMPTY { [Measures].[Reseller Sales Amount] } ON COLUMNS, NON EMPTY {
(DESCENDANTS([Employee].[Employees].[Employee Level 02].ALLMEMBERS) ) }
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME, PARENT_UNIQUE_NAME,
LEVEL_NUMBER ON ROWS FROM [Adventure Works] CELL PROPERTIES VALUE,
BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME,
FONT_SIZE, FONT_FLAGS</Statement><ParameterDefinitions
/></Query></QueryDefinition></rd:MdxQuery>
</Query>
<Fields>
<Field Name="Employees">
<rd:TypeName>System.String</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Level"
UniqueName="[Employee].[Employees]" /></DataField>
</Field>
<Field Name="Reseller_Sales_Amount">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField><?xml version="1.0" encoding="utf-8"?><Field
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
UniqueName="[Measures].[Reseller Sales Amount]" /></DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>5.625in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>|||BTW: you don't need to have the two additional hidden table columns with
UniqueName and ParentUniqueName in the report (as shown in my sample). It is
sufficient to e.g. just change the expression in the first table column from
=Fields!Employees.Value to =Fields!Employees("Value"). This will turn off a
certain optimization related to extended field properties.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:e4fKfdq1FHA.2964@.TK2MSFTNGP09.phx.gbl...
>I attached a sample report that shows how to do this.
> Notes:
> * in the graphical query designer you have to select a recursive hierarchy
> from the cube (such as Employee.Employees in the AdventureWorks DW cube).
> Based on the metadata, RS should automatically detect that this is a
> recursive parent-child hierarchy and there will be additional extended
> field properties available (such as .UniqueName and .ParentUniqueName)
> * add a grouping in the report. The grouping expression is based on
> =Fields!Employees.UniqueName and for the parent of the group set it to
> =Fields!Employees.ParentUniqueName
> * right now, you will need to have table columns that also reference the
> UniqueName and the ParentUniqueName in the report - but you can hide them
> so they are not visible. If you don't have these columns, the recursive
> hierarchy won't work correctly.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Raghu" <Raghu@.discussions.microsoft.com> wrote in message
> news:A3B4E2B3-B78D-4571-9D90-69EC03FD18E4@.microsoft.com...
>> I'm trying to use an OLAP cube as my data source (built using SSAS 2005)
>> The cube has a parent-child dimension and a fact table. I would like to
>> display the parent-child data in a report . Does anyone know how to build
>> an
>> MDX query that would give me the ID and the ParentID from the dimension
>> to
>> build the parent-child grouping relationship in the report? The MDX
>> builder
>> does not let me access the ID field or the ParentID field. I always get
>> the
>> Name of the dimension.
>> Also, if there's another way to do this, please let me know.
>> Any help is greatly appreciated.
>> Thanks
>
> ==========================================================> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> <DataSources>
> <DataSource Name="DataSource1">
> <ConnectionProperties>
> <IntegratedSecurity>true</IntegratedSecurity>
> <ConnectString>Data Source=(local);Initial Catalog="Adventure Works
> DW"</ConnectString>
> <DataProvider>OLEDB-MD</DataProvider>
> </ConnectionProperties>
> <rd:DataSourceID>5aaa5577-4975-4616-a136-0b713dab6948</rd:DataSourceID>
> </DataSource>
> </DataSources>
> <BottomMargin>1in</BottomMargin>
> <RightMargin>1in</RightMargin>
> <rd:DrawGrid>true</rd:DrawGrid>
> <InteractiveWidth>8.5in</InteractiveWidth>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <Body>
> <ReportItems>
> <Table Name="table1">
> <Footer>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox7">
> <rd:DefaultName>textbox7</rd:DefaultName>
> <ZIndex>9</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox9">
> <rd:DefaultName>textbox9</rd:DefaultName>
> <ZIndex>8</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox8">
> <rd:DefaultName>textbox8</rd:DefaultName>
> <ZIndex>7</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox11">
> <rd:DefaultName>textbox11</rd:DefaultName>
> <ZIndex>6</ZIndex>
> <Style>
> <TextAlign>Center</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox13">
> <rd:DefaultName>textbox13</rd:DefaultName>
> <ZIndex>5</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Footer>
> <DataSetName>DataSet1</DataSetName>
> <Top>0.5in</Top>
> <Details>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="Employees">
> <rd:DefaultName>Employees</rd:DefaultName>
> <ZIndex>4</ZIndex>
> <Style>
> <PaddingLeft>=2 + Level() * 8 &
> "pt"</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Employees.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox10">
> <ZIndex>3</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Employees.UniqueName</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox5">
> <rd:DefaultName>textbox5</rd:DefaultName>
> <ZIndex>2</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Employees.ParentUniqueName</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="Reseller_Sales_Amount">
> <rd:DefaultName>Reseller_Sales_Amount</rd:DefaultName>
> <ZIndex>1</ZIndex>
> <Style>
> <TextAlign>Center</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Level()</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="Reseller_Sales_Amount_1">
> <rd:DefaultName>Reseller_Sales_Amount_1</rd:DefaultName>
> <Style>
> <TextAlign>Right</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Sum(Fields!Reseller_Sales_Amount.Value)</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> <Grouping Name="table1_Details_Group">
> <Parent>=Fields!Employees.ParentUniqueName</Parent>
> <GroupExpressions>
> <GroupExpression>=Fields!Employees.UniqueName</GroupExpression>
> </GroupExpressions>
> </Grouping>
> </Details>
> <Header>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox1">
> <rd:DefaultName>textbox1</rd:DefaultName>
> <ZIndex>14</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>Employees</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox4">
> <rd:DefaultName>textbox4</rd:DefaultName>
> <ZIndex>13</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox2">
> <rd:DefaultName>textbox2</rd:DefaultName>
> <ZIndex>12</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox3">
> <rd:DefaultName>textbox3</rd:DefaultName>
> <ZIndex>11</ZIndex>
> <Style>
> <TextAlign>Center</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>Level</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox6">
> <rd:DefaultName>textbox6</rd:DefaultName>
> <ZIndex>10</ZIndex>
> <Style>
> <TextAlign>Right</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>Reseller Sales Amount</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Header>
> <TableColumns>
> <TableColumn>
> <Width>1.625in</Width>
> </TableColumn>
> <TableColumn>
> <Width>0.875in</Width>
> <Visibility>
> <Hidden>true</Hidden>
> </Visibility>
> </TableColumn>
> <TableColumn>
> <Width>0.875in</Width>
> <Visibility>
> <Hidden>true</Hidden>
> </Visibility>
> </TableColumn>
> <TableColumn>
> <Width>0.5in</Width>
> </TableColumn>
> <TableColumn>
> <Width>1.75in</Width>
> </TableColumn>
> </TableColumns>
> <Height>0.75in</Height>
> </Table>
> </ReportItems>
> <Height>1.375in</Height>
> </Body>
> <rd:ReportID>380d94a9-e8f4-4147-8f13-1f6d88259335</rd:ReportID>
> <LeftMargin>1in</LeftMargin>
> <DataSets>
> <DataSet Name="DataSet1">
> <Query>
> <rd:SuppressAutoUpdate>true</rd:SuppressAutoUpdate>
> <CommandText> SELECT NON EMPTY { [Measures].[Reseller Sales
> Amount] } ON COLUMNS, NON EMPTY {
> (DESCENDANTS([Employee].[Employees].[Employee Level 02].ALLMEMBERS) ) }
> DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME,
> PARENT_UNIQUE_NAME, LEVEL_NUMBER ON ROWS FROM [Adventure Works] CELL
> PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING,
> FONT_NAME, FONT_SIZE, FONT_FLAGS</CommandText>
> <DataSourceName>DataSource1</DataSourceName>
> <rd:MdxQuery><QueryDefinition
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns="<CommandType>MDX</CommandType><QuerySpecification">http://schemas.microsoft.com/AnalysisServices/QueryDefinition"><CommandType>MDX</CommandType><QuerySpecification
> xsi:type="MDXQuerySpecification"><Select><Items><Item><ID
> xsi:type="Level"><DimensionName>Employee</DimensionName><HierarchyName>Employees</HierarchyName><HierarchyUniqueName>[Employee].[Employees]</HierarchyUniqueName><LevelName>Employee
> Level 02</LevelName><UniqueName>[Employee].[Employees].[Employee Level
> 02]</UniqueName></ID><ItemCaption>Employees</ItemCaption><UniqueName>true</UniqueName><IsParentChild>true</IsParentChild></Item><Item><ID
> xsi:type="Measure"><MeasureName>Reseller Sales
> Amount</MeasureName><UniqueName>[Measures].[Reseller Sales
> Amount]</UniqueName></ID><ItemCaption>Reseller Sales
> Amount</ItemCaption><BackColor>true</BackColor><ForeColor>true</ForeColor><FontFamily>true</FontFamily><FontSize>true</FontSize><FontWeight>true</FontWeight><FontStyle>true</FontStyle><FontDecoration>true</FontDecoration><FormattedValue>true</FormattedValue><FormatString>true</FormatString></Item></Items></Select><From>Adventure
> Works</From><Filter><FilterItems /></Filter><Calculations /><Aggregates
> /><QueryProperties /></QuerySpecification><Query><Statement> SELECT NON
> EMPTY { [Measures].[Reseller Sales Amount] } ON COLUMNS, NON EMPTY {
> (DESCENDANTS([Employee].[Employees].[Employee Level 02].ALLMEMBERS) ) }
> DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME,
> PARENT_UNIQUE_NAME, LEVEL_NUMBER ON ROWS FROM [Adventure Works] CELL
> PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING,
> FONT_NAME, FONT_SIZE, FONT_FLAGS</Statement><ParameterDefinitions
> /></Query></QueryDefinition></rd:MdxQuery>
> </Query>
> <Fields>
> <Field Name="Employees">
> <rd:TypeName>System.String</rd:TypeName>
> <DataField><?xml version="1.0" encoding="utf-8"?><Field
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Level"
> UniqueName="[Employee].[Employees]" /></DataField>
> </Field>
> <Field Name="Reseller_Sales_Amount">
> <rd:TypeName>System.Int32</rd:TypeName>
> <DataField><?xml version="1.0" encoding="utf-8"?><Field
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
> UniqueName="[Measures].[Reseller Sales Amount]" /></DataField>
> </Field>
> </Fields>
> </DataSet>
> </DataSets>
> <Width>5.625in</Width>
> <InteractiveHeight>11in</InteractiveHeight>
> <Language>en-US</Language>
> <TopMargin>1in</TopMargin>
> </Report>
>|||Thank you Robert, that was very helpful. I got past a hurdle. I do have a
couple of folllowup questions inspired by your response (and my somewhat
novice knowledge of OLAP).
Raghu
--
1. Dimension properties MEMBER_UNIQUE_NAME and PARENT_UNIQUE_NAME do get
added in the MDX as you mention. Any idea why they don't show up as fields in
the dataset? Your grouping expression used Employee.UniqueName. How are we
to know what the name of those fields are? Should we just strip of the MEMBER
keyword and any underscores and use as field names, or is there a list
somewhere? I'll try to search the docs as well. Also, when I tried to use
MEMBER_KEY property, it showed up in the result set unlike the others.
2. The grouping is based on names, which are a character based. Would this
affect performance adversely if the report data is large? One of the reasons
I wanted to use IDs was due to the names not being unique (But
MEMBER_UNIQUE_NAME seems to imply that Analysis services is generating one in
internally.)
3. I was somewhat surprised at the difference in behavior when we use
Employees("Value") and Employees.Value. Could you please shed some more light
on this as to what's happening here? I think when you use the first method,
you are basically using the indexer property in VB.NET syntax (please correct
me if I'm wrong.), but that's as far as I could get. Is this behavior
documented somewhere?
"Robert Bruckner [MSFT]" wrote:
> BTW: you don't need to have the two additional hidden table columns with
> UniqueName and ParentUniqueName in the report (as shown in my sample). It is
> sufficient to e.g. just change the expression in the first table column from
> =Fields!Employees.Value to =Fields!Employees("Value"). This will turn off a
> certain optimization related to extended field properties.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
> news:e4fKfdq1FHA.2964@.TK2MSFTNGP09.phx.gbl...
> >I attached a sample report that shows how to do this.
> > Notes:
> > * in the graphical query designer you have to select a recursive hierarchy
> > from the cube (such as Employee.Employees in the AdventureWorks DW cube).
> > Based on the metadata, RS should automatically detect that this is a
> > recursive parent-child hierarchy and there will be additional extended
> > field properties available (such as .UniqueName and .ParentUniqueName)
> > * add a grouping in the report. The grouping expression is based on
> > =Fields!Employees.UniqueName and for the parent of the group set it to
> > =Fields!Employees.ParentUniqueName
> > * right now, you will need to have table columns that also reference the
> > UniqueName and the ParentUniqueName in the report - but you can hide them
> > so they are not visible. If you don't have these columns, the recursive
> > hierarchy won't work correctly.
> >
> > -- Robert
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >
> >
> > "Raghu" <Raghu@.discussions.microsoft.com> wrote in message
> > news:A3B4E2B3-B78D-4571-9D90-69EC03FD18E4@.microsoft.com...
> >> I'm trying to use an OLAP cube as my data source (built using SSAS 2005)
> >> The cube has a parent-child dimension and a fact table. I would like to
> >> display the parent-child data in a report . Does anyone know how to build
> >> an
> >> MDX query that would give me the ID and the ParentID from the dimension
> >> to
> >> build the parent-child grouping relationship in the report? The MDX
> >> builder
> >> does not let me access the ID field or the ParentID field. I always get
> >> the
> >> Name of the dimension.
> >>
> >> Also, if there's another way to do this, please let me know.
> >>
> >> Any help is greatly appreciated.
> >>
> >> Thanks
> >
> >
> > ==========================================================> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <Report
> > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
> > xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> > <DataSources>
> > <DataSource Name="DataSource1">
> > <ConnectionProperties>
> > <IntegratedSecurity>true</IntegratedSecurity>
> > <ConnectString>Data Source=(local);Initial Catalog="Adventure Works
> > DW"</ConnectString>
> > <DataProvider>OLEDB-MD</DataProvider>
> > </ConnectionProperties>
> >
> > <rd:DataSourceID>5aaa5577-4975-4616-a136-0b713dab6948</rd:DataSourceID>
> > </DataSource>
> > </DataSources>
> > <BottomMargin>1in</BottomMargin>
> > <RightMargin>1in</RightMargin>
> > <rd:DrawGrid>true</rd:DrawGrid>
> > <InteractiveWidth>8.5in</InteractiveWidth>
> > <rd:SnapToGrid>true</rd:SnapToGrid>
> > <Body>
> > <ReportItems>
> > <Table Name="table1">
> > <Footer>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox7">
> > <rd:DefaultName>textbox7</rd:DefaultName>
> > <ZIndex>9</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox9">
> > <rd:DefaultName>textbox9</rd:DefaultName>
> > <ZIndex>8</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox8">
> > <rd:DefaultName>textbox8</rd:DefaultName>
> > <ZIndex>7</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox11">
> > <rd:DefaultName>textbox11</rd:DefaultName>
> > <ZIndex>6</ZIndex>
> > <Style>
> > <TextAlign>Center</TextAlign>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox13">
> > <rd:DefaultName>textbox13</rd:DefaultName>
> > <ZIndex>5</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > </Footer>
> > <DataSetName>DataSet1</DataSetName>
> > <Top>0.5in</Top>
> > <Details>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="Employees">
> > <rd:DefaultName>Employees</rd:DefaultName>
> > <ZIndex>4</ZIndex>
> > <Style>
> > <PaddingLeft>=2 + Level() * 8 &
> > "pt"</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!Employees.Value</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox10">
> > <ZIndex>3</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!Employees.UniqueName</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox5">
> > <rd:DefaultName>textbox5</rd:DefaultName>
> > <ZIndex>2</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!Employees.ParentUniqueName</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="Reseller_Sales_Amount">
> >
> > <rd:DefaultName>Reseller_Sales_Amount</rd:DefaultName>
> > <ZIndex>1</ZIndex>
> > <Style>
> > <TextAlign>Center</TextAlign>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value>=Level()</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="Reseller_Sales_Amount_1">
> >
> > <rd:DefaultName>Reseller_Sales_Amount_1</rd:DefaultName>
> > <Style>
> > <TextAlign>Right</TextAlign>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> >
> > <Value>=Sum(Fields!Reseller_Sales_Amount.Value)</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > </TableCells>
> > <Height>0.25in</Height>
> > </TableRow>
> > </TableRows>
> > <Grouping Name="table1_Details_Group">
> > <Parent>=Fields!Employees.ParentUniqueName</Parent>
> > <GroupExpressions>
> >
> > <GroupExpression>=Fields!Employees.UniqueName</GroupExpression>
> > </GroupExpressions>
> > </Grouping>
> > </Details>
> > <Header>
> > <TableRows>
> > <TableRow>
> > <TableCells>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox1">
> > <rd:DefaultName>textbox1</rd:DefaultName>
> > <ZIndex>14</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>
> > <PaddingTop>2pt</PaddingTop>
> > </Style>
> > <CanGrow>true</CanGrow>
> > <Value>Employees</Value>
> > </Textbox>
> > </ReportItems>
> > </TableCell>
> > <TableCell>
> > <ReportItems>
> > <Textbox Name="textbox4">
> > <rd:DefaultName>textbox4</rd:DefaultName>
> > <ZIndex>13</ZIndex>
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingRight>2pt</PaddingRight>|||#1: AS dimension properties (such as Member_Unique_Name) and cell properties
(such as Formatted_Value) automatically get translated into RDL extended
properties. Please check the "Using Extended Field Properties for Analysis
Services Data" in RS 2005 Books Online (e.g. at
http://msdn2.microsoft.com/en-us/library/ms156477). Consequently, they are
just field properties instead of additional fields (as they used to be in RS
2000 through the old OleDB provider for AS 2000). Here is the
mapping/translation for the predefined RDL field properties that happens
inside our AdoMd AS data extension:
RDL field property name: Type / AS translation:
Value Object (from Member_Caption)
IsMissing Boolean (field is defined in RDL but
not returned from query)
UniqueName String (from Member_Unique_Name)
BackgroundColor String (see Style.BackgroundColor; retrieved
from Back_Color)
Color String (see Style.Color; retrieved
from Fore_Color)
FontFamily String (see Style.FontFamily; retrieved
from Font_Name)
FontSize String (see Style.FontSize; retrieved
from Font_Size)
FontWeight String (see Style.FontWeight; retrieved
from Font_Flags)
FontStyle String (see Style.FontStyle;
retrieved from Font_Flags)
TextDecoration String (see Style.TextDecoration;
retrieved from Font_Flags)
FormattedValue String (from Formatted_Value)
Key Object (this is supposed to be
retrieved from Member_Key; however right now you have to use the collection
syntax to retrieve the value as =Fields!MemberName("Member_Key") )
LevelNumber Integer (from Level_Number)
ParentUniqueName String (from Parent_Unique_Name)
Note: the Member_Key field that shows up in the designer fields list won't
be mapped correctly at report execution. Therefore the value will just be
NULL right now. You have to use the following syntax to retrieve the value:
=Fields!MemberName("Member_Key").
#2: You could define custom properties (IDs) in your cube and retrieve them
through the MDX query (not sure which steps are exactly needed to set this
up in your cube - you may want to lookup AS 2005 BOL). These custom
properties would not get mapped to predefined property names. Therefore, you
would need to use the property collection syntax to access them, e.g.
=Fields!MemberName("MyID"). Note: even if your ids are numbers, I believe
the AS data provider will return them as strings. Anyway, you could then use
e.g. =CInt(Fields!MemberName("MyID")) for the grouping.
#3: In general, there is no difference in behavior for these expressions:
=Fields!FieldName.PropertyName -- static field/property reference
=Fields("FieldName").PropertyName -- dynamic field reference
=Fields!FieldName("PropertyName") -- dynamic property reference
=Fields(Fields!SomeOtherField.Value).PropertyName -- dynamic field name is
determined by the value of another field
However, we implemented several levels of performance optimizations that
would e.g. only retrieve those property values that are really used in the
report (e.g. if you use static references only throughout the entire
report). Using a dynamic property reference will turn off the optimization
for a certain field. Due to a bug, the usage of ParentUniqueName
specifically in the parent-child recursive grouping is not detected. By
using the dynamic property reference, you turn off the optimization, we will
retrieve the ParentUniqueName property value for the field also, and
everything will work. The fix for the detection will be included in a
service pack - in the meantime, just use the dynamic property reference to
turn off the optimization.
We will look into making the extended properties more "discoverable" through
visual indications at report design time in future releases. This includes
detecting/setting up recursive hierarchies more easily from AS data.
Hope this answers your questions,
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Raghu" <Raghu@.discussions.microsoft.com> wrote in message
news:25F0BE41-DDA1-491E-9043-A7E36AA633E7@.microsoft.com...
> Thank you Robert, that was very helpful. I got past a hurdle. I do have a
> couple of folllowup questions inspired by your response (and my somewhat
> novice knowledge of OLAP).
> Raghu
> --
> 1. Dimension properties MEMBER_UNIQUE_NAME and PARENT_UNIQUE_NAME do get
> added in the MDX as you mention. Any idea why they don't show up as fields
> in
> the dataset? Your grouping expression used Employee.UniqueName. How are
> we
> to know what the name of those fields are? Should we just strip of the
> MEMBER
> keyword and any underscores and use as field names, or is there a list
> somewhere? I'll try to search the docs as well. Also, when I tried to use
> MEMBER_KEY property, it showed up in the result set unlike the others.
> 2. The grouping is based on names, which are a character based. Would this
> affect performance adversely if the report data is large? One of the
> reasons
> I wanted to use IDs was due to the names not being unique (But
> MEMBER_UNIQUE_NAME seems to imply that Analysis services is generating one
> in
> internally.)
> 3. I was somewhat surprised at the difference in behavior when we use
> Employees("Value") and Employees.Value. Could you please shed some more
> light
> on this as to what's happening here? I think when you use the first
> method,
> you are basically using the indexer property in VB.NET syntax (please
> correct
> me if I'm wrong.), but that's as far as I could get. Is this behavior
> documented somewhere?
> "Robert Bruckner [MSFT]" wrote:
>> BTW: you don't need to have the two additional hidden table columns with
>> UniqueName and ParentUniqueName in the report (as shown in my sample). It
>> is
>> sufficient to e.g. just change the expression in the first table column
>> from
>> =Fields!Employees.Value to =Fields!Employees("Value"). This will turn off
>> a
>> certain optimization related to extended field properties.
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
>> news:e4fKfdq1FHA.2964@.TK2MSFTNGP09.phx.gbl...
>> >I attached a sample report that shows how to do this.
>> > Notes:
>> > * in the graphical query designer you have to select a recursive
>> > hierarchy
>> > from the cube (such as Employee.Employees in the AdventureWorks DW
>> > cube).
>> > Based on the metadata, RS should automatically detect that this is a
>> > recursive parent-child hierarchy and there will be additional extended
>> > field properties available (such as .UniqueName and .ParentUniqueName)
>> > * add a grouping in the report. The grouping expression is based on
>> > =Fields!Employees.UniqueName and for the parent of the group set it to
>> > =Fields!Employees.ParentUniqueName
>> > * right now, you will need to have table columns that also reference
>> > the
>> > UniqueName and the ParentUniqueName in the report - but you can hide
>> > them
>> > so they are not visible. If you don't have these columns, the recursive
>> > hierarchy won't work correctly.
>> >
>> > -- Robert
>> > This posting is provided "AS IS" with no warranties, and confers no
>> > rights.
>> >
>> >
>> > "Raghu" <Raghu@.discussions.microsoft.com> wrote in message
>> > news:A3B4E2B3-B78D-4571-9D90-69EC03FD18E4@.microsoft.com...
>> >> I'm trying to use an OLAP cube as my data source (built using SSAS
>> >> 2005)
>> >> The cube has a parent-child dimension and a fact table. I would like
>> >> to
>> >> display the parent-child data in a report . Does anyone know how to
>> >> build
>> >> an
>> >> MDX query that would give me the ID and the ParentID from the
>> >> dimension
>> >> to
>> >> build the parent-child grouping relationship in the report? The MDX
>> >> builder
>> >> does not let me access the ID field or the ParentID field. I always
>> >> get
>> >> the
>> >> Name of the dimension.
>> >>
>> >> Also, if there's another way to do this, please let me know.
>> >>
>> >> Any help is greatly appreciated.
>> >>
>> >> Thanks
>> >
>> >
>> > ==========================================================>> >
>> > <?xml version="1.0" encoding="utf-8"?>
>> > <Report
>> > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
>> > xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
>> > <DataSources>
>> > <DataSource Name="DataSource1">
>> > <ConnectionProperties>
>> > <IntegratedSecurity>true</IntegratedSecurity>
>> > <ConnectString>Data Source=(local);Initial Catalog="Adventure
>> > Works
>> > DW"</ConnectString>
>> > <DataProvider>OLEDB-MD</DataProvider>
>> > </ConnectionProperties>
>> >
>> > <rd:DataSourceID>5aaa5577-4975-4616-a136-0b713dab6948</rd:DataSourceID>
>> > </DataSource>
>> > </DataSources>
>> > <BottomMargin>1in</BottomMargin>
>> > <RightMargin>1in</RightMargin>
>> > <rd:DrawGrid>true</rd:DrawGrid>
>> > <InteractiveWidth>8.5in</InteractiveWidth>
>> > <rd:SnapToGrid>true</rd:SnapToGrid>
>> > <Body>
>> > <ReportItems>
>> > <Table Name="table1">
>> > <Footer>
>> > <TableRows>
>> > <TableRow>
>> > <TableCells>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox7">
>> > <rd:DefaultName>textbox7</rd:DefaultName>
>> > <ZIndex>9</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value />
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox9">
>> > <rd:DefaultName>textbox9</rd:DefaultName>
>> > <ZIndex>8</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value />
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox8">
>> > <rd:DefaultName>textbox8</rd:DefaultName>
>> > <ZIndex>7</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value />
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox11">
>> > <rd:DefaultName>textbox11</rd:DefaultName>
>> > <ZIndex>6</ZIndex>
>> > <Style>
>> > <TextAlign>Center</TextAlign>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value />
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox13">
>> > <rd:DefaultName>textbox13</rd:DefaultName>
>> > <ZIndex>5</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value />
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > </TableCells>
>> > <Height>0.25in</Height>
>> > </TableRow>
>> > </TableRows>
>> > </Footer>
>> > <DataSetName>DataSet1</DataSetName>
>> > <Top>0.5in</Top>
>> > <Details>
>> > <TableRows>
>> > <TableRow>
>> > <TableCells>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="Employees">
>> > <rd:DefaultName>Employees</rd:DefaultName>
>> > <ZIndex>4</ZIndex>
>> > <Style>
>> > <PaddingLeft>=2 + Level() * 8 &
>> > "pt"</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value>=Fields!Employees.Value</Value>
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox10">
>> > <ZIndex>3</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value>=Fields!Employees.UniqueName</Value>
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox5">
>> > <rd:DefaultName>textbox5</rd:DefaultName>
>> > <ZIndex>2</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value>=Fields!Employees.ParentUniqueName</Value>
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="Reseller_Sales_Amount">
>> >
>> > <rd:DefaultName>Reseller_Sales_Amount</rd:DefaultName>
>> > <ZIndex>1</ZIndex>
>> > <Style>
>> > <TextAlign>Center</TextAlign>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value>=Level()</Value>
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="Reseller_Sales_Amount_1">
>> >
>> > <rd:DefaultName>Reseller_Sales_Amount_1</rd:DefaultName>
>> > <Style>
>> > <TextAlign>Right</TextAlign>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> >
>> > <Value>=Sum(Fields!Reseller_Sales_Amount.Value)</Value>
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > </TableCells>
>> > <Height>0.25in</Height>
>> > </TableRow>
>> > </TableRows>
>> > <Grouping Name="table1_Details_Group">
>> > <Parent>=Fields!Employees.ParentUniqueName</Parent>
>> > <GroupExpressions>
>> >
>> > <GroupExpression>=Fields!Employees.UniqueName</GroupExpression>
>> > </GroupExpressions>
>> > </Grouping>
>> > </Details>
>> > <Header>
>> > <TableRows>
>> > <TableRow>
>> > <TableCells>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox1">
>> > <rd:DefaultName>textbox1</rd:DefaultName>
>> > <ZIndex>14</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>
>> > <PaddingTop>2pt</PaddingTop>
>> > </Style>
>> > <CanGrow>true</CanGrow>
>> > <Value>Employees</Value>
>> > </Textbox>
>> > </ReportItems>
>> > </TableCell>
>> > <TableCell>
>> > <ReportItems>
>> > <Textbox Name="textbox4">
>> > <rd:DefaultName>textbox4</rd:DefaultName>
>> > <ZIndex>13</ZIndex>
>> > <Style>
>> > <PaddingLeft>2pt</PaddingLeft>
>> > <PaddingBottom>2pt</PaddingBottom>
>> > <PaddingRight>2pt</PaddingRight>|||Robert-
Fabulous post. Was wondering if you had any suggestions for using
parent-child dimensions in Report Builder...
(Of course, I'm talking about using a model which is generated on top of an
SSAS cube.) If I'm looking at a standard dimension, each level in the
hierarchy will be a separate attribute (such as Region and City), so it's
easy to just drop Region and City onto a Report Builder report and get the
nice nesting I want. However, with parent-child dimensions, each level isn't
a separate attribute... and since Report Builder doesn't render any
hierarchies in a dimension (whether it's a user-defined hierarchy or the
hierarchy built by the marking an attribute as the Parent), I can't figure
out a way to build a Report Builder report which would have a Region column
and a City column if both Region and City are part of the parent child
dimension. Any suggestions would be appreciated.
The reason we had to make it a parent-child dimension is because one measure
group can have facts at several levels... so the only way we could do this is
with a parent-child hierarchy as standard dimensions can only have data at
one grain per measure group. (Correct me if I'm wrong.)
Thanks for any suggestions.
"Robert Bruckner [MSFT]" wrote:
> I attached a sample report that shows how to do this.
> Notes:
> * in the graphical query designer you have to select a recursive hierarchy
> from the cube (such as Employee.Employees in the AdventureWorks DW cube).
> Based on the metadata, RS should automatically detect that this is a
> recursive parent-child hierarchy and there will be additional extended field
> properties available (such as .UniqueName and .ParentUniqueName)
> * add a grouping in the report. The grouping expression is based on
> =Fields!Employees.UniqueName and for the parent of the group set it to
> =Fields!Employees.ParentUniqueName
> * right now, you will need to have table columns that also reference the
> UniqueName and the ParentUniqueName in the report - but you can hide them so
> they are not visible. If you don't have these columns, the recursive
> hierarchy won't work correctly.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Raghu" <Raghu@.discussions.microsoft.com> wrote in message
> news:A3B4E2B3-B78D-4571-9D90-69EC03FD18E4@.microsoft.com...
> > I'm trying to use an OLAP cube as my data source (built using SSAS 2005)
> > The cube has a parent-child dimension and a fact table. I would like to
> > display the parent-child data in a report . Does anyone know how to build
> > an
> > MDX query that would give me the ID and the ParentID from the dimension to
> > build the parent-child grouping relationship in the report? The MDX
> > builder
> > does not let me access the ID field or the ParentID field. I always get
> > the
> > Name of the dimension.
> >
> > Also, if there's another way to do this, please let me know.
> >
> > Any help is greatly appreciated.
> >
> > Thanks
>
> ==========================================================> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
> xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
> <DataSources>
> <DataSource Name="DataSource1">
> <ConnectionProperties>
> <IntegratedSecurity>true</IntegratedSecurity>
> <ConnectString>Data Source=(local);Initial Catalog="Adventure Works
> DW"</ConnectString>
> <DataProvider>OLEDB-MD</DataProvider>
> </ConnectionProperties>
> <rd:DataSourceID>5aaa5577-4975-4616-a136-0b713dab6948</rd:DataSourceID>
> </DataSource>
> </DataSources>
> <BottomMargin>1in</BottomMargin>
> <RightMargin>1in</RightMargin>
> <rd:DrawGrid>true</rd:DrawGrid>
> <InteractiveWidth>8.5in</InteractiveWidth>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <Body>
> <ReportItems>
> <Table Name="table1">
> <Footer>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox7">
> <rd:DefaultName>textbox7</rd:DefaultName>
> <ZIndex>9</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox9">
> <rd:DefaultName>textbox9</rd:DefaultName>
> <ZIndex>8</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox8">
> <rd:DefaultName>textbox8</rd:DefaultName>
> <ZIndex>7</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox11">
> <rd:DefaultName>textbox11</rd:DefaultName>
> <ZIndex>6</ZIndex>
> <Style>
> <TextAlign>Center</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox13">
> <rd:DefaultName>textbox13</rd:DefaultName>
> <ZIndex>5</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> </Footer>
> <DataSetName>DataSet1</DataSetName>
> <Top>0.5in</Top>
> <Details>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="Employees">
> <rd:DefaultName>Employees</rd:DefaultName>
> <ZIndex>4</ZIndex>
> <Style>
> <PaddingLeft>=2 + Level() * 8 &
> "pt"</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Employees.Value</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox10">
> <ZIndex>3</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Employees.UniqueName</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox5">
> <rd:DefaultName>textbox5</rd:DefaultName>
> <ZIndex>2</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Fields!Employees.ParentUniqueName</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="Reseller_Sales_Amount">
> <rd:DefaultName>Reseller_Sales_Amount</rd:DefaultName>
> <ZIndex>1</ZIndex>
> <Style>
> <TextAlign>Center</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Level()</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="Reseller_Sales_Amount_1">
> <rd:DefaultName>Reseller_Sales_Amount_1</rd:DefaultName>
> <Style>
> <TextAlign>Right</TextAlign>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>=Sum(Fields!Reseller_Sales_Amount.Value)</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> </TableCells>
> <Height>0.25in</Height>
> </TableRow>
> </TableRows>
> <Grouping Name="table1_Details_Group">
> <Parent>=Fields!Employees.ParentUniqueName</Parent>
> <GroupExpressions>
> <GroupExpression>=Fields!Employees.UniqueName</GroupExpression>
> </GroupExpressions>
> </Grouping>
> </Details>
> <Header>
> <TableRows>
> <TableRow>
> <TableCells>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox1">
> <rd:DefaultName>textbox1</rd:DefaultName>
> <ZIndex>14</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value>Employees</Value>
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox4">
> <rd:DefaultName>textbox4</rd:DefaultName>
> <ZIndex>13</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </TableCell>
> <TableCell>
> <ReportItems>
> <Textbox Name="textbox2">
> <rd:DefaultName>textbox2</rd:DefaultName>
> <ZIndex>12</ZIndex>
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingRight>2pt</PaddingRight>
> <PaddingTop>2pt</PaddingTop>
> </Style>
> <CanGrow>true</CanGrow>