I have a report with one subreport. The subreport is passed a variable, #staffid, to match against a table of employees. If there is no matching staffid, I need the parameter value (#staffid) to display in the subreport. I need to check to see if DisplayName exists for the subreport, and if not, show #staffid in textbox that would ordinarily show DisplayName if there were a match.
Below is a screenshot of the report output right now, but I need to fill in the empty user space with the value passed from the main report if there is no match.
I'm looking for an expression to use in the textbox that basically says, =IIF(ISNULL(Field.DisplayName.Value)),#staffid,Field.DisplayName.Value), but I can't find a combination that works.
Please pass "Parameteres!staffid.value" instead of "#staffid" in sub-report expression as #staffid is a parameter defined in sub-report
Related
In SSRS, I have a summary report, and when I click on any figures, it drills through a subreport that generate a list of skus.
I have setup the cells in the summary report and selected all Parameter for the drill through report.
For a multi-value parameter in the subreport, I want to manually select 2 out of 3 available values.
In the textbox property, under Action and parameters, What is the expression to specify the values I want to pass to my subreport?
1,2 - If your parameter is a integer. Don't use the expression with an equals sign, just 1,2 in the parameter value.
If your parameter is a string, I believe you need to double the double quotes.
""1"",""2""
You could also use the SPLIT function to create a string array from the hard-coded values:
=Split("1,2", ",")
Neither formula worked, but at the end, I just modified the list of available value on the subreport and added another value. Then, in the dataset query, I adjusted the WHERE clause so that when the paramater has said value, the field IN ("1","2")
I have one report with columnName called as 'referenceName'. Two rows get displayed on this report with two different values for 'referenceName' column.
When I am click on the first/second value in the 'referenceName' column only first value gets passed to the next drill through report. Why?
Reason for this error was that I was passing the value of the parameter instead of name of the parameter. so, I was passing '#ReferenceName' instead of [ReferenceName].
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.
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.
I have a multi value parameter I get from a query. I pass it to my dataset and it works like a champ. The dataset parameter uses join, i.e., =JOIN(Parameters!CodeList.Value,",").
So far so good. However when I pass this to a subreport, the subreport seems to only "get" the first item in the list instead of the string.
Also, if I put a textbox on my main report that looks at the CodeList parameter, i.e., =Parameters!CodeList.Value(0), I just see the first item. Using JOIN here returns an error.
I clearly don't get something here. Any available illumination?:)
How about this ?
=Parameters!CodeList.Value(0) gives you the first selected parameter value
=Parameters!CodeList.Value(1) gives you the second selected parameter value
so on
&
Join(Parameters!CodeList.Value,",")
will give you the all selected value for the parameter seperated by ,
Condition is, parameter should exists lol'z.
Assuming that you want it to behave identically to your dataset in this report (I.E. you want to send a string containing all the values in your parameter separated by a comma), you just need to pass the same thing to the SubReport's parameter:
=JOIN(Parameters!CodeList.Value,",")
If what you actually want is for the Parameter in your SubReport to have the same values as the Parameter in your main report, you need to pass:
=Parameters!CodeList.Value
Note the absence of the (0) at the end. The (0) on the end of it will cause it to pass only the first value in the parameter which isn't what you're after.