Subreport call with multiple @params, is it possible??

  • Hi,

    I have ReportMain that serves as a driver and has 2 boxes or 2 subreports.

    One of them Report01 has multiple tablixes (and datasets for each of them), which produced by single sp but with different @TablixID parameter,

    And from ReportMain I can call Report01 only with single @TablixID parameter, so I'm kind of stuck. Is this any way to run my Report01 completely.

    Global task is to present single screen to user, then he selects @Year and Press Run, system should direct flow based on @Year, if < 2010 then run Report02 else run Report01, which based on legacy and new environments, so it completely different.

    Probably it can be done without subreports somehow??? Of is it possible at all?

    Appreciate your help.

    Mario

    This is sample of my sp I need to call to fill all tablixes, consequently I have 4 ds in my rdl, each of them do call to same sp_Report01 but with diff @TablixID.

    create sp_Repor01 (@TablixID)

    as

    if @TablixID = 100

    SELECT C1,C2,C3..... -- dsTablix01

    else

    if @TablixID = 200

    SELECT C1,C2,C3,C22 from t200 -- dsTablix02

    else

    if @TablixID = 300

    SELECT C1,C2 from t300 -- dsTablix03

    else

    if @TablixID = 400

    SELECT C1,C2,C3,C4,C5 FROM T500 -- dsTablix04

    end

  • Global task is to present single screen to user, then he selects @Year and Press Run, system should direct flow based on @Year, if < 2010 then run Report02 else run Report01, which based on legacy and new environments, so it completely different.

    I don't think you can choose which report gets run, but you can toggle the visibility of the subreports based on a parameter value. That part is simple. I would probably just use subreports in your case. Then you'd just create a linked subreport, and you would be all set. Just set the visibility property of the subreport to something like:

    =(Parameters!ShowSub.Value="A")

    In your case it would be something like:

    =(Parameters!Year.Value<2010) for one of the subreport's visibility properties and

    =(Parameters!Year.Value>=2010) for the other.

    the basic idea is that only one of them can be true at a time.

  • tx ,pietlinden

    I got an idea, actually it work with subreport conept, so I'm fine now

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

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