Posted - 02/07/2013 : 14:35:57
| Hi all,
I'm at it again with web layouts in Report Builder 3.0. I have fixed some of my issues by using tables more than before. I am now using tables that have inner tables, and that's really helped with my alignment issues.
My big problem is the creation of a table that has vertically spanning cells, which don't follow the rules of grouping. As far as I can tell, grouping requires that the vertically spanning cells be to the left, and everything to the right of them is one to many subrows associated with a giving group. In this industry-standard report, I have two columns, starting from the left, with no vertically spanning cells, and then I have one cell which spans vertically, either spanning two or three rows, and then I have a number of columns which again don't span. So two to three rows can have one column whose cell spans all two to three. Not a simple task. I started out by just putting pieces together, trusting in the layout to make them stay that way, specially given that I was giving each piece (be it text box or table) a specific location on the report surface. They stayed together perfectly in print and pdf, but not in web rendering.
What I ended up doing was creating an outer table, and, for rows that had vertically spanning cells, I used only one row, merged all cells horizontally that didn't span vertically, and placed tables with as many rows as I needed so that the one cell which in the report spans vertically is represented by a single cell in the outer table, but the inner tables make it look like to its right and left there are two to three rows associated with it. I was able to do this because of the fact this is a statically defined table, always the same height, and the decision had already been made (not my decision) to make separate datasets for each row of the table.
So that works. Each row of the table makes a string reference to First() of the dataset it's using (since there's only one row returned from any of these datasets, that's fine). The web rendering is much better in this case than without the outer table.
Now I'm running into alignment issues within the table defined. Any table that has tables inside of it has rows in the web rendering that push out further to the right and those that push out a few pixels less to the right. Turns out that it's the rows that weren't merged and fitted with inner tables that are slightly wider than those that were.
Also, for those rows that were merged and fitted with an inner table, their columns in the web rendering push down a pixel or so less than those that weren't.
I've been able to reduce some of these differences by turning off some borders. Wherever, in the line of extra growth, I see two cells sharing an inner border (a light gray border inside the table boundaries) I choose one of them to turn off. Turns out that turning off the one in the cell belonging to the inner table seems to be the better choice.
This has helped some too, but now I have some gaps in the web rendering between cells where the border from the adjacent cell doesn't quite reach and touch this cell's border. And there's still some extra growth in rows mostly, but also in columns.
Quite maddening this. I continue to look at it, but I'm not really sure how to fix it. Any ideas guys? Right now I need a miracle to fix this thing.
P.S. - the print rendering continues to be perfectly ok.