Monday, February 20, 2012

Positioning Tables and Graphs On A Page using Rectangles (or anything!)

I am creating a report that contains several tables and graphs. The report should fit on one page. It is a dashboard type of report that gives a quick look at key information.I have several sections that have related objects - a table and a graph for the same subject. I grouped the subjects into rectangles so that I could have a nice border around each section. However, when the report is rendered in IE, the rectangles do not stay together, and I have white space between them. I tried putting a background color on the body, but the background color does not show when the report is rendered in IE.

I tried a work-around using lines, not rectangles, to separate sections. The spacing seems to be working, but again the background color is not showing on the rendered report, so that is not a viable option.

As a work-around for my work-around, I put the objects within one rectangle, again using lines to separate sections. However, the spacing of the objects within the rectangle is not working - I am left with large blank spaces again.

Has anyone run into the same problems?

TIA,

eBeth

I haven't used rectangles, but I have had luck using the table control. Even when I only needed a label and textbox, I found adding these to a table kept my data where I wanted it. This might be an option for you as well. For the report where this was the most useful I had a main table across the top, in the middle I have 3 more tables (small, 2 are single lines) spaced appropriately, and the bottom of the report has yet another table similar to the main table. I know its hard to visualize, but all the objects remain in the correct position.

Simone

|||

Hi, eBeth,

See if this helps: Rendering Considerations for Automatic Sizing and Positioning .

In short, the position of report items in relation to each other influences how they behave when the report is rendered. Also, the white space on the background of the report design surface is preserved, so check that the rectangle border you create around the table & graph is not pushing the rendered report over the page boundary, and eliminate any of the white surface past the edges of your report items.

======================================

New: Search scoped to just SQL Server Books OnLine: http://search.live.com/macros/sql_server_user_education/booksonline

|||

Hi,

Well, the answer seems to be trial and error with tables and other graphical elements. I have the page looking "OK," and am in the process of putting more information in tables. I now have section headings in the first table of the section, and am using tranparent rows in tables to space elements. It is not the best solution, but there it is. I read the online references; they didn't help very much. One of the main problems is that it has to look good on the web and when downloaded to Excel or PDF.

Thanks,

eBeth

No comments:

Post a Comment