Subreport visibility based on field and parameters - reporting-services

I have a main page with many subreports but dependent on the client parameter I don't want all pages to show. I have a dataset 'params' that indicate if each subreprt should be visible fot the Client picked based on a 1 or 0 in the field of the name of the report.
I used the below but then had the error that I hadn't used an aggregate
=iif(Fields!ClientName.Value,"params") = Parameters!Client.Value and (Fields!Overview.Value,"params") = "1" , TRUE, FALSE
I added in First around the fields but then it will only look at the first Client in the params table. I just want the correct subreports to be visable based on the Client chosen in the parameter

Related

SSRS: Toggle Report via a parameter

I'm creating a single SSRS report that is composed of data drawn from different Datasets. What I'm wanting to do is have a drop down menu where the user selects the dataset they wish and have the appropriate table turn on and show them the dataset information.
Right now I'm testing with two tables and in there Visibility property I have the following expression:
=IIf(Parameters!AppSelection.Value = "STRAW", false, true)
The other table has the exact same line in the same place but with a different value between the quotes.
With my parameter, I created a new one and called it AppSelection and gave it 2 Available Values that matched the words between the quotes in my above expression. The data type for my parameter is Text and the Value of the each Available Value is left at null.
When I preview my report and select the different values in the parameter, nothing happens. What is it I'm doing wrong?
Change the null in the available values to your text, ie STRAW.
You may find that the tables show the other way round from expected, switch the true and false.

ssrs dril through to another report from matrix collapsed mode

I created a matrix report table with the option to drill down in that matrix with the + sign in both columns and rows.
The user can also click on any text-box in the matrix and it actions to a different report with parameters to view details.
Both tables are 1 report and 1 matrix table in different settings of hide/show groups.
In the right table I sent the number marked red is an example for drill through with parameters sales+mary, and aria1+product 2.
On the left, the drill through always sends with sales-david as parameter because he was first.
How can I drill-through with a parameter that represents the entire group of sales?
You should be able to use InScope("SalesPerson") or simialr to test the scope of the cell you click on. If it's inscope of the detail column group you can pass the actual SalesPerson to the drill down report, if not then pass some arbitrary value (say -1) and have you sub-report ignore SalesPerson if the parameter is -1
InScope("SalesPerson") will return true if the group is expanded or false if it's not.
You can read about InScope here
https://technet.microsoft.com/en-us/library/ms156490(v=sql.100).aspx

Subreport visibility

I have a list of subreports in an SSRS report which all have a parameter of Client_No based from their original report. I then only want the subreport to show if the Client No in a dataset 'Summary' has that particular subreport set to 1. The fields of those subreports whether 1 or 0 is bit so I'm not sure if that's the problem but at the moment if I add the following code, it hides this particular subreport even if its set to 1 or 0 when it should only be visible if set to 1 for that particular client and subreport. Basically, different clients only want to see certain subreports.
=IIf(Parameters!Client_No.Value = Fields!Client.Value,"Summary" AND fields!Output.Value,"Summary" = "1!, False, TRUE)
You can create a dataset that return records filtered by Client_No = 1. then in subreport visibility set show condition on number of rows.

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.

How to set hidden parameter in a subscription

We have an SSRS 2008 (not R2) report, which returns data for 2 different customer class types in a single datatable.
I have a request to have this report sent via email automatically to the user as an excel attachment. The user would like to have 2 worksheets in the spreadsheet. The first worksheet should have the result set including both customer class types and the second worksheet should only contain the result set for one of the 2 class types.
I am able to accomplish getting the 2 worksheets exported to excel, by adding a second data table to the report and setting the pagebreak property on the second table to start and to then set a filter on the second datatable, to only include the 1 class type the user wants.
I can then set up a subscription to automate this on schedule.
The issue that I have, is that I don't want 2 datatables to display when the user is executing the report on-demand via the SSRS web page. To accomplish this, I created a hidden boolean parameter which I use (in the expression) to set the value of the hidden property of the second datatable. This will allow me to hide the second datatable by default. I am expecting to be able to set the value to not hide when setting the parameters for the subscription. However, I can't seem to figure out how to set the value of this parameter in the Subscription. The parameters displayed in the subscription are the ones which are not hidden. This hidden parameter is not displayed in the subscription.
Is there a way to set the parameter values of either a hidden or internal parameter in a subscribtion? Optionally, if I can detect at runtime that the report is being executed by the subscription, then I can set the parameter value accordingly.????