locked
Subreport Taking Forever to Run - Possible Parameter Issue RRS feed

  • Question

  • I have a report and a subreport in SSRS 2008 that, independent of one another, run in about one second.  However, when I link the subreport into the main report, it doesn't want to seem to come back.  I've stopped it after a few minutes, so I don't know if eventually it would come back or not.  I suspect it could be a parameter issue; specifically that I just don't know what I'm doing :)

    My main report has one Dataset that returns multiple student rows that are displayed in a standard report table - one row per student.  In one of the table cells, I have placed the subreport.  Both reports are in the same project, so I select SubReport Properties and go through the following steps to hook them up:

    1. Under the General section, I select the name of the subreport to use from "Use this report as a subreport"
    2. Under the Parameters section, I Add a parameter, select the parameter name in the first drop-down box (the subreport only has one parameter, a studentID), and fromt he Value dropdown box, I select StudentID, which is a field in the Main Subreport. 

    When I run the report, it takes forever.  If I go back into the Subreport Preperties and back to the Parameters section, and click on the Expression box, I notice that my expression: =Fields!StudentID.Value, is underlined in red.  When I place the mouse cursor over top of it, it says: Unknown Collection Member.  Also, down in the Category box, if I select Fields, no items are listed and the description says: Report item not linked to a dataset.

    Does this mean I am not connecting the two reports properly?

    Monday, March 19, 2012 8:36 PM

All replies

  • As a follow up, I added a Student ID parameter to my main report so I could have it return just one student.  This does allow the report to run in just a few seconds, and curious, the subreport is not displayed and I get the following warnings:

    [rsErrorExecutingSubreport] An error occurred while executing the subreport 'Subreport1' (Instance: 87iT0R0R0x0S0): One or more parameters were not specified for the subreport, 'Subreport1', located at: /CCR Student KOSSA Details.
      [rsNone] One or more parameters required to run the report have not been specified.
      [rsNone] One or more parameters were not specified for the subreport, 'Subreport1', located at: /CCR Student KOSSA Details.
    Preview complete -- 0 errors, 2 warnings

    I'm also going to add the image below so you can see the setup:

    Monday, March 19, 2012 9:03 PM
  • Hi puffster,

    Thanks for your post.

    According to the description of your first post, it seems you load too much data in the subreport which would show in each row of your main report, as a result, which make your report to running too long. However, in your second post, you had already fixed this issue by limiting the record on your subreport with the student id showing on each row in your main report.  From the screenshot you provide, you only specify one parameter for your subreport, the error message indicates you have not specified values for all your subreport parameters, you must specify all the report parameter of your subreport in the Parameters tab of the Subreport Properties window, specify the Name the same as the Name of the subreport parameter, and keep the value field type matched with the type of the relevant parameter of your subreport.

    Thanks,
    Bill Lu


    Bill Lu

    TechNet Community Support

    Wednesday, March 21, 2012 6:45 AM
  • Bill Lu!

      Thanks for taking the time to read over my issue and respond.  In my picture, I wish I would have thought to expand my subreport parameters...but the subreport only has/is expecting one parameter.  I've been plugging away at it, and the problem seems to be with the value being passed into the subreport.  

    When I click on the drop-down list for the Value field, it shows me a list of all the fields I'm using in the main report, including PersonID, which is what I'm hoping to pass in.  I select it, but then if I click the Expression button next to the value field, when it shows Fields!Person_ID.Value, it shows it with a red squiggly line underneath it and says it's an Unknown collection member.  If I highlight the Fields Category, it shows a message of "Report Item not linked to a dataset".  

    So this is where I'm at, not understanding what I need to do to link the fields to the the subreport :(

    Wednesday, March 21, 2012 1:06 PM
  • Have you resolved this? I have the same problem !! thanks in advance
    Friday, November 16, 2012 11:24 PM
  • Bill Lu!

      Thanks for taking the time to read over my issue and respond.  In my picture, I wish I would have thought to expand my subreport parameters...but the subreport only has/is expecting one parameter.  I've been plugging away at it, and the problem seems to be with the value being passed into the subreport.  

    When I click on the drop-down list for the Value field, it shows me a list of all the fields I'm using in the main report, including PersonID, which is what I'm hoping to pass in.  I select it, but then if I click the Expression button next to the value field, when it shows Fields!Person_ID.Value, it shows it with a red squiggly line underneath it and says it's an Unknown collection member.  If I highlight the Fields Category, it shows a message of "Report Item not linked to a dataset".  

    So this is where I'm at, not understanding what I need to do to link the fields to the the subreport :(


    will u pl show the tablix properties of this CCS Student KOSSA Details rdl .
    Saturday, November 17, 2012 6:11 AM
  • I ended up abandoning the subreport idea and inserting a listbox on the field instead.  For the most part it works like I wanted the subreport to, the only difference is that it auomatically shows the detail on the main report instead of allowing the user to drill down to it.  Since it's not a lot of extra detail (3-5 lines at most), it works OK.  
    Monday, November 19, 2012 1:19 PM