SSRS table with inside borders only - possible? - reporting-services

I want to add to a SSRS (RDLC) report in Visual Studio 2013 a table object (Tablix) that would have borders only inside the table (between rows only, I need no border between columns), but no outside borders, like in Excel does this button:

I have specified the Bottom BorderStyle of an element that was inside the Tablix column with following expression:
=IIF((RowNumber(Nothing) Mod 2)=1, "Dotted", "None")
given the fact that I have allways exactly 2 rows per page inside the Tablix.
I guess that universal formula would look something like this:
=IIF((RowNumber(Nothing) Mod numberOfRowsPerPage)=numberOfRowsPerPage-1, "Dotted", "None")
It should remove the last border line on the page. Though this solution needs to have fixed number of rows per page in the table.

Related

SSRS dynamically shift columns on hide/show toggle

I'm using Microsoft Visual Studio 2017 to build an SSRS 2016 report. Is there a way to dynamically shift the columns in a table when you toggle with multiple groupings? I know I can change the visibility with a combination of the "InitialToggleState" and "ToggleItem" properties. However, doing this just leaves empty white space on the report and doesn't shift the columns.
Here is my current report:
and what it looks like when expanded:
Here is what I would like it to look like on load:
and what I would like it to look like when expanded:
Edit: To add further detail, field1-5 should only be shown when the parent has been toggled. When field1 below is collapsed, I would expect it to look like the image above again (field2 hidden).
Edit2: Would prefer not to add column groupings as suggested below as the data would then span across the headers. Some of my fields could return up to 8 values, I don't want to have 8 column headers in a grouping.

SSRS 2005 Report layout displaying on Report Server differently than in VS preview

I created a simple SSRS 2005 report. It is a table with 2 columns. When I preview the report it looks great. I put it on the Report Server (Report Manager) and when it is displayed the width of the columns of the table are only as wide as the widest value. I want the column widths to be a fixed width. I also want the rows to have alternating colors. On the Report Server, only the 2nd column has the coloring.
I have tried setting the table column attribute 'CanGrow' to true. But the table is only as wide as the data. The column widths are set to 3.09167in and 3.55.
It seems that I cannot widen the table columns from their original widths.
If I add padding to the left and right margins the column data is wider but the row coloring is still incorrect.
Has anybody seen this problem before?
Update
Below are screen shots of what the report looks like when previewed in VS2005 and when it is displayed on the Report Server.
In Visual Studio it looks like this (which is what I want it to look like.)
This is what it looks like on the Report Manager:
This is the code that I use to alternate the row color on both columns but only the second one displays the green color:
= IIf(RowNumber(Nothing) Mod 2 = 0, "#BCDCBC", "Transparent")
If I add a third column, the alternating color works for the third column also but not for the first column.
In case anybody else has this problem this is how I worked around it...
To solve the report width problem I put the table inside a rectangle and made the rectangle the width I wanted the table to be and that was corrected.
I could not figure out why the alternating row color code would not work for the first column but for all others. So, I added a 'hack'. I added an additional column to be the first column with no heading and no data. Made it very small in width (0.03) so that is not too noticeable. That allowed the other columns to be correctly colored and the first one is not.

RDLC report, How to combine the bottom of tablix with page footer

Help me please.
A Tablix has 7 rows but I need to increase height of tablix until it matches the footer.
What should I do?
[Edited.]
According to below figure, I tried to insert a lot of blank rows to a Tablix.
And I used an Expression for setting visibility each row.
Example :
-If Dataset has one record. One Blank row will hide.
-If Dataset has two records. Two Blank rows will hide.
But It is inflexible because some rows aren't a single Line.
Using RDLC 2005 you can simulate this behaviour with:
a Body section with Body.Height = Page.Height - Footer.Height - TopMargin - BottomMargin
a Tablix without border
a Rectangle for every column to simulate with Rectangle.Height = Body.Height; set its RepeatWith property to Tablix
In order to simplify some operations you could put your Total textbox in the Footer or consider it when you build your Body section as explained before.
There is an example of what I mean (Tablix with red border and Rectangle with black border):
Another, though more complicated way, of forcing the height would be to use Subreports for each of the columns.
Each Subreport would list the table contents for that column as a single list.
You could then force height of a single table row to reach the footer... If the Subreport does not require the entire space it will return whitespace
Parent Report
Report 5
Report 4
Results in the following output report

How to align different Tablix in SSRS

I have a SSRS report in which i need to align multiple tablix in same Order as i need to export to EXCEL
The other tablix's is just a copy of the first tablix with only change of data set.But all the tablix will have same Columns.I need to align each column to the respective column in the other tablix. Can anyone help me in this?
After exporting in to excel,column1 of Tablix1 is not in Sync with Column1 of Tablix2,they are created in different Columns in Excel.
I don't think you can do what you are proposing with two separate tablixes. I may be wrong, but I think you would need to change the underlying dataset or query being used to return the data (probably need to do a UNION or something) and display all of the data in the SAME tablix, which shouldn't be a huge problem since you are using the same columns. If you do it this way, you would use your row groupings to effectively section of the tablix so that the data has some separation.
Following steps will work.
Select 1st Tablix and open the property window. Set property Location->Left=0
Do the same for 2nd tablix.
Now select cell one by one of the 1st tablix and open the property window. Set property
size->Width="required width of the cell and keep the maximum decimal places upto 2 decimal places"
Do the same for 2nd Tablix
I have just had to sort this issue. I had multiple tablix's underneath each other with various text boxes for labelling and had them inside rectangles. I did as suggested above lining everything to 0.0 on the location Left and checking that every single cell in every single column was the same width as the cell in the tablix directly above and below it. However when exported to excel I still had 2 or 3 blank columns hidden between each data column. In the end I removed all of the rectangles and just used the tablix's and text boxes. Everything was aligned to 0.0 location left, and all text boxes were the same width as the tablix's. This time when I exported to excel there were no extra blank columns.

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.