Switching an SSRS Report Based on Parameter(s) Selected - reporting-services

I have two reports that are more or less very different from each other and yet have the same parameter list. The requirement is that these report should be in the same solution and users should be able to switch from one report to the other base on the condition of the Boolean parameter selected. Now I have an expression written but where it should go in the report body is where I don't know.
My expression:
=Switch(Parameters!Tax.Value = True,"Tax Todate Summary",Parameters!Tax.Value = False,"Line of Action(s)")

I would build a "Navigation Report". This would have the same parameter list, including that Boolean parameter.
The body of the report would contain two Subreport objects, for the two actual reports. I would lay these out one above the other. They would be the only objects on the Design pane of this report.
I would set the Visibility property of each Subreport object based on the Boolean parameter. I would pass all the other parameter values through to each Subreport.

Related

Issues with Passing Multi-value Parameters to a Drill through Report

I have two reports were I pass multi-valued parameters to it's underlining data and both reports work very well independently. The parameter strings are being split using the function dbo.UTILfn_Split. When trying to drill from the main or Summary report into the sub or Detailed report all other parameters field in the report are populated except the multivalued parameter field. The parameter lists or value are listed in the detailed report but not selected and therefore cannot run the report even though the detailed report parameter property is set to allow multiple values. In both reports, the where clause is set "IN" not "=." How do I fix this?
In your Summary Report, when you pass the parameter to the sub or detailled report, the passed value parameter should be like this expression:
=join(parameters!yourMultivaluedParameter.Value,",")
after that, you pass the name of the parameter to the corresponding parameter in the dataset Detailled report.
In your SQL (SP), get the multivalues of the parameter by spliting it with your function
like following, depending of the result of your function, for exemple:
INNER JOIN dbo.SplitFunction( #yourMultivaluedParameter,',') tmp on tmp.yourColumn = ...etc...
Hope it helps...

Passing multi-value string consisting of TFS area paths to subreport in SSRS

I'm having a problem with passing mulit-value argument to subreport. We have a report that is generating data from Team Foundation Server about velocity, burndown, bugs etc. The main report is pointing to a few subreports (for each team) were this measures are being done. On that 'Team' subreports we have next subreport for generating data for Bugs and with this I have problem (I'm getting subreport errors).
To calculate values that we want, we're passing an TFS AreaPath for this Bug subreport from main report level (it's a simple string eg. [Work Item].[Area Hierarchy].[Area2].&[-8426352345429395890]&[-7702890005762484781]) and it's working ok. Now on, we want to pass multi values so that Bug subreport will count Bugs for two or more Area Paths. Bug subreport is ready for that as when I generate it standalone I can choose more than one Area and it's counting and showing data properly. The only thing I have now is a problem how to pass multi-value string to this sub report so that it work properly.
We have something like this:
Main Report -> 'Team' Subreport -> Bugs Subreport
On Main Report:
Parameter 'BugAreaParam' with string [Work Item].[Area Hierarchy].[Area2].&[-8426352345429395890]&[-7702890005762484781] as value passed to 'Team' Subreport.
On 'Team' Subreport:
Parameter 'WorkItemAreaPath' passed to 'Bugs' subreport with value from BugAreaParam set as an expression: =Parameters!BugAreaParam.Value
On Bugs Subreport:
Parameter 'WorkItemAreaPath' that is taking value and generates data. It is a multi-value and when I generate it as standalone report I can pick multi-value to generate data.
The question is, how to properly set parameter 'BugAreaParam' on Main report so that it pass two or more values eg. [Work Item].[Area Hierarchy].[Area2].&[-8426352345429395890]&[-7702890005762484781] and [Work Item].[Area Hierarchy].[Area2].&[-55555]&[-44444] and Bugs subreport will generate Bugs from this two Areas?
Thanks you very much for any help!
BR,
Damian
You could try Edwin's solution in this case:
Make sure that the parameter in the subreport is set to allow
multiple values.
Make sure you are passing the parameter from the main report to the
subreport as [#paramName] and not "=Parameters!ParamName.Value(0)"
as this indicates to retrieve only the first value.
Set the subreport parameter to visible and ensure manually
selecting/inputting multiple values returns appropriate results.
If all else fails, try using a formula like this
=Split(join(Parameters!ParamName.Value,","),",") which creates a comma separated list of the parameter values and then splits it out
into an array.

Using column from main dataset as multi-value parameter in subreport

Hi I am using SSRS 2008.
My set up is MainReport with dataset1 and 1 parameter - OrderID. One of the columns in dataset1 is ShippingID.
My other report called - SubReport has 1 multivalue paramter - ShippingID.
I am trying to use ShippingID from Main report as multi-value parameter for Subreport.
I tried different threads here but mostly they are diffrent than my scenario.
How do I go about setting this up, is that even possible?
I have been trying to set it up for whole day but unsuccessfully.
In my scenario one Order can be on multiple shipments.
One of the things I tried is creating new multi-value parameter in MainReport - call it shippingIDs_sub and mapping its default value to dataset1.ShippingID. But when I try to run report I get error "The 'shippingIDs_sub' parameter is missing value" - because my MainReport would sometimes return NULL in ShippingID column.
My scenario is very much similar to this
SSRS passing parameter to subreport
although I sometimes get NULLs in the column used as source for multi-value parameter.
Is there any way to filter out NULLs and run subreport only for existing IDs?
In the Action where you call the sub-report, where you map to shippingIDs_sub, use an expression to pass some valid value whenever the value in your dataset is NULL.
=IIF(IsNothing(Fields!ShippingID.value),"Some Valid Value",Fields!ShippingID.value)
As to this:
Is there any way to filter out NULLs and run subreport only for
existing IDs?
No, you can't turn off the ability to go to a subreport, but you can "hide" it by changing the appearance of whatever your user clicks on so that it doesn't look like it's clickable. For example, in our reports, when something is clickable, we make it underlined in blue. So if I don't want to user to click it, I just make it the same font color/style as all the other text. But it doesn't stop a determined user from clicking on it anyway if they want.

SSRS 2012 Parameter settings

I am creating a report with columns say A,B,C,D,E. I am setting up a drill down on the column A that fetches one more report with Columns
G,H,I,J. The values for the columns G,H,I are from taken the columns A B C. For the column J,I need to pass a parameter explicitly(not from the source report). I set that parameter in
the properties section -> Available Values and mentioned the values. I ran the main report and get the following error
The Parameter J is a missing value
I am pretty much new to the SSRS projects and would be great if I could any assistance on this
It sounds like you are putting parameter J in the wrong place. It doesn't go in the Parameters collection for the main report but in the parameters that are passed to the sub-report.
Right-click the cell with the drill-down and select Text Box Properties.... Choose Action from the left-hand menu and it will show the drill-down report. Under this it says Use these parameters to run the report:
Add the parameters of the sub-report and the values you are passing. You can use an expression to provide the value for parameter J.

Passing values for multi-value parameter in SSRS query string

I have two reports built using SSRS 2005. The first report is set to navigate to the second when a specific field is clicked.
There is a multi-value parameter on the second report. I need to pass multiple values for this parameter in the "Jump to Report" string when calling this report. Is there a way to pass multiple values? I have tried Field.Value but that doesn't work for multivalue, it wants Field.Value(0). Or can you pass a parameter that will cause the Select All value to be selected?
I figured it out. Looks like one of the parameters being passed in was Field.Value(0) instead of Field.Value. That was messing things up.