SSRS Report Builder Design Layout Issues - sql

I can't seem to figure out why the design aspect of Report Builder/Report Designer is so messed up. Either I don't understand why it is doing this (most likely) or this is just the way it is.
Every Element I add to my report seems to not show up, align or look correct in the actual preview. If I add a line that snaps to another line which looks correct in design, looks totally incorrect in the final version. This is just one example of many, see below for images showing this behavior.
If I have a field (text box) tied to a data set and I position it in a certain area, it creates weird white space, is centered wrong or worse, when re-positioning the aforementioned line element, it seems to move other nearby elements in some erratic way. In the obfuscated example, the carrier fields are all basically stacked on top of each other, while in the preview they are spaced properly, but further down in the document if I do the same thing it ends up looking drastically different.
Is this a bug? Is this how RDL and Report Designer work? Is there some trick to element positioning? Is it relative to other elements, based off of foreground vs back ground elements? Does copying a text box to create more text boxes affect them in some way vs. creating a new element each time? I can't figure it out and do not know what to search for to find the answer to this.
This seems to be a "quirk" of how Report Designer works and I just haven't found the secret to it yet. If there is some exact positioning dialog available, I would prefer to use it instead of my mouse and these issues as I have a down-to-the-MM spec document for how this should be designed, but I cannot figure it out.
I am using Report Builder 14 for SQL Server 2016. It is a one page form (an ASN label) held within a table and all elements are within a rectangle element.
Is there an online resource or Report Designer guru who can point me in the right direction when it comes to this?
Example of the vertical line element looking incorrect in Preview/Final
Example of the vertical line element looking correct in Design View
EDIT: Like HOW does this even make sense?

SSRS renders so that the elements do not overlapp. In addition every element get enough space, vertical and horizontal. Basically you cant control this but there is a workaround.
If you put a rectangle in your report and place textboxes in that rectangle, they get rendered like you placed them. This also works in a tablix cell.
Another solution for your problem would be to display everything in one tablix cell. Your expression would be looking like this:
="Ship to: " & Fields!Adress.Value & ". Postal Code: " & Fields!PostalCode.Value
You even can add line breaks and tabs into that expression.

Related

Vertical Text in Access 2003 Forms

I have been trying with no success lately to implement vertical text on an Access 2003 form im designing. There is a vertical option in the properties of every text box, but its not in the right direction. Text boxes marked with the attribute vertical = true start their text at the top side and then run downwards, exactly not as I want.
So my question is:
Is there native support for vertical textboxes other then the vertical attribute in Ms Access 2003
Failing #1, is there a way to shift text in text boxes by 180°.
Is #1 or #2 dependant on wether or not you have fixed text or text obtained from a data source.
Microsoft really messed this up by only implementing the one vertical direction, and not the other. :(
No
If you are desperate enough, you can try one of the solutions by the Great Wizard aka Stephen Lebans: http://lebans.com/rotatetext.htm or http://lebans.com/xrotatetext.htm
There are other external solutions (commercial), like Total Access Components.
You'll have to try it out, but in comparison to the 90° rotation, making a label caption dynamic or giving a text box a constant text is trivial.

VBA script to insert anchor position for autoshapes in Microsoft Word 2007

I'm beyond the limits of my kindergarten-level VBA skills so would like to ask if anyone here can help me write a VBA script to help me work stepwise through my Word document and adjust the anchoring position of all the AutoShapes in the document.
I have a 400-page book in Microsoft Word with at least one and sometimes several marginalia (sidenote) on each page in a thin column to the left of the main body text column. These sidenotes are a concise 'pointer' to a particular point made in the body text and need to appear directly to that point's left.
Each sidenote is in its own AutoShape (within a textbox in that shape). The AutoShapes were placed by the author in an inconsistent way. Mostly they are anchored to a position on the page.
However, I need to repaginate. This will cause the body text to flow differently and I need the sidenotes to flow with it (approximately or exactly)!
So before I repaginate I want to make sure I anchor each AutoShape to the paragraph it belongs to and not to the page it is currently on.
I don't know if that can be done automatically, since I don't know how Word could deduce a purely spatial relationship between an AutoShape and a paragraph.
So I'm guessing I have to make do with a "semi-automatic" process. Something like this:
Press a button to start VBA script
Select next AutoShape
Prompt for user to enter cursor in body text where anchor is to be placed
Resume macro
Place anchor for that AutoShape in that position
Change vertical position paramater of AutoShape to "relative to paragraph"
and "0 mm"
(Alternative, not 0 mm but another value deduced to more
accurately position AutoShape)
Change width parameter of AutoShape to
a particular fixed value 37 mm (some of them were a little
inaccurately drawn)
End cycle and go back to beginning to
Select next AutoShape
Hope that is all understandable.
I've tried to record a VBA script to do some of this but have no idea how to build in the user prompt.
Any help much appreciated!
Craig
You may be better off creating a macro that works on one shape at a time, or anchor all the shapes manually (which you're almost doing anyway) and then write a macro to take care of the various parameters and settings you want.
If you really want to prompt the user while the macro is running you'll need to look into modeless dialogs (not possible on the Mac). See this link: http://www.bettersolutions.com/vba/VXV113/SE846743531.htm
Basically, you'd have to create your own dialog and then show it modelessly so that the user could still place the cursor before hitting OK. If you're new to VBA, this could be difficult to set up.
While searching for solutions to this, I found a post on another forum from someone trying to do something very similar. He was developing a set of tools for editors using Word and until I find the ultimate solution I am using his "Shapes" tool which allows me to change parameters on each AutoShape I select at-a-click instead of opening up and closing a dialogue box each time, plus selecting a different tab each time... His tools can be downloaded at his Editors' Toolkit website.

SSRS report, is there a way to switch templates based on configuration?

I have been googling for a good description of this but am not having much luck. I am pretty new to SSRS reports and I am probably not using the correct terminology here. If someone could point me towards an article that describes this that would suffice.
Basically I want to pull a bit into my report, and based on the value of that bit (or maybe a varchar) I want to render an address in different formats, or add/remove some sections completely form the report. I suspect this is basic functionality but am having trouble finding an example. Any help would be appreciated!
Thanks!
If you have a table/matrix the best place to put stuff like this is in columns that are outside of the detail or any groups at the top of the table. You can merge all the cells and add rectangles to add specific formatting. The neat part about using header columns is they can be hidden and the space used will not be rendered.
Say you have a table and Row1 and Row2 contain different formatting of the same data. If you have a report parameter named ShowFormat1 then you can optionally hide/show the correct row with formatting.
Click Row one and Set its Hidden property to =!Parameters!ShowFormat1.Value
Click Row two and Set its Hidden property to =Parameters!ShowFormat1.Value
The same concept can be applied to all elements if you are not using a table or matrix. Non-repeating controls, Rectangle or Image for example, can be hidden but the space used will still be rendered.

RDLC footer and dynamic visibility

tldr; Hide the left UI component on the footer and the right component moves over to the center.
I have a .rdlc file that I'm modifying in Visual Studio 2010 (and, sometimes, in Notepad++, as well). This particular report has a footer with two text boxes. The left side textbox contains information that is only sometimes relevant. When it is not relevant, it gets hidden. The right side textbox contains a page number.
So long as the left textbox is visible, everything is fine. However, when I hide the left textbox, the resulting output has the right textbox shifted over to the middle.
I don't want my page number shifted to the middle. How do I prevent this? I tried handling it with a table stretched all across the footer, but the footer apparently won't allow a table to be contained.
Apparently, nobody has any better ideas, so I'm going to say that my comment above is the answer:
"I ended up just creating a duplicate textbox to the one I was hiding and showing it when the original was hidden. This new one just contains a bunch of spaces rather than text. Kludgy, but it worked."
:)
I had the same issue. I just solved the issue be creating another Textbox and changed the hidden formula to vice versa.
Existing Text box (Moving) : =IIF(Parameters!PM_ReportType.Value = "ShowDiscrepancy",TRUE,FALSE)
Duplicate Text box Hide Formula = =IIF(Parameters!PM_ReportType.Value = "ShowDiscrepancy",FALSE,TRUE)
TB Moved to Center
Solved
Adjust the Hide formula

Dreamweaver DOM getCurrentLine()

I'm currently trying to create a small panel extension that recreates the 'minimap' feature on the Sublime Text 2 code editor, but for Dreamweaver. I've successfully created the view but I want to click anywhere in the minimap and the current page will scroll down to the current line that was clicked.
Unfortunately, I can only find the 'getCurrentLines()' code function for the Dreamweaver DOM that returns character offsets rather that line numbers. Does anyone know how I can return the current line number from the document?
I can scroll down the user document by hard-coding a value in using the theDOM.source.setCurrentLine(200); code, but it's getting that number which is stumping me! Any help is much appreciated.
There is dom.getLineFromOffset() can take one of the offsets and find the associated line, however, that should work only in the document window, not sure if that will assist in taking a selection in this "view" (by which I assume you mean panel) to move that into the document being edited.