Monday, March 19, 2012
Mix Scatter and Line in Reporting Services Charts
'expected'. I can mix bar and line but not scatter and line. Also tried to
over-lay two chart (which of course fails when viewed in html.As you have already found out - the approach of overlapping charts does only
work for image-based renderers (e.g. Preview, PDF, TIFF), but not for HTML.
It is possible to achieve what you want with a "scatter line" chart natively
in RS 2000 SP1. However, this is not trivial and the shown approach has the
limitation that you cannot use the default chart legend (you may want to
check my custom legend sample available either in the archives of this
newsgroups or on Brian Welcker's blog:
http://blogs.msdn.com/bwelcker/archive/2005/05/20/420349.aspx).
In addition, you would need to prepare the data in a special way (e.g. with
a stored procedure) so that it contains both, the individual datapoints as
well as the line data. Attached is a sample RDL - it will require some
careful study! It is just a proof of concept that it is possible to do this
in RS 2000 SP1.
The RDL sample is copy&pasted to the bottom of this posting.
--
Robert M. Bruckner
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"GH" <GH@.discussions.microsoft.com> wrote in message
news:6E0AA4E3-B6E6-4CBC-91DC-4A1C6028CE70@.microsoft.com...
>I want to display the data points as a scatter chart with a line for
> 'expected'. I can mix bar and line but not scatter and line. Also tried
> to
> over-lay two chart (which of course fails when viewed in html.
=============================================================
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
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>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Position>RightCenter</Position>
</Legend>
<Palette>Default</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Sum(Fields!X.Value)</Value>
</DataValue>
<DataValue>
<Value>=Sum(Fields!Y.Value)</Value>
</DataValue>
</DataValues>
<DataLabel />
<Style>
<BorderWidth>
<Default>3pt</Default>
</BorderWidth>
<BorderColor>
<Default>=iif(Fields!SeriesId.Value >= 100,
iif(Fields!SeriesId.Value >= 200, "DodgerBlue", "GreenYellow"),
Nothing)</Default>
</BorderColor>
<BorderStyle>
<Default>Dotted</Default>
</BorderStyle>
</Style>
<Marker>
<Type>Square</Type>
<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>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</CategoryAxis>
<DataSetName>DataSet1</DataSetName>
<PointWidth>0</PointWidth>
<Type>Scatter</Type>
<Top>0.125in</Top>
<Title />
<Width>4.75in</Width>
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="chart1_CategoryGroup1">
<GroupExpressions>
<GroupExpression>=Fields!Id.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!Id.Value</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Height>3.875in</Height>
<SeriesGroupings>
<SeriesGrouping>
<DynamicSeries>
<Grouping Name="chart1_SeriesGroup1">
<GroupExpressions>
<GroupExpression>=Fields!SeriesId.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!SeriesId.Value</Label>
</DynamicSeries>
</SeriesGrouping>
</SeriesGroupings>
<Subtype>SmoothLine</Subtype>
<PlotArea>
<Style>
<BackgroundColor>LightGrey</BackgroundColor>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</PlotArea>
<Left>0.625in</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>
<Min>0</Min>
<Margin>true</Margin>
<Visible>true</Visible>
<Scalar>true</Scalar>
</Axis>
</ValueAxis>
</Chart>
</ReportItems>
<Style />
<Height>4.375in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>43c9f73e-1490-476c-8572-d6b0d099d9a8</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=(local);initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.5in</Width>
<DataSets>
<DataSet Name="DataSet1">
<Fields>
<Field Name="Id">
<DataField>Id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="SeriesId">
<DataField>SeriesId</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="X">
<DataField>X</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="Y">
<DataField>Y</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>select 10 as Id, 0 as SeriesId, 1 as X, 1 as Y union
all
select 11 as Id, 0 as SeriesId, 1.6 as X, 1.4 as Y union all
select 12 as Id, 0 as SeriesId, 2.7 as X, 3 as Y union all
select 13 as Id, 0 as SeriesId, 4 as X, 4 as Y union all
select 20 as Id, 1 as SeriesId, 1.5 as X, 2 as Y union all
select 21 as Id, 1 as SeriesId, 4 as X, 3 as Y union all
select 100 as Id, 100 as SeriesId, 1.2 as X, 1.0 as Y union all
select 101 as Id, 101 as SeriesId, 1.7 as X, 1.5 as Y union all
select 102 as Id, 102 as SeriesId, 1.9 as X, 2.2 as Y union all
select 103 as Id, 103 as SeriesId, 2.3 as X, 2.7 as Y union all
select 104 as Id, 104 as SeriesId, 3.0 as X, 3.1 as Y union all
select 105 as Id, 105 as SeriesId, 3.7 as X, 3.8 as Y union all
select 200 as Id, 200 as SeriesId, 1.6 as X, 2.2 as Y union all
select 201 as Id, 201 as SeriesId, 1.9 as X, 2.3 as Y union all
select 202 as Id, 202 as SeriesId, 2.3 as X, 2.4 as Y union all
select 203 as Id, 203 as SeriesId, 2.9 as X, 2.5 as Y union all
select 204 as Id, 204 as SeriesId, 3.3 as X, 2.9 as Y union all
select 205 as Id, 205 as SeriesId, 3.8 as X, 3.0 as Y</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>70f720a6-1b18-43f1-a9d5-2d24de087995</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>|||Did you mean you can mix Bar and line in a chart? If yes, how did you do it?
Thanks in advance.
"GH" wrote:
> I want to display the data points as a scatter chart with a line for
> 'expected'. I can mix bar and line but not scatter and line. Also tried to
> over-lay two chart (which of course fails when viewed in html.|||You can display individual items up to render as lines.
Set the chart up to be a bar chart. Add 2 values. Go to properties for the
2nd value and [I think] go to the 2nd tab. There should be a check box for
"Display or Render as Line".
"jxu" <jxu@.discussions.microsoft.com> wrote in message
news:AE549848-174D-41D0-B20F-90CBFD34BF55@.microsoft.com...
> Did you mean you can mix Bar and line in a chart? If yes, how did you do
> it?
> Thanks in advance.
> "GH" wrote:
>> I want to display the data points as a scatter chart with a line for
>> 'expected'. I can mix bar and line but not scatter and line. Also tried
>> to
>> over-lay two chart (which of course fails when viewed in html.|||I posted a question regarding this scenario and how it effects the legend. I
created the chart you described below but now the legend also got updated
with a second series and I do not want this. The line I plotted does not
require legend entries. How do I get rid of these?
"Tim Dot NoSpam" wrote:
> You can display individual items up to render as lines.
> Set the chart up to be a bar chart. Add 2 values. Go to properties for the
> 2nd value and [I think] go to the 2nd tab. There should be a check box for
> "Display or Render as Line".
> "jxu" <jxu@.discussions.microsoft.com> wrote in message
> news:AE549848-174D-41D0-B20F-90CBFD34BF55@.microsoft.com...
> > Did you mean you can mix Bar and line in a chart? If yes, how did you do
> > it?
> > Thanks in advance.
> >
> > "GH" wrote:
> >
> >> I want to display the data points as a scatter chart with a line for
> >> 'expected'. I can mix bar and line but not scatter and line. Also tried
> >> to
> >> over-lay two chart (which of course fails when viewed in html.
>
>
Saturday, February 25, 2012
Missing labels in chart bar the X axis
Hi All
I have a report with a bar chart. Within each category of the bar chart I have 3 bars that are compared with each other.
The problem is that not all the categories labels are shown, even though there is enough free space on the axis (the font is very small).
Can I configure the chart thus all the values will apear?
Thank you.
In the chart properties dialog, go to the x-axis tab and turn on "margins" for the x-axis. This should always resolve the issue.
-- Robert
|||Robert:
This action does not seem to work when using the "cross at" parameter on the same axis.
|||This action does not seem to work at all... the "Side margins" is allready turned on
Do you have any other idea?
Thanks
Monday, February 20, 2012
Missing Elements in Report Manager
I can connect to the SQL Server without problem, and I can browse to the URL containing report manager
Interestingly, I had access to all of this a couple of weeks ago and then all of this suddenly happened. All the other developers have no problems and I am a member of the group which has access.
Any ideas?
Thanks in advance!
JohnMIt sounds like the permission are not set correctly. Perhaps you user account has been specified with more restrictive permissions?|||
Hi John,
Have you managed to resolve the issue? I have the exact same problem! :(
Kind Regards,
Casey.
|||Has anyone figured this out? I have run into this exact issue and can not figure it out. All rights appear correct.
If there is a fix, can you please email me at mradomski@.lpsintegration.com
Missing Elements in Report Manager
I can connect to the SQL Server without problem, and I can browse to the URL containing report manager
Interestingly, I had access to all of this a couple of weeks ago and then all of this suddenly happened. All the other developers have no problems and I am a member of the group which has access.
Any ideas?
Thanks in advance!
JohnMIt sounds like the permission are not set correctly. Perhaps you user account has been specified with more restrictive permissions?|||
Hi John,
Have you managed to resolve the issue? I have the exact same problem! :(
Kind Regards,
Casey.
|||Has anyone figured this out? I have run into this exact issue and can not figure it out. All rights appear correct.
If there is a fix, can you please email me at mradomski@.lpsintegration.com
Missing Elements in Report Manager
I can connect to the SQL Server without problem, and I can browse to the URL containing report manager
Interestingly, I had access to all of this a couple of weeks ago and then all of this suddenly happened. All the other developers have no problems and I am a member of the group which has access.
Any ideas?
Thanks in advance!
JohnMIt sounds like the permission are not set correctly. Perhaps you user account has been specified with more restrictive permissions?|||
Hi John,
Have you managed to resolve the issue? I have the exact same problem! :(
Kind Regards,
Casey.
|||Has anyone figured this out? I have run into this exact issue and can not figure it out. All rights appear correct.
If there is a fix, can you please email me at mradomski@.lpsintegration.com