Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Subreport call with multiple @params, is it possible?? Expand / Collapse
Author
Message
Posted Tuesday, June 24, 2014 6:55 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 24, 2014 9:19 AM
Points: 150, Visits: 370
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

Post #1585725
Posted Tuesday, June 24, 2014 10:59 PM This worked for the OP Answer marked as solution
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Yesterday @ 11:45 PM
Points: 709, Visits: 4,520
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.
Post #1585738
Posted Wednesday, June 25, 2014 2:20 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 24, 2014 9:19 AM
Points: 150, Visits: 370
tx ,pietlinden

I got an idea, actually it work with subreport conept, so I'm fine now
Post #1586128
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse