Friday, March 30, 2012
Modify Chart Y-Scale
I have the following Problem:
I have to do a Graphical analysis from a survey, for that i decided to use
the ReportingServices for VS.NET.
And for the Data Displaying i took the Chart object.
The Data is placed correctly into the chart, but there is one problem.
For the Y-Scale i defined a maximum (4) and a minimum (0) value. (this works)
But now for the Scale-Display i dont want to show 0 - 1 - 2 - 3 - 4 on the
side, i want to put C - B - A - A+ - A++.
I tried so many ways to force that, but it never worked. I already tried to
set the Letters by IIF() Statements, i tried to detect the right letter by
scanning the scale with chart1.ValueAxis. and so on.
Im really thankful for your help
thank you, greetings
Marcel GaufroidDid you look into Bar charts (they flip X- and Y-axis)? You could define 5
static series values which represent the groups C, B, A, A+, A++ and show
the values along the X-axis.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Marcel Gaufroid / cyrex" <Marcel Gaufroid /
cyrex@.discussions.microsoft.com> wrote in message
news:3D8FEEBE-72FE-4605-8999-987F4CE83225@.microsoft.com...
> Hi
> I have the following Problem:
> I have to do a Graphical analysis from a survey, for that i decided to use
> the ReportingServices for VS.NET.
> And for the Data Displaying i took the Chart object.
> The Data is placed correctly into the chart, but there is one problem.
> For the Y-Scale i defined a maximum (4) and a minimum (0) value. (this
works)
> But now for the Scale-Display i dont want to show 0 - 1 - 2 - 3 - 4 on the
> side, i want to put C - B - A - A+ - A++.
> I tried so many ways to force that, but it never worked. I already tried
to
> set the Letters by IIF() Statements, i tried to detect the right letter by
> scanning the scale with chart1.ValueAxis. and so on.
> Im really thankful for your help
> thank you, greetings
> Marcel Gaufroid|||wich Bar charts?
i have a Simple-Scatter Chart.
"Robert Bruckner [MSFT]" wrote:
> Did you look into Bar charts (they flip X- and Y-axis)? You could define 5
> static series values which represent the groups C, B, A, A+, A++ and show
> the values along the X-axis.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Marcel Gaufroid / cyrex" <Marcel Gaufroid /
> cyrex@.discussions.microsoft.com> wrote in message
> news:3D8FEEBE-72FE-4605-8999-987F4CE83225@.microsoft.com...
> > Hi
> >
> > I have the following Problem:
> >
> > I have to do a Graphical analysis from a survey, for that i decided to use
> > the ReportingServices for VS.NET.
> > And for the Data Displaying i took the Chart object.
> >
> > The Data is placed correctly into the chart, but there is one problem.
> >
> > For the Y-Scale i defined a maximum (4) and a minimum (0) value. (this
> works)
> > But now for the Scale-Display i dont want to show 0 - 1 - 2 - 3 - 4 on the
> > side, i want to put C - B - A - A+ - A++.
> >
> > I tried so many ways to force that, but it never worked. I already tried
> to
> > set the Letters by IIF() Statements, i tried to detect the right letter by
> > scanning the scale with chart1.ValueAxis. and so on.
> >
> > Im really thankful for your help
> >
> > thank you, greetings
> > Marcel Gaufroid
>
>|||i also got the problem now that just one point is shown on the Chart the
first), the others arent shown. why is that?
i havent used any aggregate functions ... :(
"Marcel Gaufroid / cyrex" wrote:
> Hi
> I have the following Problem:
> I have to do a Graphical analysis from a survey, for that i decided to use
> the ReportingServices for VS.NET.
> And for the Data Displaying i took the Chart object.
> The Data is placed correctly into the chart, but there is one problem.
> For the Y-Scale i defined a maximum (4) and a minimum (0) value. (this works)
> But now for the Scale-Display i dont want to show 0 - 1 - 2 - 3 - 4 on the
> side, i want to put C - B - A - A+ - A++.
> I tried so many ways to force that, but it never worked. I already tried to
> set the Letters by IIF() Statements, i tried to detect the right letter by
> scanning the scale with chart1.ValueAxis. and so on.
> Im really thankful for your help
> thank you, greetings
> Marcel Gaufroid
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.
>
>
Wednesday, March 7, 2012
Missing parameter, no chart displayed
I've got a report with a chart with some values that are needed to get the chart displayed.
If one of this parameters is missing (not selected) the program doesn't display the report (it shows a blank page)
Is it possible in this case to get instead a textbox with a message requiring to select the missing parameter (if I insert a textbox below the chart in the layout, this textbox isn't displayed if one parameter is missing)
ps sorry for my poor english
thanks in advance for your helpI believe what you want can be accomplished by making sure each parameter is set to NOT allow blank value. Just go to "Report" -> "Report Parameters" and make sure the "Allow blank value" checkbox is unchecked for each parameter. Then, the report will not be generated and a popup box will be displayed if the user doesn't enter a value.|||
Thank you for your answer.
But the problem is that I would like to display a warning to the user to suggest him to select the missing parameter (in my case choosing from a scrolling menu).
The parameter is multivalue so i would like to avoid to displaying a default value, but I would like the user to choose.
The application does not seem to allow this.
In fact if I add a textbox, it's not displayed unless also the chart is displayed.
So if the parameter is missing, no chart will be displayed and so the textbox too.
No object is being shown unless all the parameters are selected and only in this case the chart can be displayed... but as I said I would like to display this warning when a parameter is not selected.
How can I do this?
ps: sorry if I'm a little redundant
|||If what you want is a message to be displayed to the user to choose a value, then you should be able to accomplish this by unchecking the "Allow blank value" option as stated above.
For example, if there are two parameters say "Type" and "Subtype" but the user only selects "Type" and leaves "Subtype" blank, then once the user clicks "View Report" a popup message will be displayed to the user saying...
"Please enter a value for the parameter 'Subtype'. The parameter cannot be blank."
|||Thanks for helping me :)The pop up appears but I would like this message to show in the report layout but BEFORE ckliking on "view report"...just a simple generical message saying to the user something like "please choose a value for the X parameter and THEN click on view report"
The message is a sort of "guide".
I thought I can do this by placing a textbox but it seems that the textbox is linked to the chart (no chart no textbox)...i know it seems a stupid problem but unfortunatly I was asked to do this work this way.|||
Well, there is one way to generate a textbox in the report even without having a paremeter selected. Simply make sure all parameters are set to "Allow blank value" and "Allow null value". Then, create a textbox where the visibility is set to an expression, where it will only be displayed if any parameter is blank. Also, be sure to make the rest of the report items the opposite of that expression, i.e. they are only visible if all values are entered.
For example, Visibility -> Hidden = Iif(IsNothing(Parameters!ParameterName.Value) OrElse Parameters!ParameterName.Value.Equals(""), False, True)
This way the textbox will show up in the report whenever the user doesn't select a parameter value. However, the report will not autodetect the new values entered until the user clicks "View Report."
Good luck!!
|||Hi, thank you for your answer.Unfortunatly I don't seem to be able to set "allow null value" for the parameter I'm interested in, cause the application says that the properties for that object are invalid.
That object is a multi-value string available values from query.
So your suggestion does not work. :(
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
Missing Labels in Chart
I have a line chart that has several series, and it routinely leaves off 1 or 2 point labels on the last X-axis.
Is anyone else experiencing this? If so, does anyone know what the cause is, and is there a fix?
Thanks!
BobP
There is a setting in the X-Axis tab for major and minor interval. Try setting one of them to 1.|||They are both set to 1 and still no labels.
BobP
|||I am missing point labels (on bar charts) too, seems to happen when there are an odd number of instances of a grouping on the x axis. It is always the last bar that is missing the point label too.
Is this a bug in SSRS, or a misunderstanding on my part?
|||One way around this is to turn on margins on the x-axis.
-- Robert
|||Thanks, that works OK now.....Missing Labels in Chart
I have a line chart that has several series, and it routinely leaves off 1 or 2 point labels on the last X-axis.
Is anyone else experiencing this? If so, does anyone know what the cause is, and is there a fix?
Thanks!
BobP
There is a setting in the X-Axis tab for major and minor interval. Try setting one of them to 1.|||They are both set to 1 and still no labels.
BobP
|||I am missing point labels (on bar charts) too, seems to happen when there are an odd number of instances of a grouping on the x axis. It is always the last bar that is missing the point label too.
Is this a bug in SSRS, or a misunderstanding on my part?
|||One way around this is to turn on margins on the x-axis.
-- Robert
|||Thanks, that works OK now.....