Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 28687

Drill through data until condition is met?

$
0
0

I’m trying to display my sales order data in a report which will drill down through the parent, child sub parts of the sales order line item until the part is in stock. It will always display the top level (sales order item).  If it’s in stock then that’s all that will be seen.  If it’s not in stock then it will display every sub part down the tree until the first one that’s in stock where it will stop.  My data I have is like the following and each part can be a parent or have many children grandchildren etc. I haven’t shown the stock levels in this as being fairly new to SQL and SSRS I’m not sure it can even be done?

Many thanks in advance

Matt

Ordered          toplvl               item                itemparent       level

SO-0001        705-006406     705-006406    705-006406     1

SO-0001        901-101107     901-101107    901-101107     1

SO-0001        901L102961    901L102961   901L102961    1

SO-0001        901L102961    711L006017   901L102961    2

SO-0001        901L102961    901-102969    901L102961    2

SO-0001        901L102961    643-000151    901-102969     3

SO-0001        901L102961    901L101899   901L102961    2

SO-0001        901L102961    901-101863    901L101899    3

SO-0001        901L102961    901L101454   901L101899    3

SO-0001        901L102961    623-000148    901L101454    4

SO-0001        901L102961    902L101644   901L102961    2

SO-0001        901L102961    759-000140    902L101644    3

SO-0001        901L102961    901L102968   901L102961    2

SO-0001        901L102961    745-000148    901L102968    3


Viewing all articles
Browse latest Browse all 28687

Trending Articles



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