SSRS elements jumping of Position - reporting-services

I am currently having the following Problem:
I have 2 SSRS Texboxes which I place right above a Matrix:
Now as you can see the Textboxes are fixed in a standalone Position, and are all alone without anything else around them,
but guess what happens as soon as I click to Preview my Report, this happens:
The Textboxes Fly out of the Report,
and I have done everything to get them in place, I have tried getting them a little to the left, but in the end, after I got to where it would stop jumping, I got them so much left that they were in a place that I couldn't have them in.
Has anybody using Reporting Services ever experienced this?
Does anyone have a solution? Are there some properties I need to change in order for the Textboxes to stop Jumping?

Great Question, GBerisha! Essentially, you want the horizontal distance between the Heading Textbox and the two rightmost Textboxes to be fixed. There are two ways to accomplish this. The first would be to create a Rectangle from the Toolbox Menu and place the Heading Textbox and the two rightmost Textboxes inside that Rectangle. That will keep the expanding Matrix from pushing out the two rightmost Textboxes as it expands. The other way would be to create a Table, delete the Detail Row, and place the three Textboxes in the Table Header.

Related

Spacing Issue while using SubReport on Main Report

Below image shows spacing issue while using sub report on main report.
Red rectangle - Tablix of Main Report.
Green rectangle - First Cell of Tablix on Main Report.
Blue rectangle - Second Cell of Tablix on Main Report.
Black rectangle - Sub Report Tablix
Can anyone please help me to solve this. I want to show the sub report as very next to first Textbox.
Without knowing what you've tried thus far, there are several issues:
Have you positioned them closely enough that the distance between the two items in the designer is set to between 0 and 5 pts?
If you have positioned them between 0 and 5 pts apart, then look for objects on the report where the top of the object is below the top of the subreport but above the top of the tablix. During rendering, objects cannot overlap, so if one object, even if it is seemingly unrelated to the tablix and subreport, were to expand vertically it would push down the tablix leaving the excess white space. It looks like the object in the upper-right-hand corner of your image may be doing this.
It doesn't look like this solution will work in this case, but to prevent one object from pushing other objects, you can group objects inside a rectangle. In that case, SSRS will move the Rectangle if needed, but will not disturb the spatial relationships of the contents of the rectangle.
If this doesn't help, you can tell me more about your specific situation via a comment and I'll do my best to help.

Report items affecting each others positions in SSRS 2008

I'm having trouble with some report items changing other items' positions when they are conditionally hidden.
I've been using Reporting Services 2000 for printing item price labels as PDFs, with the report consisting of a single table with a single cell for each item. The data fields and other items on the label are all placed inside a single rectangle. Because of the very specific layout required, some of the report items overlap in the designer in order to position correctly on the rendered PDF.
This has worked fine for several years, until we upgraded to SSRS 2008 and I had to migrate the report to the new version.
Now, suddenly, when certain items on the report are hidden (by an expression in the Hidden-property), certain other items shift their positions. In some cases, even the containing rectangle is resized.
After quite a bit of googling, I've come to the understanding that SSRS 2008 attempts to maintain the relative spacing between report items, so that if an item to the left of another one changes in size, the item to the right is adjusted accordingly.
Apparently, hiding an item equates to changing its size to zero, and so the item next to it is shifted left to fill the gap.
However, I do not want this behavior, since all items should stay in their predefined positions regardless of others.
So, does anyone know of a way to "fix" report item positions, so that they are not affected by hiding other items?
I've tried placing the items inside separate rectangles so as to group them, in the hope that only items inside the same rectangle can affect each other, but this does not seem to help.
Any ideas would be greatly appreciated.
In the side by side example, you can place the control that may be hidden into a rectangle big enough to hold both; but then put the other control that must stay in a fixed position BEHIND the rectangle (i.e. the parent of this control is the report rather than the rectangle).
If that's not enough, and the hidden and non-hidden items use the same dataset, you could (shudder) use a giant tablix control with a grouping of =1 and the right number of rows and columns to control the layout (because you can insert rectangles inside).
Some other tricks are to set the color/backgroundcolor properties to white (though in some rendering formats you can click and drag to highlight and still read what was there)... alternately you can go so far as to make the contents of controls all expression based, so as not to produce anything if a condition is met, and so it's basically invisible.
Another approach: create rectangles containing the fields you want to hide, then put a WHITE line across the entire bottom (or top) of the rectangle. This keeps the rectangle the same size even if the fields within it are hidden. A rectangle will shrink if the fields within it shrink, but the line spanning the entire rectangle prevents this from happening.
Not sure if this will help anyone else as it's a fairly specific requirement but it solved my variant of the OPs issue so here goes. I was designing an SSRS report to print labels (in my case the Avery 5164) and the users wanted to pick which labels on the sheet they would print because they may have already used one or two labels from a page. Because the positioning of the printed labels is important I needed them to stay in place even if the labels above them on the sheet were hidden. My solution was to create empty rectangles of the same size as the label and lay them directly on top of the existing rectangles. Even if I hide two, three, four, etc... labels, the rest will stay put.
Just draw a Rectangle, and slightly overlay the Objects with the Conditional Hidden expression with the position of your new empty Rectangle. Objects out to the right will be held in place by the Rectangle. No background colors or anything, just a Rectangle. Works vertically like if you have an address block and you want objects underneath the address lines to stay put. Like so...
enter image description here

gaps between charts in Report Builder due to table beneath

This seems more of a SuperUser thing but I didn't see any Report Builder or SSRS tags there. Move if it's in the wrong place, please!
When I create a report in Report Builder 2, I often have charts on top and then a table underneath. The problem I encounter is that some charts get shoved over to the right, seemingly due to the table width. I'll have a few charts snuggly against each other, as I designed them, then the rest in the same row will get pushed over to align with the right side of the table beneath them, leaving a big gap between the charts on the left and the charts on the right.
How can I "disconnect" the table from the charts such that the charts don't care where the table ends, and they just stay pressed against each other with no gaps between them?
It's like this:
[chart][chart] [chart][chart]
[table-----------------]
And I want this:
[chart][chart][chart][chart]
[table-----------------]
I discovered kind of a "cheap" way of fixing this. Just add an extra column to the table and stretch it such that it takes up the remaining width of the charts above. Make the column's background and border colors white or transparent so that it isn't visible.
[chart][chart][chart][chart]
[table----hidden column----]

Reporting services right item alignment

Is there a way to make items right aligned, say with the page or with some other item in a report, using reporting services 2008 ? Right now, I'm sort of emulating this behaviour by
shifting items to the right manually so that they look right aligned, however, when there's an item with a dynamic width (e.g. a tablix with data ir the horizontal direction), obviously, this approach fails. What is the correct way to do this ?
Unfortunately their is no horizontal align property available in the RDL spec (there is vertical align and text align), so there is no best way to do it.
You can employ some tricks to get the visual effects closer or perfect (textboxes work perfectly, tablix's are tougher and depend on a number of their settings):
- Place the right edge where you want it and drag the left edge to the maximum size you want to cater for, set the text align property to right, Set CanGrow to false (on a tablix you need to do this on the columns itself, where on textbox it is available directly): What this will do is allow for the text to appear right aligned correctly with growth handled and no export issues.
- Another trick is to place your elements in a rectangle which can help constrain it.
These options will work fine with dynamically generated RDL's, or setting in BIDS or Report Builder, as should all options, as it is the RDL which is the limiting factor not the tool/method which creates it.
Place the header and footer text-boxes on the right side of the report area away from sub-report alignment to bring them on RIGHT side in sub-report.

In SSRS, can you set a rectangle to grow with its contents?

I'm working on a report in SSRS (SQL Server Reporting Services) right now, and I'm having a problem getting a rectanlge I draw on the page in the report designer to grow. Basically, I've got a rectangle drawn, and then I put a text field inside of it. The contents of this text field can be either very short or very long, so I want it to grow to accomodate its contents.
But when I enter the long text, the textbox grows and then sticks outside of the lines of the rectangle. From the SSRS documentation I read, it says rectangles should grow to contain the items within them, and that those items are "peers".
What gives?
The only way I can get a textbox to breach the border of a rectangle is if the textbox is not actually inside the rectangle, but instead is underneath it.
When the textbox is inside the rectangle, and when the textbox property CanGrow = TRUE then the textbox and its rectangle both grow vertically downward to accommodate large amounts of text.
I was seeing the same issue. My problem was that I had the text boxes first and then put the rectangle around it and sent it to the back. Once I dragged the text boxes off and then back onto the rectangle, it grew properly.
You can tell whether the textbox is in the rectangle or on the body (e.g.) by looking at the Parent property of the textbox. If the textbox is outside of the rectangle, it works well to cut the textbox and paste it into the rectangle. I've had issues at times when trying to drag objects into (onto) a rectangle.
Maybe a little late - but it may help someone later.
The rectangle can serve as a container.
To turn the rectangle into a container, create the rectangle first. Just drop your other child-object elements (e.g. lists, tables, etc) into the container.
However, you cannot create the container after creating the child objects.