Access report "Can Grow" property needs to effect neighboring controls - ms-access

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.

Related

RDLC Report add line between white space and last page

I'm working on a "contract format-like" rdlc report, which will have four tablix with variable numbers of rows. This report also have a fixed "last page" that is set to do a page break "always".
What I want to achieve is to "span" some element to gave the impression that the remaining white space between penultimate/before last and last page won't be written/added with any more info in the future (as we use to do by handwriting/completing, in the past). The ideal object could be a transversal line (I think that's not possible in my research). Also I have found some workarounds that take in count the "number of rows" of each tablix and do and approximation height, then add the "needed" rows to the end of the last tablix but that's not quite the solution I'm looking for.
Please look the attached image for a better idea of the line desired location:
Explanation-Layout-And-Variable-Height-Meaning
I hope you can advise with your experience on this (even if not the solution some idea of how to achieve it).
Thanks in advance!
Unless I'm missing something....
If you wan to simply add a page break and then a 'blank' page...
Just add a rectangle under your last tablix.
Make it short vertically, (the width does not really matter as long as it's no wider than you tablix). Move it so it's close to the last tablix (say 5pt below)
Right-click the rectable and choose properties. Now set the properties of the rectangle to "Add a page break before"
This will force a page break after the last tablix and then push the empty rectangle onto the next page giving the impression that it is blank.

SSRS pre-printed form second page format issue

I've not come across anything like I am looking for so either I'm either not asking the right questions (for which I will apologize for re-asking a question) or it's not been asked.
I'm working on a report to print header information onto pre-printed carbon copy forms on a continuous form feed impact printer. The form is two pages and the header for the second page only contains part of the information that the header on the first page has.
I have the first page header working fine. I played with using rectangles and it was printing on target on every other page. The problem comes in when I try to print the page two header.
The way I am formatting the headers is that I have a single cell tablix with a rectangle in the cell. I've measured out where the 11 fields belong for page one of the form and placed them on the form. This all works correctly. Below that, I've inserted a second rectangle with the add page break before property checked. In that rectangle I have two of the fields that are repeated one just above the other (field 1 and field 2). Field 1 is in exactly the same spot as it is on page one. Field 2 is higher and to the left of where it is positioned on page one. The report body has no margins. Positioning is all done directly through the elements themselves. Field 1 sits about 1/16 to 1/8 inch lower than it does on page 1 even when position top is set to 0 (and there is no page margin). I can position field 2 exactly where I want it to be however. If I have multiple forms print out, all the page ones are perfect and page 2 field 2 is spot on but page 2 field 1 is always too low.
I tried separating the rectangles but was unable to connect the dataset to the second rectangle.
Is there a better way to do this? Is there a setting I'm missing that is adding padding to the second rectangle? Any help is appreciated.
Not quite the answer that I was looking for but it nearly fixed the problem. It turns out that the field itself had padding on it. I'm not sure how as I copied and pasted it from the first page but it moved it up to a acceptable position. It is still a bit low but close enough that the requester is happy with it.

Report elements on left getting pushed down when tablix on the right side expands

I have a report with a tablix on the right side and several textboxes arranged in rows and columns on the left. While previewing the report, the tablix gets expanded with the separate values in them and because of which some of the text boxes are also getting pushed down leaving blanks spaces and making the report look unformatted.
I have attached the report format. Please let me know if you have any solution to this issue.
You need to place your report items in rectangles to stop them interacting with each other. Put your items on the left all into the same one and the table on the right into it's own.
Have you tried setting the Can Grow attribute to False or did you need it to expand? If so I would actually increase your Tablix size to the max it can to not push the text boxes and then set the property to Can Grow to false.
I think I know why rectangles didn't work for you. I have a similar report I am trying to create with the same format. I had the same problem you mentioned where white space appeared above my report objects, and the objects on the left still did not appear in the correct places.
What I found was that you need to create the rectangle first and then add objects into it. It appears that the above problem occurs when you try to place a rectangle on top of your report objects.
I know this is 4 years late, but I thought this might hopefully save someone some time.
Go to Report Properties to select columns number from 1 to 2 to see information side by side instead of going to next page.
Report Properties

Dealing with very tall textboxes and pagination in SSRS 2005

I have a report in SQL Server Reporting Services 2005. It makes use of a page header and footer and has no subreports. The body portion contains a few smaller elements and then a simple single column table. The table has a single header row and a single detail row. The header is just a label, basically. The detail row is a single textbox with a simple Fields!FieldName.Value as its output.
The problem is that FieldName, in this case, is a highly variable length string. It can be a sentence up to 8000 characters (usually no more than 2 pages worth). The text can contain line/paragraph breaks (returns) but no other special formatting. Everything is fine so long as the content fits on one page. Once the text exceeds a single page (8.5x11), the text is very nastily cut off abruptly. Since this is a pagination problem, it is only visible when exporting to PDF or when viewing the report in Print Layout.
It seems as though there is a maximum size the row can grow to on the first page and then it chops it off and starts it up on the second. But this cutoff is not carefully managed in relation to the text. It can occur right in the middle of a line, causing it to show the top halves of the letters on the first page and the bottom halves at the top of the second page.
Obviously, this is unacceptable, as it looks very unprofessional and can impair the readability of the line that was so messily split. I also can never be sure it'll split badly, as sometimes it more or less ends the page evenly, though usually I can still see the hanging tails of certain letters on the next page (g and p for instance).
The secondary problem is that I'd really like the table row header to repeat on each page. Setting the obvious property, "RepeatOnNewPage" has no effect. I suspect this is because it's still trying to show the single really vertically tall row. It seems like it's okay repeating headers and splitting pages nicely between detail rows. But because this is basically just a big block of text, and thus just one really tall row, it doesn't split it nicely.
What can I do or use to solve this problem? I can live without the repeating header so long as it just doesn't cut off text in the middle of a line.
Unfortunately, page break fine tuning is one of the biggest weak points of SSRS.
I can only suggest that you break up the long text into multiple rows before SSRS ever gets it. You'd want to parse the text to look for word breaks. The result will be odd looking breaks in the output since you won't know where the break will come on a line in the printed report. However, it'd be much more readable than cutting text in half.
If the text is comprised of reasonably sized paragraphs, you could parse it out that way instead.
You might even go so far as to measure the text using SQLCLR and the System.Drawing.Graphics.MeasureString method to fine tune the output but I wouldn't recommend that route for the feint of heart.
In SSRS 2008 R2 and Visual Studio 2008:
Click (not-right click) a textbox and go to the properties window (lower right side of VS) -> KeepTogether = false.
The text will cleanly cut between a line and continue on the next page.
Just thought to add here as searching for this doesn't return many results.
I have done what JC has suggested in the past where I've broken down the text into paragraphs and each paragraph would in effect be its own row. Works pretty well given the limitations of SSRS.
One thing to be careful about is that you would need to make sure that your paragraphs sort properly. In most cases it would display them in the correct order, but adding in a column with sortID to give some sorting hints to the table would probably be a good idea.
In the end, the cut-off-text problem was due to non-standard padding on the textbox in question.
For whatever reason, having padding any greater than the defaults (2pt all around) seemed to cause its pagination to go sour. I imagine it is due to the algorithm not taking padding into consideration when deciding where to break the paragraph. With default padding, the line always ends cleanly and nicely on each page.
As a workaround (since I liked the extra white space the padding gave to the layout), I used a rectangle to achieve the border and made the textbox inside it smaller than the rectangle by about an eighth of an inch. This gave the box some inner padding while still apparently allowing the pagination to correctly determine when to break up lines.
Still, a lot of unnecessary headache.

How to keep List contents on the first page? (SSRS 2005 - PDF Export)

I've got the following report setup:
1. Letterhead (not in the header, since i only want it on the first page)
2. List control with some data
when i export the report to PDF, and the contents of the List are less that one full page - my letterhead is displayed on the first page (the rest of the page is empty) and the List content gets moved to the second page.
if the List grows over 1 page - reports is showing up just fine (Letterhead and portion of the list on the first page - the rest on the second page)
It looks like it tries to keep the list on 1 page as long as its contents fit on the page - but when you add the letterhead to the contents it overflows the page, and the list gets bumped down to the next page.
Is there any way to keep the list on the first page regardless of its size.
Putting the letterhead in the list is my last resort, I'd like to hear some other solutions.
uploaded a sample .rdl to illustrate the problem
got rid of the list for simplicity, the problem seems to be with a textbox wanting to show up on 1 page
p.s. see this question for more details
What is the source of your text? Is it coming from a dataset? If so, Add a paragraph id in it, set your table to group on the paragraph id and show only the group header. In the group, add a bottom padding value of say 5. The table will handle the paragraph breaks for you, and if it grows more the a page it will handle it for you. Make sure that keep together is set to false. The paragraph id will be used to sort the dataset by id ascending.
sorry I didn't notice your comment at the end. The only other thing that i can think of is to shift your list up closer to the header and eliminate all empty space at the end. Also, make sure the KeepTogether option in the list is set to false. This way it will break up your list rather than move it to the next page.
you can put both the letterhead and the list inside a rectangle so they are always grouped together.
Reporting services also tries to keep the relative spaces you have in the designer, so if you list is aligned to the bottom of the page and there is a space form the header; it will keep the space on top and align everything to the bottom of the page.