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
"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>