Did you know you can add layout styles to the report wizard and load into existing reports? I’m referring to the list that contains slate, forest, generic etc.. I always thought this was pretty cool and thought I would share how to do it.

First go into your respected Visual Studio installation directory. I believe the location is the same and has not changed from 7,8 and 9.

Find this directory

C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssembliesBusiness Intelligence WizardsReportsStylesen

Note there is a backup one level up. I suggest you leave that alone and as a recovery point. If you mess this up, the report wizard will fail on you. Guess that means this is a, “At your own risk” post.

Open StyleTemplates.xml for editing.

It’s pretty straight forward and I bet you already see what to do. For this example I’ll add a simple style

XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
    <StyleTemplate Name="CompanyStandard">
        <Label>Company Standard Format</Label>
        <Styles>
            <Style Name="Title">
                <BackgroundColor>DarkGray</BackgroundColor>
                <FontFamily>Verdana</FontFamily>
                <FontSize>18pt</FontSize>
                <Color>#000000</Color>
            </Style>
            <Style Name="Table"></Style>
            <Style Name="Table Header">
                <BackgroundColor>Gainsboro</BackgroundColor>
                <FontFamily>Verdana</FontFamily>
                <FontSize>10pt</FontSize>
                <FontWeight>Bold</FontWeight>
                <Color>#000000</Color>
                <BorderStyle>
                    <Default>Solid</Default>
                </BorderStyle>
                <BorderColor>
                    <Default>DarkGray</Default>
                </BorderColor>
            </Style>
            <Style Name="Detail">
                <FontFamily>Verdana</FontFamily>
                <FontSize>9pt</FontSize>
                <BorderStyle>
                    <Default>Solid</Default>
                </BorderStyle>
                <BorderColor>
                    <Default>DarkGray</Default>
                </BorderColor>
            </Style>
        </Styles>
    </StyleTemplate>
 
	<StyleTemplate Name="CompanyStandard">
		<Label>Company Standard Format</Label>
		<Styles>
			<Style Name="Title">
				<BackgroundColor>DarkGray</BackgroundColor>
				<FontFamily>Verdana</FontFamily>
				<FontSize>18pt</FontSize>
				<Color>#000000</Color>
			</Style>
			<Style Name="Table"></Style>
			<Style Name="Table Header">
				<BackgroundColor>Gainsboro</BackgroundColor>
				<FontFamily>Verdana</FontFamily>
				<FontSize>10pt</FontSize>
				<FontWeight>Bold</FontWeight>
				<Color>#000000</Color>
				<BorderStyle>
					<Default>Solid</Default>
				</BorderStyle>
				<BorderColor>
					<Default>DarkGray</Default>
				</BorderColor>
			</Style>
			<Style Name="Detail">
				<FontFamily>Verdana</FontFamily>
				<FontSize>9pt</FontSize>
				<BorderStyle>
					<Default>Solid</Default>
				</BorderStyle>
				<BorderColor>
					<Default>DarkGray</Default>
				</BorderColor>
			</Style>
		</Styles>
	</StyleTemplate>

Save that in there and close the XML file.

Now open up Visual Studio and create a new report server project. Create a new report from the wizard and get to the layout style section. You should see Company Standard Format listed now. Thing about this is, I don’t know about getting a preview. I never spent the time to find out where the configuration was to add this layout to be interrupted. Honestly don’t think it’s that important. You’ll need to test the layout pretty well to get it perfect in order to make it your standard. Once you do though it will save a lot of time editing layouts.

So now my report loads with my new company standard formatting and we gain standards along with time saving configurations