Reporting Services Textbox Format Question - reporting-services

I am creating a report with Reporting Services and am using several text boxes horizontally aligned next to each other. I would like to put periods so that report looks like:
1234 Robert Jones................... (234) 921-4922
1235 Jennifer Wilson................ (919) 582-2914
Is this possible to right-pad the text box with periods, or would I need to roll out some code to accomplish the above effect.
I tried doing this and the results looked like:
1234 Robert Jones............... (234) 921-4922
1235 Jennifer Wilson.......... (919) 582-2914
Is something like this even possible?

You'd have to have 3 text boxes per line, with padding in the middle and allow the right side to truncate
The other way would be to use a monospace font and count the number of characters

The answer to this was:
Set the CanGrow property to false and set the padding property on the top and margin to 3pt. Depending on the height and width of your textboxes, your mileage may vary.

Related

overlapping issues SSRS

Every expression is left align, I don't know why some labels are overlap and have more space.
see pic 2, label cancer within 5 years is overlap with expression.
see pic 3, output for unresponsive state has more space than output 1
How do I fix those problems?
It seems likely to me that SSRS is adjusting the size of some surrounding object and that is causing these fields to get bumped. I would check into the surrounding objects and make sure that their CanGrow and CanShrink Attributes are set to false. I would also recommend putting the expression in the same text box as the description (i.e., copying and pasting the expression into the "Cancer within 5 years: " textbox.

Double underline a field SSRS 2008 R2 matrix

i have an ssrs 2008 R2 matrix with Accounts on Rows, Months on Columns and Sales in the data section. I need to “double underline” the sales numbers but I can’t figure out how to do this.
i tried using “double border” but that would create one giant line across instead of just underlining the sales numbers - in other words, the display would be a single long line across.
any idea how to achieve this? i am willing to use custom code in the report code. Thanks in advance for your help.
Edit: Adding a screen shot to show the desired output:
For some reason the Double text box BorderStyle property seems to be rather temperamental.
This MSDN thread suggests a few requirements to get this running:
Double Line border turn to be single in Reporting Service
The border width must be 3pt at least.
There must be at least one row beneath the Double border text box.
Let's test this out. A simple tablix:
And let's set the bottom text box to be Double at the bottom:
In Preview this is unsuccessful:
Let's test out the suggestions. First, set the width to 3pt:
Same result:
Let's add an extra row below:
It works:
What's going on here? It seems like if the width is too low, the two lines will squash together. Also, it seems like the border actually spills to an adjacent text box, so if this doesn't exist the bottom line is not displayed.
Put them together and it works.
One more note - this is not required for Excel - just add a 1pt Double border and it will be fine. The above series of steps are only required for Web, PDF, etc.

SSRS 2008 and Dynamic Positioning of Text Boxes

I'm trying to produce a pay check. I will allow the user to setup the position of the items according to their check style.
From my research, it seems that the position of text boxes in SSRS is static and not dynamic. There is no "expression" option for Top/Left. I thought a way to get around this might be to make the text boxes large and overlapping and then set the padding top/left based on expressions to the positions that user has selected. However, it seems that similar to HTML, the text boxes either float around the higher level text boxes or simply drop out of view.
This would be simple if there were a way to tell SSRS not to be concerned with the order of the text boxes and simply display them overlapping, however I don't feel that there is.
Given that, what other options to I have for dynamically positioning text boxes in an SSRS 2008 report? I'm moving right along with this project but I've hit this stumbling block.
SSRS gives you a lot of options for dynamic formatting but Size and Location are fixed. You cannot change this. Overlapping of textboxes does not work in the soft-break renderers like HTML and Excel but does work in hard-break renderers like PDF or TIFF. Have you tried your padding technique and output the report as PDF?
I'm not sure what are going to do in your report, But in similar cases I usually use Space character to position a text. For instance,
IIf(Len(Fields(YourColumn.valu)) > 10, Fields(YourColumn.valu), "    ")
Note that you have to ensure it can implemented in your case or not. I'm not sure that it is helpful but as long as the location and width properties are fix this is the only option
Note 2 : I'm using Unbreakable Space character instead of simple Space so that SSRS render it without any problem

Access report "Can Grow" property needs to effect neighboring controls

I have a report with a bunch of controls in the Detail section.
I am working off a word document that was given to me as a sample and I recreated it in access almost perfectly. What I need now is a way to handle overflowing the text boxes. I have "Can Grow" enabled, but here is the real issue:
I have a fake table going on. Multiple text boxes arranged in a way that just doesn't work in a subform. Certain cells have red, green or yellow backgrounds while others are just plain white. When one of the text fields overflows, and "grows", the other text boxes in the same row stay the same size as before and it looks very very odd (703 twips vs 300). I would really just love for it to work as if it were a table in word/excel and the entire row would grow at once (all =703 twips), but seeing as how it isn't literally a "row" I just want a way to associate the height of these text boxes with each other.
Is anything like this possible? If I need to clarify anything just let me know, I hope I've given ample information.
In the design view of your report select all the textbox controls in the detail section and all the labels in the page header section. Right click on one of the textbox controls and select Layout -> Tabular. The controls and labels should now align with each other.
You've not set which version of Access you're using but this works in Access 2007.
Ok here we go. So I had a fake table, I needed it to have table borders around each text box and when one text box got taller than the others in the row, the borders would look totally wrong. So, what we have to do is literally draw on the report at runtime, which can be done in any view including print preview. This code must be placed in the Print event
'step one. find out which box in the row has the greatest height value.
'You can come across this information however you want.
'It will likely depend on what data goes in the boxes.
'For the sake of the answer length we will skip that actual code
'step two. Take measurements and store them in variables.
'You will need a start point, and an end point in standard (x1,y1),(x2,y2) form.
Dim t As Integer 'top
Dim l As Integer 'left
Dim b As Integer 'bottom
'step three. Use these measurements and draw your lines.
'Try to use looping if your naming and report layout work will allow it.
Me.Line (l, t)-(l, b), RGB(0, 0, 0)
' (x1,y1)(x2,y2),pick a color
'We just drew a line straight down the length of the control
'If you plan ahead, and place a line on the report permanently on top of the first row
'and below every row, you will only need to draw vertical lines.
'The lines below each row will be pushed down by the tallest control
I hope this helps. I had no idea this stuff existed before at all. Here is the MSDN info about it: http://msdn.microsoft.com/en-us/library/aa221362%28v=office.11%29.aspx
OK...
1 - Go into Design view of your report
2 - Select ALL the textbox controls in the detail section that you want to be table like and ALL grow if any one grows.
3 - Right click on one of the selected textbox controls and select Layout -> Tabular.... but... now... after you have your textbox row controls as a tabular layout... You must do one thing more...
4 - Inside your reports FORMAT TAB properties... Set ALL PADDING properties to 0.00... 0.00 for Top Padding, 0.00 Right Padding, 0.00 Left Padding and 0.00 Bottom Padding. (default is usually around 0.0208)
5 - Please note that changing your textboxes to a Tabular Layout kinda throws your textboxes to the right (at least for me) so you may need to re-adjust them so they are aligned with your Page Header textboxes again (if you have any that you might be using to header name your table like columns).
6 - Make sure ALL SPACE is removed in the detail area by having the bottom bar (page or report footer) snugly up against the bottom of your Tabular Textbox Layout and also ditto with the upper detail bar (page or report header).
7 - Now when you look your report in print preview with max 200% or more zoom you WILL still see very very minor spaces between your cells in your layout but when you actually print they will be almost unnoticeable unless you take out a magnifying lens.
I found a solution for my situation but I would like to have a better one...
In my case, a TextBox at the left side is describing the content of 1 to 3 pictures on the right side. The TextBox, if enlarging more than the height of the first picture, would shift pictures 2 and 3 down, in spite of a properly designed Top-Attribute in the picture controls.
My solution: I put the height attribute of the text box to 15cm (e.g 2 Inch) and enable it as shrinkable.
However, strange, but this helps for positioning the Pictures at its desired Top-Locations... :-) as well as minimizing the horizontal space used.

Problem getting items in adjacent table cells to align vertically

I'm having a big of a styling problem with some table rows. As per this screenshot:
The blue and red circles are cells in a table row (whose height is 50px). Both are styled with "vertical-align:top" . The phone number data (in the red circle) is actually a pipe-delimited string where I've substituted HTML breaks for the pipes.
In the green circle, the Fax lable is "vertical-align:top", but the actual list of fax numbers (also delimited) are vertical-align:middle.
What I want is for these things to neatly line up, with the top phone number/fax being vertically aligned with the label. Is my substitution of breaks for pipes in the phone/fax strings is the cause of this problem? Is there a way I can get what I want without changes to the database table/app?
Update: I sort of accomplished this via some padding on the table cell. I say sort of because it mostly looks lined up, but I get the sinking feeling this is happening not because I want it to, but due to random chance. And that it will one day betray me when I need it to look right the most.
Try the following CSS:
table td, table th {
vertical-align: top;
}
You should probably not rely on valign and stuff, that's long-since been replaced with CSS.
I agree with Parrot's implementation of CSS for this, you should also note that having different fonts and font sizes in the cells will make them appear misaligned, even with the same styling applied to each. If the alignment is important to the look/feel of the page you're creating, I would consider separating the data again and making each phone/fax number it's own heading with a header row "Phone" and "Fax" having colspan="2".
*------------------------*
| Phone: |
|------------------------|
| Back: | xxx-xxx-xxxx |
|------------------------|
| Front: | xxx-xxx-xxxx |
|------------------------|
| Fax: |
... etc.
And no, the substitution of | with <br /> will have no negative effect on the look of the tables, so long as there are not any LEADING |s.
You call them labels (as they semantically are), are you using the labels tag as well ? if so check if it has some css rules applied to it that mess things up.
1st (blue/red) this seems weird if they are both valign:top. have you checked if the label is having some top margin or padding applied on it, or some css rule with vertical-align:middle?
2nd case (green), you will need to align them to the top as well ..
if one is middle and the other top you can never align them ..