Saturday, February 25, 2012

RS Charts - possible to add more types?

I'm creating a chart showing different types of work hours registered per
person during a given period. I'm using a "Simple Column" chart type. It
works nicely. But I'm quite sure that our customer wants a different chart
type, that can be found in Excel 2003. It's a 3D Column chart, that shows
the different values related to each other. Not stacked, but as columns
behind each other. There is no such chart in Reporting Services SP1.
Is it possible to add more chart types to RS SP1? How? Or is it possible to
hand code the RDL file to create a view that is like what the customer
wants?
The person in charge is very probably going to ask me about the layout of
the chart, so I just want to check...
Kaisa M. LindahlRS 2000 does not provide any additional chart types. However, it allows you
to use so-called static categories when you hand-code (!) the RDL file. Keep
in mind - a chart works similar to a matrix - static categories would be
static column groupings in a matrix. Chart series groupings are comparable
to row groupings in a matrix. It may be useful to first play with the data
in a matrix till you have the right structure, and then generate the chart
RDL from there. You may be interested in carefully reading this related
thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=e384f9b6-d6d4-468d-b7c5-2ec0b680af14&sloc=en-us
In your case it sounds like you are looking for the ability to use static
categories in the chart. You will find a trivial example at the bottom of
this posting. Note: the report designer layout mode does not support static
categories - if you modify the layout it will reserialize the RDL and remove
static categories from the chart.
--
Robert M. Bruckner
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
All code samples are provided "AS IS" without warranty of any kind, either
express or implied, including but not limited to the implied warranties of
merchantability and/or fitness for a particular purpose.
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:egVx4QU$EHA.2112@.TK2MSFTNGP14.phx.gbl...
> I'm creating a chart showing different types of work hours registered per
> person during a given period. I'm using a "Simple Column" chart type. It
> works nicely. But I'm quite sure that our customer wants a different chart
> type, that can be found in Excel 2003. It's a 3D Column chart, that shows
> the different values related to each other. Not stacked, but as columns
> behind each other. There is no such chart in Reporting Services SP1.
> Is it possible to add more chart types to RS SP1? How? Or is it possible
to
> hand code the RDL file to create a view that is like what the customer
> wants?
> The person in charge is very probably going to ask me about the layout of
> the chart, so I just want to check...
> Kaisa M. Lindahl
===================================================<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Chart Name="chart1">
<ThreeDProperties>
<Rotation>30</Rotation>
<Inclination>30</Inclination>
<Shading>Simple</Shading>
<WallThickness>50</WallThickness>
</ThreeDProperties>
<Style>
<BackgroundColor>White</BackgroundColor>
</Style>
<Legend>
<Visible>true</Visible>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Position>RightCenter</Position>
</Legend>
<Palette>Excel</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!FY2004.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Marker />
</DataPoint>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!FY2005.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Marker>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title />
<MajorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Min>0</Min>
<Margin>true</Margin>
<Visible>true</Visible>
</Axis>
</CategoryAxis>
<DataSetName>DataSet1</DataSetName>
<PointWidth>0</PointWidth>
<Type>Column</Type>
<Top>0.125in</Top>
<Title />
<Width>3in</Width>
<Height>3in</Height>
<CategoryGroupings>
<CategoryGrouping>
<StaticCategories>
<StaticMember>
<Label>FY2004</Label>
</StaticMember>
<StaticMember>
<Label>FY2005</Label>
</StaticMember>
</StaticCategories>
</CategoryGrouping>
</CategoryGroupings>
<SeriesGroupings>
<SeriesGrouping>
<DynamicSeries>
<Grouping Name="chart1_SeriesGroup1">
<GroupExpressions>
<GroupExpression>=Fields!Series.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label />
</DynamicSeries>
</SeriesGrouping>
</SeriesGroupings>
<Subtype>Plain</Subtype>
<PlotArea>
<Style>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<Left>0.5in</Left>
<ValueAxis>
<Axis>
<Title />
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<Margin>true</Margin>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>3.75in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>47e7de6a-2997-40c7-aa4c-e4eaacc48fe0</rd:DataSourceID>
<DataSourceReference>Northwind</DataSourceReference>
</DataSource>
</DataSources>
<Width>6.5in</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="FY2004">
<DataField>FY2004</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="FY2005">
<DataField>FY2005</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Series">
<DataField>Series</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>select 191 as FY2004, 195 as FY2005, 'A' as Series
union all
select 188 as FY2004, 183 as FY2005, 'B' as Series</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>0a301010-0cf6-4e19-b90b-73a955e4965b</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>

No comments:

Post a Comment