Quantcast
Channel: SQL Server Reporting Services, Power View Forum
Viewing all articles
Browse latest Browse all 4035

Most efficient dataset for recursive row groups?

$
0
0

I have been producing reports with Recursive Row Groups in which the Parent rows aggregate the details from all their child rows.

To accomplish this I have been producing datasets in which every parent has a row for every one of its child's rows.  This results in very large datasets since the number of rows is O((P + 1) * C * N) -- e.g., if each child has 10 detail rows, and each parent has 5 children and there are 2 parents then I produce 3 * 5 * 10 rows.

This seems very wasteful in cases where all details are defined only on children rows (or "leaf nodes" using the tree schema).  In such cases it would be more natural to produce the detail rows -- O(C * N) -- and then send the recursion relationship to the report separately.  In either case the report does the aggregation for parents, but in this method it does so without duplicative data being passed.

However since a Tablix only runs against one DataSet I can't find a way to pass it the recursion relationship separately to use in a row group's Recursive parent.  Is there a way to accomplish this?

If I add a single dummy row for each parent I don't see an intuitive way to get the report to calculate aggregates across the children.  I can calculate the aggregates in SQL and put them in the dummy rows, but then I'm duplicating report logic in my query.  Is that what I should do, or is it "correct" to pass the report duplicative detail-level data rows for each parent node of a recursion hierarchy?


Viewing all articles
Browse latest Browse all 4035


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>