How do I prevent header chaos in, SQL Server Reporting Services
Hopefully someone will be able to help me with this! I'm trying to get a sensible Excel layout for an SSRS report, right now the header, which consists of an image and two textboxes, appears to be causing strange sizing issues, and add开发者_JS百科itional "merge cell" issues with blank columns being inserted into excel.
Basically, I've read that matching images in header to be in line with columns in the report prevents ghost columns/merged columns, and I've also read that you can use the SimplePageHeaders in one of the RS setting files to assist keeping Excel renders clean.
Regarding 1) When I match the column widths in the designer (2008 R2) it snaps with a nice blue line, but when showing preview mode and in fact deploying + using RS.EXE to create an excel report, the column sizes change. This is despite turning all Autogrow/Autoshrink options to false.
2) As I'm not using IIS for these reports, and am generating from the commandline using RS.EXE with RSS scripts, I can't work out where I'd set the SimplePageHeaders xml option on. I've not been able to locate the RS config file in any of the usual locations, despite exhaustive searching.
Before I give up and buy a third party solution, am I missing something?
Using the rs.exe utility, one of the parameters to the Render method is for DeviceInfo settings. You should be able to construct a DeviceInfo string to set SimplePageHeaders to true when you call that method. This is the way that DeviceInfos are specified if you're not using the server-based rsreportserver.config file.
Here's a rough example: http://msdn.microsoft.com/en-us/library/reportexecution2005.reportexecutionservice.render.aspx
First google on 'SimplePageHeaders' yields
"How to edit rsreportserver.config to configure SimplePageHeaders"
http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/4f5b0154-b5b4-4789-8ac9-06fb53370d85/
Regarding 1) When I match the column widths in the designer (2008 R2) it snaps with a nice blue line
Check the Size and Location properties specifically: items snapped to the grid may still have variations, causing those pesky extra columns.
For example, I have a report where the (snapped) header textbox has a width of 5cm but the 3 (snapped) columns below it in the Body have widths of 1.5, 1.5 and 2.02645cm respectively.
精彩评论