Monday, March 26, 2012

Pushy Matrix

Hello,

I've encountered an issue with a couple of reports and am wondering if anyone has any information on this. I have found a work-around, but would like to know what causes the issue, so maybe I can address it in another manner.

As standard procedure in all my reports, I have a graphic at the top which is set to Fit Proportional and has a width which is 1.25" shorter than the total width of the report. The same height as the image and filling the remainder of the report width next to it, I place a textbox with a simple expression to provide the time the report was run with a small custom message using the Now() function. Below these two items is another textbox which contains the report title. This textbox typically spans the entire width of the report and is positioned about 1/8" beneath the other two items to avoid incidental contact with the image. In some cases, there will be an additional textbox beneath this with a short description of the report and it's function. Finally, the other report items are displayed with the main content of the report.

In situations where the main content of the report contains a matrix item, I encounter an issue when the report is rendered either through the Preview or a browser. This rendering issue also occurs on occasion when exporting to PDF, though I've not tested other export formats in this situation. What occurs is the textbox which displays the time the report was run ends up being pushed to the far right of the display window beyond the width of the report itself. In Preview or the browser, this is shown on one page with this text box far outside the rest of the report. When the issue impacts exporting to PDF, this sole textbox is pushed to a blank additional page which is obviously not acceptable.

For those who may be wondering, I am working with SQL RS 2000 and VS 2003.

The workaround that I've come up with for this issue is to place both the heading graphic and time textbox within a rectangle. No other adjustments are necessary. For some reason, not what I expected to happen when I tried this, the entire rectangle is left on the main page instead of being pushed to another page as I expected. This works, but seems silly to have to place these items in a rectangle to keep some invisible page break from displacing my textbox.

Again, no rush as I already have a work-around, but just out of curiosity, I wanted to see if anyone else had encountered this. Possibly this will give someone else a work-around if they hadn't found one already.

Thanks

This is actually the correct behavior for all versions of RS. In performing layout, RS decides how items will be pushed around the page by expanding items based on a number of factors. One of those factors is the relative positions of the left edge of the pushed item and the right edge of the pushing item. For example, above, you describe a situation where the left edge of your title textbox is to the right of the matrix's right edge. In this situation, when the matrix expands by X" it causes all items farther right than its right edge to also move by X". Your header image didn't move to the right because its left edge was farther left than the matrix's right edge. When you placed the rectangle around both the image and the textbox, you ensured the rectangle, and therefore the textbox, wouldn't be moved because its left edge was farther left than the matrix's right edge.

This same process also applies to vertical movement. Say you have a page containing a textbox and a matrix side-by-side. If the top edge of the textbox is above the bottom edge of the matrix, the textbox will not be moved down when the matrix expands.

Hopefully this helps explain why your work-around works.

Thanks,

John

|||

Thanks again for the information. That all makes sense, but now it poses another problem. In this situation, I have my same header graphic, time stamp and title, but in the body, I have a matrix and a 100% stacked bar chart sitting next to each other. My report is set to landscape dimensions with 1" margins all around. In design, the matrix is 2.5" wide and the chart is 4.25" wide. There is about a 2" gap between the two items. When I preview this report within VS2003, it appears normal in the standard preview and the print preview. Once I upload the report and view it in Internet Explorer 6, the matrix is pushing the chart over to the right. If I export to PDF from there, it is normal again. When the matrix is completely populated with the most data it could contain, there is still about an inch between it and the chart, EXCEPT when viewing in Internet Explorer.

Any ideas would be greatly appreciated. It is not too likely that anyone would be viewing this particular report from Internet Explorer except to export it to PDF, but I would still like it to look the same when viewing in the browser as it does when exporting.

Thanks In Advance!

|||

I had been playing with this same issue for a few hours, your work-around is exactly what I needed. In my case, my textboxes and matrix were separated by a full-page graph. This makes my report 2 pages, which is what I wanted. The situation where "This is normal rendering" is useless in my case, making it simply more difficult to use. Some days, I miss Crystal Reports. Thankfully, most of our apps use Oracle Reports.

Thanks again! Appreciate the help.

|||I'm having a similar issue. I set up a report with 3 subreports in the detail section. Each subreport is a matrix. I want the 3 matrixes to print one after another without a page break and in Preview, it works fine. When I export to PDF, if the matrix has any data at all, it allocates the entire page and forces everything else onto the next page - even if there's only one line of data. The PageBreakAtEnd and PageBreakAtStart properties are set to false.

No comments:

Post a Comment