Archive for May, 2008
Use the following Extended properties:
HDR –> 1st row is HEADER row (column Headings)
*****************without extended properties, you might get this error**********************
TITLE: Connection Manager
Test connection failed because of an error in initializing provider. Could not find file ‘C:\temp\Sample.xlsx’.
This post is to remind myself about the hierarchcial grouping Report that I did last week using SQL Server Reporting Services (SSRS). I was trying to understand the business segmentation hierarchy. Among other fields, segmentation table has 2 fields, segment and parent segment, the latter being a recursive pointer to the former (The relation between them is comparable to Employee and Manager fields in the traditional EMP table).
- Create dataset with segment and parent segment fields
- Insert a table in the “Layout” tab
- select the table and select “insert group” option
- In the grouping and sorting dialog,
- Select “Segment” field in the “Group on” expression area
- Select “Parent Segment” in the “Parent Group” area
- Uncheck “Include group footer” option
- Drag “Segment” field into the newly added Group Header
- De-select Table Header, Table Details and Table Footer sections in the Table properties, remove all un-used columns from the table
- Make sure the Segment textbox is wide enough to show full hierarchy depth
- Select Group Header box(Segment field) in the table, open properties dialog, goto “Padding” section, and add =Convert.ToString(2 + (Level()*50)) & “pt” as expression to the LEFT property. This is key step to get the indentation (adjust values accordingly) (if you’ve more fields on your report, you might need to add this expression to other fields as well)
- Optional: added =IIF(Level()=0 OR Level()=1 OR Level()=2,”Bold”,”Normal”) as expression to the “FontWeight” property to make the first two levels bold
- Report Preview
…in case you were wondering, nothing! just a normal working day in the city and the crowds gathered to grab a ?quick? lunch hour pint at the Sterling bar!!