I want to create a single rectangle on a report that displays red if there are more then 2 distinct projects being worked on within that week (see image below):
http://imgur.com/dPHW1TT
I'd need to write some kind of expression like IIF(CountDistinct(Fields!Project_Name.Value)> 1, "Red","White") but the issue is that I need the projects to be aggregated per user.
As you can see in the above report I have it grouped on User >> Project, and thats what I'd need to captcher in this single expression.
Is there any way to specify a group in an expression?
I've actually managed to do what I wanted via filtering on the tables group, and then hiding all the cells bar one in the table.
http://imgur.com/G8IKMbS
Although if anyone knows a way to group within an expression I would still be interested in knowing.
Thanks
Related
New to SSRS, we asked me to create a simple report on SSRS, linked to a Sharepoint List.
The Report consists of a tablix with two columns: Client and the number of orders they passed.
The first column is only containing the sharepoint field "Client Name", and the report generate automatically a list of Clients based on the content of the Sharepoint List. The Column is also used as a group by to the Tablix, to group the results by Client Name.
My second column is an expression :
=Count(Fields!ID.Value, "Client")
The column is working nearly accordingly to my willing : the report displays the number of orders by client in the list, but... When a client has more than one order, the count is displayed the same number of times.
How can i prevent that? I tried a Running Value solution, or only count.. But if the results are not the right one, the same problem is occuring : The report tablix have as much rows than elements list.
Picture for helping, because my english is far for perfect.
Image of the multiples rows
You can set client column in group expression in Details section. Check below screen shot, It will help you.
I currently building one report in which the same data has to be repeated on multiple pages.
- So, I have a field (Quantity) based on which I have to decide the times' data has to be displayed. For example, if the quantity is 5, the report has to print 5 pages with each page printing the same data. This is usually used when we print Shipment labels.
Is it possible to achive this in SSRS. Grouping would have solved my issue but since the value that I have is a scalar, I am not sure if it is possible.
Any inputs/Suggestions.
You can repeat contents on multiple pages by placing it all inside a grouped cell. See my answer here for more detailed instructions on that. For this particular case, you would want to have a column in your dataset that has the desired quantity.
One way to do this would be to cross join your query with a subquery that has your desired quantity. Then you can group by the new column and get the same data within every instance of it.
The goal is to take the data shown in the "SQL rows returned" portion of the image and display it in the "How report should look" portion of the image. It's currently being done using a sub-report that takes titleID, languageID, beginDate, and endDate as a parameters from the main report. However, it's really slow to run when a significant number or records are returned. My question is "Is there a more efficient way to accomplish the same thing in the main report w/o using a subreport?" If more information is needed to properly assess this problem, I'll be glad to add it tomorrow. Thank you!
Purely looking at the image.. all you need to do is put a tablix on your main report add a parent group of title_id..
Then delete the column that is created to the left (but NOT the group)
Right click on the detailed group -> insert row outside group. This will create a row inside the Title_id group but Outside the detail group.
In this line.. add the title ID, name etc.
The detail lines will show the details.. obviously.. You need to play around a bit to figure out the rest of it..
It looks to be a fairly straight forward report.. not sure why you need to use a subreport for this
Hi I am new to SSRS and I created a form. I also added a couple of column based on expressions. I was trying to sort the table on the basis of an expression column but the option is not available in cell properties - interactive sorting. Can anyone please guide me on how to achieve it. Thanks.
You have two ways of solving this that I can think of. You can either:
Move your calculated columns to your Dataset
When you add a dataset to a report, on the Fields tab you have the option to add Calculated Fields. If you add your expression column here, you will be able to use it in the Sort tab of your Tablix just as you would a normal column.
OR
Repeat the expression in the Sort property.
If you are not able to create your calculated field on your dataset (perhaps if you reference other datasets or do something out of scope), then you will need to duplicate your expression in the Sort tab of your Tablix. (To access this, click anywhere on your table and then right-click on the small grey square in the top left-hand corner of your table).
If you click Add for a new Sort condition and hit the fx button, you can paste the same expression you used for your column into here and use it to sort your dataset.
The downside of this is that you're replicating your logic and potentially duplicating work.
To enable the interactive shorting in a table you need to have a row group. So by this you can sort the whole table or only a portion of the table.
Say in your case you need to sort the table basis of some expression. For an example you need have an interactive sort based on the values. In the below screenshot I have 2 groups i.e. Customer and Project and I want to have an interactive sort based on the revenue.
Now right click on the Revenue and go to the 'Textbox' properties and select the group and sort by. Here in the screenshot I will sorting based on the total revenue for different Customers.
Now after running the report if you click on the Revenue column it will sort accordingly.
Let me know if this is what you are looking for.
I have an SSRS report that is currently pulling a single dataset. This dataset contains records of inventory we have. Each record is a separate asset.
I want my report to group by a certain field, and then subgroup by certain criteria that are determined with a couple different fields. Basically there is one parent group, and three adjacent subgroups. My grouping functionality is working correctly, however I am finding it difficult to add totals to each of the adjacent subgroups. When I add a total, it is totaling the specific field within the scope of the entire dataset, instead of limiting the total to just that subgroup.
How can I add totals per field within subgroup?
EDIT: Added sample data and explanation:
You can ignore the function code field, that is what I am using to group on the parent group.
asset number,description,first year,acquisition cost,function code
190,random asset,2008,5000,100
193,random asset45,2008,56000,100
197,random asset26,2014,3000,100
191,random asset27,2014,7000,100
192,random asset36,2013,15000,100
I can't seem to attach screenshots, so here goes..
In the report you can see three subgroups; Assets, AssetAdditions, AssetDeletions. In the tablix, you can see where these groups are positioned. You can also see a row directly beneath the group that is supposed to total the subgroup at the end. However, for some reason the scope is only taking into account the entire dataset. I have tried to modify the expression in the Sum function [Sum(acq_cost), "Assets"], adding in the scope parameter but then it does not allow me to even run the report. It yells at me saying that "Assets" is an invalid scope.
The easiest way I have done this in 2012 VS is to have it return as part of the data set and have it sum up the value.
For instance if you have a quantity for inventory, and you have a subset where you only want the total quantity for that set, you add another column to your dataset called TotalSetQuantity and the subtotal field will have the expression =SUM(Fields!TotalSetQuantity.Value) rather than =SUM(Fields!Quantity.Value).
You can try iif statements within your report like =sum(iif(Fields!ColA.Value=1,Fields!Quantity.Value,0) but I had some troubles getting that to work.
Hope that helps, I ran into this issue this past week and the first option worked like a charm for me.