Arrange Columns in SSRS Matrix by Label by Percent - reporting-services

I have a dataset like in the image below. I have used a Matrix in SSRS to unpivot the data.
What I have is like in the second image below. You will notice that percentage columns are at the far right. But what customers want is the name of a product followed by it percentage as seen in the last image. How do I accomplish this?

Add a blank tablix to your report, drag the agent field into it and go to row groups and add a group. Group it by the field agent. Now add next to the agent field in the tablix your phone field and afterwards the percentage field. Now your data is grouped by agents like in your image and the fields are were you placed them.

Related

Put Group header above group instead of beside it in SSRS

I have a report group that currently looks like the image. It has row groups as follows:
It grouped in order like this:
Department
Agent
Year
Month
I have removed the columns with department and agent and year. I would like to put the agent and department above the column headers which repeat on each page along with the agent. I tried putting a row above the headers but you can't merge cells when adding a row above there and agent + department is very long. What I want is shown in 2nd image..I put the expression in a text box in the page header but it just repeats the first value on each page and not the actual value.
How to do? I want it above and not beside to save horizontal space.
Check these previous answers of mine. If they don't help, post the report design including group properties and I'll see what I can do.
Grouping in SSRS?
Repeat Row group on top of table as table headers between every groups in SSRS

Filter in TextBox Expression SSRS

I have 5 visualizations in my rdl file. After each visualization I have a ABOUT Textbox which should be filled from a database table and it has html content to render.
Consider a table with 5 rows having visualization name and ABOUT Text.
<table><tr><th>visualization Name</th><th>About Text</th><th></th><th></th><th></th></tr><tr><td>Visualization1</td><td><B>Table1</B></td><td></td><td></td><td></td></tr><tr><td>Visualization2</td><td><I>Table2</I></td><td></td><td></td><td></td></tr><tr><td>Visualization3</td><td><B>Chart1</B></td><td></td><td></td><td></td></tr><tr><td>Visualization4</td><td><I>Chart2</I></td><td></td><td></td><td></td></tr><tr><td>Visualization5</td><td><B>PieChart1</B></td><td></td><td></td><td></td></tr></table>
I have created a DataSet which would pull all 5 rows along with 2 columns. And I want to link each row's AboutText field to each TextBox of individual visualization. Of course I'll have to use filters. But there is no option for adding filters in TextBox expression. And I don't want to create 5 separate DataSets for just rendering purpose.
How would I achieve this in SSRS 2016?
Create a tablix and put your visualisation in one row and your About Text in the next row as a child group. Set the child groups visibility to be toggled on the parent group and your will be able to expand and collapse the About Text row by clicking on a little + icon that will appear next to your Visualisation.
There are a few ways you could do this. One option is to add an ID column to your dataset. Then in each textbox you can use the Lookup function to get the appropriate label. Another option is to insert a table with one cell next to each visualization. You can use the Filter property on the table to control which label is shown.

matrix display only first value of a field

i have the below matrix in report builder 3.0:
the field "Market Company Name" could have multiple values, however when i generate the report only the first value is displayed, while it should display each value on a row.
i tried to put it in the row group or column group it will display properly but the position of the field is not where i want it, i want it in this format.
can any one assist??
If the data are displayed correctly when you use row grouping you can set the width of this column to 0. This way you keep the grouping but the column as such will not be visible.

SSRS Matrix banded rows

I'm looking to do banded rows in SSRS.
I've Googled it but only seen examples of it in a table Report not a tablix with multiple groupings.
Lets say I have a dataset
Employee..............Product.........Date...............Amount
Jose..................TV..............2013-12-01.........150
Jose..................TV..............2013-12-02.........100
Jose..................Stereo..........2013-12-01.........50
Jose..................Stereo..........2013-12-04.........100
Jose..................Camera..........2013-12-02.........400
Brad..................TV..............2013-12-03.........100
Brad..................TV..............2013-12-04.........50
Brad..................Stereo..........2013-12-03.........100
Hector................Stereo..........2013-12-04.........50
I want to make a report that looks like
Employee.......Product.......2013-12-01....2013-12-02....2013-12-03....2013-12-04
Brad...........Stereo....................................100
...............TV........................................100............50
Hector.........Stereo...................................................50
Jose...........Camera......................400............................
...............Stereo........50.........................................100
...............TV............150...........100
I wanted to do banded rows.
Let's say
Brad's Stereo line is Blue
Brad's TV line is Green
Hector's Stereo line is blue
Jose's Camera Line is Green
Jose's Stereo Line is Blue
Jose's TV line is Green
The rownumber trick doesn't work because the rows come no particular order
and in the case of Jose's stereo line, the cell under 2013-12-01 and 2013-12-04 would have different values.
I saw a trick using running values and count distinct, but that won't work either.
Anyone have any ideas how to do banded rows in SSRS using a matrix/tablix?
I'm assuming you are starting with a matrix that looks like the image below: two row groups and one column group.
Right click on the row group for Product and choose Add Group -> Child Group. In the Group By box enter "1".
Rename the group to RowColorGroup. Rename the textbox (in the details row to the right of textbox contining the product field) to RowColorGroupTextBox.
Select the value for RowColorGroupTextBox by entering the following as the Value expression: =iif(RunningValue(Fields!Employee.Value & Fields!Product.Value,CountDistinct,Nothing) Mod 2, "LightSteelBlue", "White") (You can change the colors to whatever you want.)
In the textbox properties for RowColorGroupTextBox change the fill color expression to =Value
Remove any text in the header field above RowColorGroupTextBox.
Remove the right border on the textboxes in the column containing RowColorGroupTextBox.
Remove the left border on the textboxes containing the date field and the amount field.
Set the width of the RowColorGroupTextBox to 0 and the CanGrow property to false.
Select the textbox containing the amount fill and set the fill color expression to =ReportItems!RowColorGroupTextbox.Value
This results in a report where the details rows alternate in colors.
Here's a blog post I found that uses the same method.

How do I make a column in a report wrap and/or break in multi-column report?

I have a report where I've specified the Columns property to 3.
I want the data I have from a single query to spread across these columns.
When I print the report however, I just get a single column that spans across multiple pages till the rows run out of data.
How do I tell rs that I want the data to wrap into the next two columns?
UPDATE: Ok, found a link on technet to give me a better explanation of multicolumns (e.g. newsletter style):
Multicolumn, newsletter-style reports
display report data down multiple
adjacent columns. A newsletter-style
layout applies to the entire report.
When you define more than one column
in a report, Report Designer
calculates the width of the columns in
the report, the width of the report,
and the width of the space between
columns based on the number of
columns. It then displays a reduced
design surface so that you can place
report items on the report that will
fit within the column. Note that the
layout of the entire report must be
placed on the reduced design surface.
Additional columns are displayed so
that you can verify that the number of
columns you defined will fit the page
size dimension. You can adjust page
size, padding, and margins to fit more
columns on the page.
Only PDF and Image renderers support
newsletter-style reports.
I still haven't quite figured out how to make the column wrap...but I'll look into it further on Monday.
I addressed my issue by:
Putting 3 Tablix in my SubReport
Adding a Count Aggregate in my SQL results
Doing % calculations in the Tablix filters
For example, Tablix one has a filter formula like this:
=IIF(Fields!MaxRowNumber.Value <= 10, 10, Fields!MaxRowNumber.Value * .4)
So, if only ten rows are returned, display those ten rows in column 1. If more than ten rows appear, then put 40% of the results in Tablix 1.
I do similar calculations for Tablix 2 and 3 to display the 30% in each Tablix respectively.
Feels like a bit of a hack...but it works.
So one approach is to use multiple tablix with a filter that checks RowNumber and accordingly displays particular records in each table.
The other way is called Newsletter-style report (link). This formatting is retained only when report is exported as PDF or Image. It can be previewed only when you select 'Print Layout' on the Preview tab in Visual Studio. Here is an example:
Create a new report with the foll. dataset: SELECT ID,NAME FROM TABLENAME
Add a new table to the report and select the ID and Name as columns
Click on the tablix and press F4 to edit the tablix properties. In the properties window, change the Size - set the width to 2in
Click on the report area outside the report page boundary and press F4 to edit the report properties. In the properties window, change the Column value to 3, and column spacing value to 0.1
On the report scroll to the right hand side, you will notice that there are 2 new columns (so totally 3 columns on the report - because you selected 3 in step 4 above). Now click on the margin at the start of the column 2 and pull it further to the left to bring it as close to the column 1. This is only to reduce the need for huge page size.
Right click on the report area outside the report page boundary and select Report Properties. Change the Page Size - Set the width to 10in
Preview the report. Now select the 'Print Layout' tab to see the result. This formatting is retained only when report is exported as PDF or Image.
As noted in points 5 and 6 - since the report body flows into multiple columns, you must ensure that the page size is at-least equal to -> ([Original report body size times the number of columns] + all the column spacing values). Otherwise it will look messy.