Problems passing parameter to sub-report

  • Hello everyone, I am having some issues passing a parameter down to a subreport. I have a subreport that is passed multiple parameters from the parent report. The parent report has parameters to allow users to filter by "Owner," in addition to filtering by "Category." These are both required parameters, the parent report uses them for the stored procedure to return its dataset. The user is then able to drill through to the sub report for more detailed information when clicking on a aggregated count number in a table. The problem I am having is that the subreport only accepts the Owner parameter when certain categories are selected in the parent parameter, otherwise it's returning all Owners in the subreport. Particularly, if the "Not Available" Category is selected in the parent report, the subreport returns records with all the owners, ignoring the Owner parameter specified in the parent report. Does anyone know where I can begin looking for a solution to this problem?

  • If I understand it correctly if the subreport is returning more than you want.

    Seems like you need to construct the sub report to accept a parameter to restrict the data. There will be no implicit restriciton of data by simply making it a subreport.

  • This sounds like it may either be a problem in the sub report and how it handles the parameters or the way the parent report is passing in the parameters. First thing I would do is check the parent report and how it is calling the sub report. What parameters are being passed down and if there is any special functions being applied to the parameter.

    Next, I'd check the sub report to see if there are special cases where certain parameter values causes the data set to return differently. It may simply be a some logic in the underlying data set where if Category = 'Not Available', then select all owners.

  • Thank you, the problem was the result of both! (the parameters not being passed correctly, as well as expressions in the subreport to return all when none were selected)

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

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