The next report that we're going to create is the Sales Order Details report. Find the SQL file named
uspSalesOrderDetail.sql available with the code files for this book. Execute the script to create a stored procedure called
This report has the same single parameter as the
uspSalesOrderHeader stored procedure,
@SalesOrderNumber (SalesOrderID). This will be the dataset that we'll use for our next report.
Although we're going to use this as a subreport that we embed into the main report, we're going to treat this just like any other standalone report.
There's a reason for that: Reusability.
We're going to keep this report as simple as possible. Let's name it SalesOrderDetailReport.