RDLC footer and dynamic visibility - dynamic

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

Related

SSRS Report Builder Design Layout Issues

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.

Word 2010 ActiveX control forms - formatting issues

Hopefully a quick one
I am creating a form in Word with a Save macro that uses an ActiveX Label as a button. The label works fine as a button but I am having 2 issues:
when using the document in normal mode, the coding text in curly brackets for the label is still visible - see image
How do I get rid of this?
When printing the form, the button pushes the header text down a line:
You can see in the first picture that there is no gap here.
Thanks for your help.
(1) Press Alt+F9 to toggle off display of field codes (and make sure you're not in Design Mode).
(2) is impossible to be sure without having the document in front of me but...
Printing problems are notorious with ActiveX controls, which were designed for use with UserForms, not for the document surface. Your best bet for stability would be to use a one-row, two-column table with the button on the left and the address on the right.
Or use a MacroButton field code instead of an ActiveX control.

Tab between Excel worksheet cells and form controls

I have a worksheet in Excel 2010 that is protected and used as a form for user-fillable values. The form contains 80 cells to be filled in and two radio button form controls to be selected. The form consists of two pages on the worksheet that are placed side by side horizontally (horizontally is a better user experience than vertically in this situation).
To get tabbing to go through the cells on the first page and then on the second page in the desired order, I used the solution on page 4 of the thread at "http://answers.microsoft.com/en-us/office/forum/office_2007-excel/establishing-enter-order-on-a-protected-sheet/e7a223f3-2dae-4c7b-a37f-1819c68be5dc". This works excellently for regular cells.
The problem is how can I also tab to the radio buttons, which are located about a third of the way through the desired tab sequence? Unfortunately, it's not as easy as just adding the radio button names to the TabOrder array mentioned in the thread.
I've found various threads talking about tabbing between controls, but nothing that solves tabbing from regular cells to form controls, between the form controls, and then back to regular cells.
I'm relatively new to Excel VBA programming and could really use your help. :-)
Thanks!
Don
I can't add a comment, so I have to put this in the answer section even though it is not really an answer: Not sure if this is still an issue for you, but are you using Option Buttons or a Group Box. And are you using Form Controls or ActiveX.
The only thing that I have found that may help is to tab to the group itself, then use the arrow keys: "When you tab to the group, you can use the arrow keys to select the next/previous option." and "2. You can set an accelerator key on each one by adding an ampersand (&) before one letter in the label. For example, if the label's caption is "&Next", it will appear as "Next", and Alt-N will be the keystroke that selects that option. Be careful not to choose a keystroke that opens a menu -- for example, don't pick F, because Alt-F almost alway opens the File menu."
From: http://www.mrexcel.com/forum/microsoft-access/557082-how-idiotic-no-way-tab-stop-option-button-within-group.html

How can I select (or copy) text from a Word 2010 ActiveX label?

A Word 2010 document has an ActiveX label that displays some text. Is there any way to make the text selectable, or otherwise copy-able, from a user's point of view, so he can paste it somewhere else?
Use case: I give the form to someone, they fill it out and return it to me. The element in question is a Label which, when double clicked, produces UserForm1 which has a ListBox on it. Once one or more selections are made and the user presses OK on UserForm1, the Label in the Word doc gets updated. I then receive the form back, and want to right click the label, copy the text, and paste it into an email.
You can't, at least from an end-user's point of view. Let me explain.
I started out wanting to achieve this with a Label, but soon found I couldn't copy the text that was displayed there using conventional ctrl-c or right-click > copy.
So, I switched it up to a TextBox. This worked somewhat, and the data was displayed, though with one flaw: Word 2010 seems to put a bunch of unselectable space between the last line in the TextBox and the bottom of the TextBox, making most the contents hidden until you scrolled back up to the top of it.
Here's what it looked like:
Notice all the empty, unselectable space below the last item in the list?
The solution to my problem of 100% of the text not being displayed in the box was to use this line of code, which places the cursor at the top of the text after the values are placed in the TextBox:
ThisDocument.functionalComponentsTextBox.SelStart = 0
This basically simulates the user manually clicking in the TextBox and pressing the Up key until he reaches the top of the TextBox. With that, the selections from the ListBox are now stored in the TextBox, the contents of which can be copied and pasted wherever as part of our business processes.
Here's what it looks like after: a perfect match when compared to the properly-displayed Label approach! Added bonus: the text is selectable, and the TextBox is customizable so I removed the border from it... can't tell the difference!

ReportViewer: two text colors, one cell

Is it possible to have 2 areas of text in one cell such that each can have a different color? You can do this in crystal reports but I cannot see a way to do this in ReportViewer. What it is doing is essentially highlighting an important text fragment if it appears in a cell description to draw the users attention. I am fairly new to reportviewer so it for now I am assuming it's my lack of knowledge that is making this difficult. I am using VS2010.
Thanks.
Turns out VicarlnATutu wasn't quite right.
You can do this, but only if you are using VS2010 (which I am) because it includes the new SSRS rendering engine for SQL-Server 2008. This allows you to put some basic HTML into a field and have multiple formats in one cell. For more info see below:
http://msdn.microsoft.com/en-us/library/cc645967.aspx
http://msdn.microsoft.com/en-us/library/cc627491.aspx
One thing that tripped me up is what they call a 'placeholder' in the MS documentation is the little bit of text inside the textbox control that shows up by default. You can select two different things on the control in VS2010. One is the textbox itself. Right clicking on the textbox gives you 'text box properties'. The other thing you can select is the default text INSIDE the textbox. Right clicking on this 'placeholder' text gives you a different context menu where you can select 'placeholder properties'. This is where you can change the cell to accept HTML.
No, unfortunately not. I don't know if there are custom controls out there for ReportViewer, but the built-in TextBox only supports setting color (be it Foreground or Background) for the entire thing.
ah, good to know. kind of a unintuitive way to tell a TextBox to display HTML, but nice to know that you can!