locked
pass multi value parameter to sub report in Drill through report, ssrs RRS feed

  • Question

  • I have two reports 1 is subreport and other is main report. Date Field are placed in both reports. i have groups in main report, one group is task. In the task fields one persons is working in 3 project, two project are same company and 1 is for other and it give me count for each project. I want when i click on link it send multivalue parameter to subreport and it just show matching records.

    Asif Mehmood

    Friday, December 19, 2014 11:42 AM

Answers

  • As I understand what you need is to use LookupSet function. 

    Suppose if your dataset is like this (for simplicity I'm showing only required fields)

    PersonID    Project   Company
    --------------------------------
    ID1         P1        C1
    ID1         P2        C1
    ID1         P3        C2
    ID1         P4        C2
    ID1         P5        C3

    If you want to get the full project list for the person just send the PersonID alone and filter using it in the subreport. You can keep the project/company parameters optional in that case and put a default value. This would be the easiest thing.

    Now if you want pass the project parameter also you need to pass it like this

    =Join(LookupSet(Fields!Person.Value,Fields!Person.Value,Fields!Project.Value,"DatasetName"),",")

     This would act like a self lookup and return you full list of projects for the person and then you can use this to set the parameter value in the subreport.

    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Friday, December 19, 2014 1:40 PM