Friday, February 19, 2010
How to Eliminate Merged Cells from a Reporting Services Excel Export
2/19/2010 05:49:00 PM |
Posted by
VijayKumar Yadavalli
|
Edit Post
Recently i developed a report as i do normally by using Page Header (Images and Report Heading), Body (Data within tables) and Page footer (Page Numbers and date and time of report generation). When displaying on the web page or export to excel, all fields and layout shows correctly with out any issue. But the problem is when export to excel, some of the columns were merged as shown below.
Most of the time Merged cells wont be a problem until and unless you want to use Excel sort functionality (in current project, it is crucial to sort columns).Excel requires that ranges of merged cells be identically sized in order to be sorted.
So the million dollar question is, Why does the SRSS Excel render merge cells? It’s important to keep in mind that the excel render is primarily a layout render. As i told earlier, i used Page Header to hold the G2G logo and Report header. To preserve the layout, Excel render merged the cells on the worksheet surface like as show on the above screenshot.
If exporting to excel with the ability to sort is important to you, here are some tips to help you reduce the amount of merged cells in excel workbooks.
Before you leave:
Most of the time Merged cells wont be a problem until and unless you want to use Excel sort functionality (in current project, it is crucial to sort columns).Excel requires that ranges of merged cells be identically sized in order to be sorted.
So the million dollar question is, Why does the SRSS Excel render merge cells? It’s important to keep in mind that the excel render is primarily a layout render. As i told earlier, i used Page Header to hold the G2G logo and Report header. To preserve the layout, Excel render merged the cells on the worksheet surface like as show on the above screenshot.
If exporting to excel with the ability to sort is important to you, here are some tips to help you reduce the amount of merged cells in excel workbooks.
- Make sure the left and right edges of all report items line up with one another. This is the #1 cause of merged cells. so here what i did is, i created a new header row in report Body table and copy the image in one column and report header in to another column and then remove the Page header (see the screen shot below)
- Even though you line up everything precisely as mentioned in step 1, in some rare conditions, you still see some columns merged. This could be due to internal rounding and unit conversion issue. Since excel format wants everything in points, you should avoid using pixels,inches,centimeters and consider specifying all your measurements in points for the most direct results.
Before you leave:
- Tell me whether you like this article or not? Rate this post accordingly by selecting the stars below.
- Any suggestion, question or comment? Please post it in the comments below.
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2010
(48)
-
▼
February
(15)
- How to find duplicate records in SQL Server?
- The product level is insufficient for component
- How to generate Data script from SQL Database
- JavaScript Frameworks/Libraries Side by Side Compa...
- How to Eliminate Merged Cells from a Reporting Ser...
- Top 10 VMware Performance Tweaks
- A nice article about Microsoft Windows Communicati...
- How to Delete SharedServices?
- Virtual Server Performance Tips
- How to Enable AHCI After Windows OS installation?
- How to find Your processor supports Virtualization...
- UnKnown PCI Simple Communications Controller
- Dynamically Change Environment Specific Web.Config...
- UNIX VS Linux
- Factory Method Pattern (Creational)
-
▼
February
(15)
0 comments:
Post a Comment