Number of Executions in Subreport

  • Here is a scenario:

    Main report produces a query dataset with columns col1 and col2 and 1,000 records.  col1 has the same value among all records, col2 has a value unique to each record.

    Subreport contains two stored procedures each as it's own dataset.  First procedure expects one parameter - col1; second procedure expects two parameters - col1 and col2.  Keep in mind col1 has one distinct value across the dataset and col2 varies by record.

    1. How many executions will occur per stored procedure?  Will the first run only once because of the one distinct value or still 1,000 times because the main dataset produces that many records.  Am I correct to assume the second will perform 1,000 executions due to each main record being unique?
    2. If the first procedure, is in fact, called 1,000 times, please provide a suggestion on changing to run only once for the one unique value.

    Thank you.

  • I gues as many times your subreport is called ( the distinct values?) + 1 for the main report

  • Quick question, can you post the DDL (create table) for the tables, sample data as an insert statement, what you have tried so far and the expected result set?

    😎

    The problem here is the backend (SQL) construct that is doing an RBAR  or Row By Agonising Row execution instead of delivering a result set.

  • I’m not following.   The table structures and data content aren’t relevant here.  I’m simply asking how the scenario I provided is expected to behave in SSRS in terms of number of executions in the subreport.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply