I'm using Aggregate() with a custom data extension implementing the IDataReaderExtension interface, to make RS use my
own calculation of subtotals for matrices and lists, and this works just fine as long as there is only one
<GroupExpression> tag within each <GroupExpressions> tag, e.g.:
<MatrixRows>
<RowGroupings>
<RowGrouping>
<DynamicRows>
<Grouping>
<GroupExpressions>
<GroupExpression>=Fields!Year.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems><Textbox><Value>=Fields!Year.Value</Value></Textbox></ReportItems>
</DynamicRows>
</RowGrouping>
<RowGrouping>
<DynamicRows>
<Grouping>
<GroupExpressions><GroupExpression>=Fields!Quarter.Value</GroupExpression></GroupExpressions>
</Grouping>
<ReportItems><Textbox><Value>=Fields!Quarter.Value</Value></Textbox></ReportItems>
</DynamicRows>
</RowGrouping>
<RowGrouping>
<DynamicRows>
<Grouping>
<GroupExpressions><GroupExpression>=Fields!Month.Value</GroupExpression></GroupExpressions>
</Grouping>
<ReportItems><Textbox><Value>=Fields!Month.Value</Value></Textbox></ReportItems>
</DynamicRows>
</RowGrouping>
</RowGroupings>
<MatrixRows>
But when I don't want to show an intermediate grouping, like Quarter in the above, but still want to group by it, the
matrix cells are blank:
<MatrixRows>
<RowGroupings>
<RowGrouping>
<DynamicRows>
<Grouping>
<GroupExpressions>
<GroupExpression>=Fields!Year.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems><Textbox><Value>=Fields!Year.Value</Value></Textbox></ReportItems>
</DynamicRows>
</RowGrouping>
<RowGrouping>
<DynamicRows>
<Grouping>
<GroupExpressions>
<GroupExpression>=Fields!Quarter.Value</GroupExpression>
<GroupExpression>=Fields!Month.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems><Textbox><Value>=Fields!Month.Value</Value></Textbox></ReportItems>
</DynamicRows>
</RowGrouping>
</RowGroupings>
<MatrixRows>
The dataset is identical, and returns the same results for IsAggregateRow etc.
Can someone please tell me what I'm doing wrong or misunderstanding?
Thanks!
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.Currently this is by design. Aggregate function only works when there is
only one group expression and it must be simple field reference.
Fang Wang (MSFT)
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Olaf Ollgaard" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:O7PuZUCYEHA.3716@.TK2MSFTNGP11.phx.gbl...
> I'm using Aggregate() with a custom data extension implementing the
IDataReaderExtension interface, to make RS use my
> own calculation of subtotals for matrices and lists, and this works just
fine as long as there is only one
> <GroupExpression> tag within each <GroupExpressions> tag, e.g.:
> <MatrixRows>
> <RowGroupings>
> <RowGrouping>
> <DynamicRows>
> <Grouping>
> <GroupExpressions>
> <GroupExpression>=Fields!Year.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
>
<ReportItems><Textbox><Value>=Fields!Year.Value</Value></Textbox></ReportIte
ms>
> </DynamicRows>
> </RowGrouping>
> <RowGrouping>
> <DynamicRows>
> <Grouping>
>
<GroupExpressions><GroupExpression>=Fields!Quarter.Value</GroupExpression></
GroupExpressions>
> </Grouping>
>
<ReportItems><Textbox><Value>=Fields!Quarter.Value</Value></Textbox></Report
Items>
> </DynamicRows>
> </RowGrouping>
> <RowGrouping>
> <DynamicRows>
> <Grouping>
>
<GroupExpressions><GroupExpression>=Fields!Month.Value</GroupExpression></Gr
oupExpressions>
> </Grouping>
>
<ReportItems><Textbox><Value>=Fields!Month.Value</Value></Textbox></ReportIt
ems>
> </DynamicRows>
> </RowGrouping>
> </RowGroupings>
> <MatrixRows>
> But when I don't want to show an intermediate grouping, like Quarter in
the above, but still want to group by it, the
> matrix cells are blank:
> <MatrixRows>
> <RowGroupings>
> <RowGrouping>
> <DynamicRows>
> <Grouping>
> <GroupExpressions>
> <GroupExpression>=Fields!Year.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
>
<ReportItems><Textbox><Value>=Fields!Year.Value</Value></Textbox></ReportIte
ms>
> </DynamicRows>
> </RowGrouping>
> <RowGrouping>
> <DynamicRows>
> <Grouping>
> <GroupExpressions>
> <GroupExpression>=Fields!Quarter.Value</GroupExpression>
> <GroupExpression>=Fields!Month.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
>
<ReportItems><Textbox><Value>=Fields!Month.Value</Value></Textbox></ReportIt
ems>
> </DynamicRows>
> </RowGrouping>
> </RowGroupings>
> <MatrixRows>
> The dataset is identical, and returns the same results for IsAggregateRow
etc.
> Can someone please tell me what I'm doing wrong or misunderstanding?
> Thanks!
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.
Wednesday, March 21, 2012
GroupExpressions and Aggregate()
Labels:
aggregate,
calculation,
custom,
database,
extension,
groupexpressions,
idatareaderextension,
implementing,
interface,
microsoft,
mysql,
oracle,
own,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment