SSRS Column Visibility for selected IDs - reporting-services

I have a report with the column "Order-C Amount". But only a few selected employees are allowed to see this column. When the employees open the report, they always can only see their own data.
How do I set the expression on the column visibility?
I tried something like =NOT(Field!ID.value = "12345") OR NOT(Field!ID.value ="123456").
With only one condition it works just fine. With more than one, the column just stays invisible for everyone.
Thanks in advance.

=NOT(Field!ID.value = "12345" OR Field!ID.value ="123456")

Related

row labels are missing on new page RDLC reports

I have RDLC report on which I have multiple rows for every employee, I hides employee names after 1st row, right!
Now I have a issue when same employee's rows goes to next page it shows widowed records (without employee name).
To hide employee name on next rows I am using this code:
=IIF(Fields!Name.Value <> Previous(Fields!Name.Value), Fields!Name.Value, nothing)
I also tried adding new group, and got rank from stored procedure, but nothing helps.
Is there any way to get that if the row is 1st row of page?
Or any other way to achieve the same?
Thanks in advance
Finally I Resolved this issue by 1st adding group on top level with this formula
=CEILING(RowNumber(Nothing)/50)
and in the text box this group returns me row number according to each page, So,I updated my formula for text box to:
=IIF(Fields!Name.Value <> Previous(Fields!Name.Value) OR RowNumber("PageRowGroup")=1, Fields!Name.Value, nothing)

Brining row where column valus is null

I have a store procedure which brings the data as shown below . I'm new to SSRS reporting, I would like to show only those row where "email" column is null. How can i achieve it in SSRS ? As i mentioned I'm very new to this , any screenshot will help me a lot. Thank you for your time.
For this problem, you'll want to change the row visibility to hide rows with a value in that column. I assume you're using a table or matrix to layout this data. You'll want to right click on the row where your data fields are entered. Specifically, the grey box at the left of the row.
From there, you'll need to select the option to Show or hide based on an expression.
And finally, you'll need to enter an expression that finds the values in the email field. I'm not exactly sure what the field names are called but something like the following expression should do it.
= Not IsNothing(Fields!EmailField.Value)
This will check the field where you get the email value with a built-in function of IsNothing. Additionally, since you want fields that do not contain values, the Not keyword reverses the results. If the function evaluates to true and a value is present, the row will be hidden and vice versa.

SSRS Multi Value Parameter. Check whether "Select All" is selected

I have a multi value parameter in my SSRS Report. I want to find out whether (Select All) is checked in that parameter.
In other words, whether all the values in the parameter are checked or only some values are checked.
Is it possible?
I am able to find out number of selected values through Parameters!Parameter.Count. Is there a way to find out total of items in that parameter?
In case anyone is still having issues doing this, I just coded this easy fix.
=IIF(COUNTROWS("dataset").Equals(Parameters!parameter.Count),"it is equal","this is not equal")
For the specific use-case of showing the selected filter on your report in a textbox, here's the expression that will show "All" if "(Select All)" is selected, otherwise it will show all the selected values as a comma-separated list:
=IIF(
Parameters!YourMultivalueParam.Count = countrows("YourDataset"),
"All",
Join(Parameters!YourMultivalueParam.Label,", ")
)
(split onto multiple lines for readability)
countrows reference: https://technet.microsoft.com/en-us/library/dd255215.aspx
Credit to other answers, just want to extend them for this common scenario.
Your approach sounds good: I would make the options for the parameter come from a dataset.
Then you can use =COUNTROWS("DataSetName") to return the total number of options for your parameter and compare this with Parameters!*Parameter*.Count as you suggest.
I also faced this problem and I solved it this way.
I have one multivalued parameter named "Carrier". Then I have added one parameter "CarrierHidden" which is same as "Carrier" only thing is I made its Visibility as Hidden.
="Carrier=" & Switch(Parameters!CarrierHidden.Count = Parameters!Carrier.Count, "All",
Parameters!Carrier.Count > 1 And Parameters!CarrierHidden.Count > Parameters!Carrier.Count, "Multi",
Parameters!Carrier.Count = 1, Parameters!Carrier.Label(0))
The easy way will be to count the number of the selected parameters and compare them to the dataset
=IIF(Parameters!company_number.Count = CountRows("Dataset1"), True, False)
The problem is if you're trying to pull something for another data set then cross referencing the row count in another dataset won't work. You will have to go with what the previous post states. Create an internal parameter of the exact type and assign the default value to the entire dataset. That way you have the max count of the rows since the hidden parameter.count = rowscount. That way you can use it within another dataset also provided that dataset is AFTER the first one is populated.
According to Microsoft's SSRS help search:
=Parameters!<ParameterName>.Count
Returns the integer value 1. For a single-value parameter, the count is always 1.
I verified this does indeed work, check the integer returned for the built-in parameter count field.
Allow multiple values on a parameter selection. Checking the value of the above field will let you know how many values the user actually chose.
In my situation, I allow multiple values on company number. This gives users the ability to choose one company to report on or several at once. Per client request, if they choose more than one, display data horizontally. If only one company is chosen in the parameter list, show the data vertically and hide the other tablix.
So my visibility show or hide expression looks like this in the one tablix:
=IIF(Parameters!company_number.Count > 1, True, False)
and like this in the other:
=IIF(Parameters!company_number.Count = 1,True,False)

Access combobox value

I have a combobox, and a button, that makes runs a query with the values it gets from combobox, but it does not seem to get the right value.
I tried using
[Forms]![Kooli otsing]![Combobox]
or
[Forms]![Kooli otsing]![Combobox].[Text]
the query did not work, it seems like it does not get the value from combobox. because it worked with normal TextBox.
I ADDED EXPLAINING PICTURE!!!!!
ADDED PICTURE OF VBA EDITOR
ADDED PICTURE OF ERROR AND NO COMMENT AUTOCOMPLETE
Based on the latest comments you posted on your question, you want to use:
[Forms]![Kooli otsing]![Combo19].Column(1)
Here's why. You said you have the following settings for your combobox:
column count: 2
bound column : 1
row source type : table/query
row source: SELECT [Haridusasutused].[ID], [Haridusasutused].[Nimetus] FROM Haridusasutused;
Column count of 2 is telling Access to use the first two columns from your rowsource (the only two columns in this case). Bound column is telling access that the default value of the combobox should be the first column of the row source. In this case, that would be [Haridusasutused].[ID]. Often ID columns are autonumber fields.
The reason you were having problems is that [Forms]![Kooli otsing]![Combo19] was returning data from the ID column (most likely a number) not "Elva Gümnaasium". By adding the .Column(1) you are telling Access to choose the data from the second column (.Column is a zero-based array) of the rowsource, ie, "Elva Gümnaasium".
EDIT: Alternatively, you can change the bound column from 1 to 2 and leave the rest alone (ie, you won't need the .Column(1) part at all).
This works in my application:
[Forms]![Hour-registration]![mwkselect]
^form ^combobox
Maybe try this to refresh:
Me.Requery
Me.Refresh
Have you tried to step through debugger and search for the value through the watch window? For instance put a breakpoint into a button click event, then add [Forms] to the watch window and look into it.
You can use:
[Forms]![Form1]![Combo1].[Text]

Suppress the duplicate values in group, SSRS Reports

I have an SSRS report
where the date should be grouped by project category
the project code in the category is repeating in side the group how do I suppress the value
Please help me to get an idea.
Thanks,brijit
You can also hide fields by putting an expression in the Hidden property like this:
=Fields!ProductCode.Value = Previous(Fields!ProductCode.Value)
So if the value in the previous record is the same as this one, it will hide the field. You must sort the dataset correctly for this to work. In your case I think the sorting would be Date, ProductCategory, ProductCode.
In the past I used this often together with expressions for field borders to group the output visually.
I think there is one option hide duplicates in properties in ssrs. so you will check in that option under the project category group.so that you can hide the duplicate values and get unique records. first u create one group based on project category in fields properties and then check in that hide duplicate option under that group.whenever you check in that option it will high light one drop down list showing containing group or dataset there you select your created group.
This is a bit late for you brijt, but what I do is edit the textbox properties for that field, in the font tab enter an expression for Color as follows:
=IIf(Fields!ProductCode.Value = Previous(Fields!ProductCode.Value), "White", "Black")
...assuming your background is white this will effectively do what you want.
I think it may be an issue concerning the way you are grouping the dates. Do you have the grouped with time on them as well but suppressing the hours in your output?
For example:
12-5-2010 12:00:00
12-5-2010 13:00:00
if you strip the times off in how you see them but not how you group them, they would show up duped.