I'm trying to add expressions that will highlight the
highest/lowest values on a chart, but I'm having some
difficulty.
It's a simple bar chart showing total charges by customer.
In an interesting twist, as I was writing this post VS.NET
has screwed up my project, I get a 'object reference not
set to an instance of an object error' when I double-click
on a chart, or try adding a new one, so I'm writing from
memory.
Category Field : Customer
Data Field : total_charge
The chart displays a bar for each company, plotting the
sum of total_charge's for each company.
I would like to write an expression which can
conditionally format the highest/lowest value on the
chart, which would seem to me to be a fairly
straightforward exercise (and a time-saver as the chart
control has done the grunt work for you), but I can't seem
to be able to do it. The only way I see of doing this is
to create a new dataset/filter to calculate to the
sum/maximum sum for each customer.
I would have thought you could programmatically access the
data the chart is displaying, but so far I've found
little/no documentation on the subject.
I hope this makes sense, any help would be appreciated.You will need SP1 installed to do this. Assuming a chart without series
groupings, you can use an expression like this for the datapoint's color
(highlight maximum values in Red, minimum values in Yellow and all other
values in Green):
=Switch( Sum(Fields!UnitsInStock.Value) =Max(Fields!UnitsInStock.Value,"Chart1"), "Red",
Sum(Fields!UnitsInStock.Value) = Min(Fields!UnitsInStock.Value,"Chart1"),
"Yellow", true, "Green")
Example is attached at the bottom of this posting.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Chris Ashworth" <anonymous@.discussions.microsoft.com> wrote in message
news:193d01c4a186$a9c8b850$a401280a@.phx.gbl...
> I'm trying to add expressions that will highlight the
> highest/lowest values on a chart, but I'm having some
> difficulty.
> It's a simple bar chart showing total charges by customer.
> In an interesting twist, as I was writing this post VS.NET
> has screwed up my project, I get a 'object reference not
> set to an instance of an object error' when I double-click
> on a chart, or try adding a new one, so I'm writing from
> memory.
> Category Field : Customer
> Data Field : total_charge
> The chart displays a bar for each company, plotting the
> sum of total_charge's for each company.
> I would like to write an expression which can
> conditionally format the highest/lowest value on the
> chart, which would seem to me to be a fairly
> straightforward exercise (and a time-saver as the chart
> control has done the grunt work for you), but I can't seem
> to be able to do it. The only way I see of doing this is
> to create a new dataset/filter to calculate to the
> sum/maximum sum for each customer.
> I would have thought you could programmatically access the
> data the chart is displaying, but so far I've found
> little/no documentation on the subject.
> I hope this makes sense, any help would be appreciated.
---
<?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>20</Inclination>
<Shading>Real</Shading>
<WallThickness>25</WallThickness>
<DrawingStyle>Cylinder</DrawingStyle>
<Clustered>true</Clustered>
</ThreeDProperties>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<Color>Firebrick</Color>
</Style>
<Legend>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
<Position>RightCenter</Position>
</Legend>
<Palette>Excel</Palette>
<ChartData>
<ChartSeries>
<DataPoints>
<DataPoint>
<DataValues>
<DataValue>
<Value>=Fields!UnitsInStock.Value</Value>
</DataValue>
</DataValues>
<DataLabel>
<Style />
</DataLabel>
<Style>
<BackgroundColor>=Switch(Sum(Fields!UnitsInStock.Value) =Max(Fields!UnitsInStock.Value,"Chart1"), "Red",
Sum(Fields!UnitsInStock.Value) = Min(Fields!UnitsInStock.Value,"Chart1"),
"Yellow", true, "Green")</BackgroundColor>
</Style>
<Marker>
<Size>6pt</Size>
</Marker>
</DataPoint>
</DataPoints>
</ChartSeries>
</ChartData>
<CategoryAxis>
<Axis>
<Title>
<Style />
</Title>
<Style>
<FontSize>8pt</FontSize>
</Style>
<MajorGridLines>
<Style>
<BorderWidth>
<Default>1.5pt</Default>
</BorderWidth>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderStyle>
<Default>Dotted</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MajorTickMarks>Outside</MajorTickMarks>
<MinorTickMarks>Outside</MinorTickMarks>
<MajorInterval>5</MajorInterval>
<MinorInterval>1</MinorInterval>
<CrossAt>0</CrossAt>
<Margin>true</Margin>
<Visible>true</Visible>
</Axis>
</CategoryAxis>
<DataSetName>Northwind</DataSetName>
<PointWidth>55</PointWidth>
<Type>Bar</Type>
<Top>0.25in</Top>
<Title>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
</Style>
</Title>
<Width>6.375in</Width>
<CategoryGroupings>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="ProductCategory">
<GroupExpressions>
<GroupExpression>=Fields!CategoryName.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label />
</DynamicCategories>
</CategoryGrouping>
<CategoryGrouping>
<DynamicCategories>
<Grouping Name="ProductName">
<GroupExpressions>
<GroupExpression>=Fields!ProductName.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Label>=Fields!ProductName.Value</Label>
</DynamicCategories>
</CategoryGrouping>
</CategoryGroupings>
<Height>3.25in</Height>
<SeriesGroupings>
<SeriesGrouping>
<StaticSeries>
<StaticMember>
<Label>Stock</Label>
</StaticMember>
</StaticSeries>
</SeriesGrouping>
</SeriesGroupings>
<Subtype>Plain</Subtype>
<PlotArea>
<Style>
<BackgroundColor>OldLace</BackgroundColor>
</Style>
</PlotArea>
<Left>0.25in</Left>
<ValueAxis>
<Axis>
<Title>
<Caption>Amount</Caption>
<Style />
</Title>
<Style>
<BorderColor>
<Default>IndianRed</Default>
</BorderColor>
<FontSize>8pt</FontSize>
</Style>
<MajorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderColor>
<Default>Blue</Default>
</BorderColor>
<BorderStyle>
<Default>Dashed</Default>
</BorderStyle>
</Style>
</MajorGridLines>
<MinorGridLines>
<ShowGridLines>true</ShowGridLines>
<Style>
<BorderColor>
<Default>CornflowerBlue</Default>
</BorderColor>
<BorderStyle>
<Default>Dotted</Default>
</BorderStyle>
</Style>
</MinorGridLines>
<MinorTickMarks>Cross</MinorTickMarks>
<Min>0</Min>
<MajorInterval>20</MajorInterval>
<MinorInterval>5</MinorInterval>
<Interlaced>true</Interlaced>
<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>32d95cbf-5e5b-4fb3-a37a-39b9506b8c80</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=(local);initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.75in</Width>
<DataSets>
<DataSet Name="Northwind">
<Fields>
<Field Name="ProductID">
<DataField>ProductID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="ProductName">
<DataField>ProductName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SupplierID">
<DataField>SupplierID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="CategoryID">
<DataField>CategoryID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="QuantityPerUnit">
<DataField>QuantityPerUnit</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="UnitPrice">
<DataField>UnitPrice</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
<Field Name="UnitsInStock">
<DataField>UnitsInStock</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="UnitsOnOrder">
<DataField>UnitsOnOrder</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="ReorderLevel">
<DataField>ReorderLevel</DataField>
<rd:TypeName>System.Int16</rd:TypeName>
</Field>
<Field Name="Discontinued">
<DataField>Discontinued</DataField>
<rd:TypeName>System.Boolean</rd:TypeName>
</Field>
<Field Name="CategoryName">
<DataField>CategoryName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="NullUnits">
<DataField>NullUnits</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT TOP 10 *, NULL AS NullUnits
FROM [Alphabetical list of products]
WHERE (UnitsOnOrder > 0)</CommandText>
<Timeout>30</Timeout>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>4792d607-5639-4c89-ac36-2794e9e78a74</rd:ReportID>
<BottomMargin>1in</BottomMargin>
</Report>|||This may seem like a silly question - but I am new and apologize in advance
... you mentioned in your reply that the example is posted at the bottom of
the post. The xml is there (or is it RDF?) ... how do I use that? I know I
am missing something big here as I have seen many referrals to sending rdf
for debugging purposes ... etc. I dont know how to make use of it though -
can you help me out? I assume I can import it somehow?
"Robert Bruckner [MSFT]" wrote:
> You will need SP1 installed to do this. Assuming a chart without series
> groupings, you can use an expression like this for the datapoint's color
> (highlight maximum values in Red, minimum values in Yellow and all other
> values in Green):
> =Switch( Sum(Fields!UnitsInStock.Value) => Max(Fields!UnitsInStock.Value,"Chart1"), "Red",
> Sum(Fields!UnitsInStock.Value) = Min(Fields!UnitsInStock.Value,"Chart1"),
> "Yellow", true, "Green")
> Example is attached at the bottom of this posting.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Chris Ashworth" <anonymous@.discussions.microsoft.com> wrote in message
> news:193d01c4a186$a9c8b850$a401280a@.phx.gbl...
> > I'm trying to add expressions that will highlight the
> > highest/lowest values on a chart, but I'm having some
> > difficulty.
> >
> > It's a simple bar chart showing total charges by customer.
> >
> > In an interesting twist, as I was writing this post VS.NET
> > has screwed up my project, I get a 'object reference not
> > set to an instance of an object error' when I double-click
> > on a chart, or try adding a new one, so I'm writing from
> > memory.
> >
> > Category Field : Customer
> > Data Field : total_charge
> >
> > The chart displays a bar for each company, plotting the
> > sum of total_charge's for each company.
> >
> > I would like to write an expression which can
> > conditionally format the highest/lowest value on the
> > chart, which would seem to me to be a fairly
> > straightforward exercise (and a time-saver as the chart
> > control has done the grunt work for you), but I can't seem
> > to be able to do it. The only way I see of doing this is
> > to create a new dataset/filter to calculate to the
> > sum/maximum sum for each customer.
> >
> > I would have thought you could programmatically access the
> > data the chart is displaying, but so far I've found
> > little/no documentation on the subject.
> >
> > I hope this makes sense, any help would be appreciated.
> ---
> <?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>20</Inclination>
> <Shading>Real</Shading>
> <WallThickness>25</WallThickness>
> <DrawingStyle>Cylinder</DrawingStyle>
> <Clustered>true</Clustered>
> </ThreeDProperties>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> <Color>Firebrick</Color>
> </Style>
> <Legend>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> <Position>RightCenter</Position>
> </Legend>
> <Palette>Excel</Palette>
> <ChartData>
> <ChartSeries>
> <DataPoints>
> <DataPoint>
> <DataValues>
> <DataValue>
> <Value>=Fields!UnitsInStock.Value</Value>
> </DataValue>
> </DataValues>
> <DataLabel>
> <Style />
> </DataLabel>
> <Style>
> <BackgroundColor>=Switch(Sum(Fields!UnitsInStock.Value) => Max(Fields!UnitsInStock.Value,"Chart1"), "Red",
> Sum(Fields!UnitsInStock.Value) = Min(Fields!UnitsInStock.Value,"Chart1"),
> "Yellow", true, "Green")</BackgroundColor>
> </Style>
> <Marker>
> <Size>6pt</Size>
> </Marker>
> </DataPoint>
> </DataPoints>
> </ChartSeries>
> </ChartData>
> <CategoryAxis>
> <Axis>
> <Title>
> <Style />
> </Title>
> <Style>
> <FontSize>8pt</FontSize>
> </Style>
> <MajorGridLines>
> <Style>
> <BorderWidth>
> <Default>1.5pt</Default>
> </BorderWidth>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </MajorGridLines>
> <MinorGridLines>
> <ShowGridLines>true</ShowGridLines>
> <Style>
> <BorderStyle>
> <Default>Dotted</Default>
> </BorderStyle>
> </Style>
> </MinorGridLines>
> <MajorTickMarks>Outside</MajorTickMarks>
> <MinorTickMarks>Outside</MinorTickMarks>
> <MajorInterval>5</MajorInterval>
> <MinorInterval>1</MinorInterval>
> <CrossAt>0</CrossAt>
> <Margin>true</Margin>
> <Visible>true</Visible>
> </Axis>
> </CategoryAxis>
> <DataSetName>Northwind</DataSetName>
> <PointWidth>55</PointWidth>
> <Type>Bar</Type>
> <Top>0.25in</Top>
> <Title>
> <Style>
> <BorderStyle>
> <Default>Solid</Default>
> </BorderStyle>
> </Style>
> </Title>
> <Width>6.375in</Width>
> <CategoryGroupings>
> <CategoryGrouping>
> <DynamicCategories>
> <Grouping Name="ProductCategory">
> <GroupExpressions>
> <GroupExpression>=Fields!CategoryName.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> <Label />
> </DynamicCategories>
> </CategoryGrouping>
> <CategoryGrouping>
> <DynamicCategories>
> <Grouping Name="ProductName">
> <GroupExpressions>
> <GroupExpression>=Fields!ProductName.Value</GroupExpression>
> </GroupExpressions>
> </Grouping>
> <Label>=Fields!ProductName.Value</Label>
> </DynamicCategories>
> </CategoryGrouping>
> </CategoryGroupings>
> <Height>3.25in</Height>
> <SeriesGroupings>
> <SeriesGrouping>
> <StaticSeries>
> <StaticMember>
> <Label>Stock</Label>
> </StaticMember>
> </StaticSeries>
> </SeriesGrouping>
> </SeriesGroupings>
> <Subtype>Plain</Subtype>
> <PlotArea>
> <Style>
> <BackgroundColor>OldLace</BackgroundColor>
> </Style>
> </PlotArea>
> <Left>0.25in</Left>
> <ValueAxis>
> <Axis>
> <Title>
> <Caption>Amount</Caption>
> <Style />
> </Title>
> <Style>
> <BorderColor>
> <Default>IndianRed</Default>
> </BorderColor>
> <FontSize>8pt</FontSize>
> </Style>
> <MajorGridLines>
> <ShowGridLines>true</ShowGridLines>
> <Style>
> <BorderColor>
> <Default>Blue</Default>
> </BorderColor>
> <BorderStyle>
> <Default>Dashed</Default>
> </BorderStyle>
> </Style>
> </MajorGridLines>
> <MinorGridLines>
> <ShowGridLines>true</ShowGridLines>
> <Style>
> <BorderColor>
> <Default>CornflowerBlue</Default>
> </BorderColor>
> <BorderStyle>
> <Default>Dotted</Default>
> </BorderStyle>
> </Style>
> </MinorGridLines>
> <MinorTickMarks>Cross</MinorTickMarks>
> <Min>0</Min>
> <MajorInterval>20</MajorInterval>
> <MinorInterval>5</MinorInterval>
> <Interlaced>true</Interlaced>
> <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>32d95cbf-5e5b-4fb3-a37a-39b9506b8c80</rd:DataSourceID>
> <ConnectionProperties>
> <DataProvider>SQL</DataProvider>
> <ConnectString>data source=(local);initial
> catalog=Northwind</ConnectString>
> <IntegratedSecurity>true</IntegratedSecurity>
> </ConnectionProperties>
> </DataSource>
> </DataSources>
> <Width>6.75in</Width>
> <DataSets>
> <DataSet Name="Northwind">
> <Fields>
> <Field Name="ProductID">
> <DataField>ProductID</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> <Field Name="ProductName">
> <DataField>ProductName</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="SupplierID">
> <DataField>SupplierID</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> <Field Name="CategoryID">
> <DataField>CategoryID</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> <Field Name="QuantityPerUnit">
> <DataField>QuantityPerUnit</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="UnitPrice">
> <DataField>UnitPrice</DataField>
> <rd:TypeName>System.Decimal</rd:TypeName>
> </Field>
> <Field Name="UnitsInStock">
> <DataField>UnitsInStock</DataField>
> <rd:TypeName>System.Int16</rd:TypeName>
> </Field>
> <Field Name="UnitsOnOrder">
> <DataField>UnitsOnOrder</DataField>
> <rd:TypeName>System.Int16</rd:TypeName>
> </Field>
> <Field Name="ReorderLevel">
> <DataField>ReorderLevel</DataField>
> <rd:TypeName>System.Int16</rd:TypeName>
> </Field>
> <Field Name="Discontinued">
> <DataField>Discontinued</DataField>
> <rd:TypeName>System.Boolean</rd:TypeName>
> </Field>
> <Field Name="CategoryName">
> <DataField>CategoryName</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="NullUnits">
> <DataField>NullUnits</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> </Fields>
> <Query>
> <DataSourceName>Northwind</DataSourceName>
> <CommandText>SELECT TOP 10 *, NULL AS NullUnits
> FROM [Alphabetical list of products]
> WHERE (UnitsOnOrder > 0)</CommandText>
> <Timeout>30</Timeout>
> </Query>
> </DataSet>
> </DataSets>
> <LeftMargin>1in</LeftMargin>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <rd:DrawGrid>true</rd:DrawGrid>
> <rd:ReportID>4792d607-5639-4c89-ac36-2794e9e78a74</rd:ReportID>
> <BottomMargin>1in</BottomMargin>
> </Report>
>
>
>|||The xml posted *is* an RDF. Simply copy the contents into a text file and
rename it reportname.rdf. You may need to take out extra line breaks if
your news reader put them in. You can then open the RDF in Visual Studio to
look at it.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"MJ Taft" <MJTaft@.discussions.microsoft.com> wrote in message
news:FF6E1562-E602-43C3-B583-C24D8BEB3B2D@.microsoft.com...
> This may seem like a silly question - but I am new and apologize in
> advance
> ... you mentioned in your reply that the example is posted at the bottom
> of
> the post. The xml is there (or is it RDF?) ... how do I use that? I know
> I
> am missing something big here as I have seen many referrals to sending rdf
> for debugging purposes ... etc. I dont know how to make use of it
> though -
> can you help me out? I assume I can import it somehow?
> "Robert Bruckner [MSFT]" wrote:
>> You will need SP1 installed to do this. Assuming a chart without series
>> groupings, you can use an expression like this for the datapoint's color
>> (highlight maximum values in Red, minimum values in Yellow and all other
>> values in Green):
>> =Switch( Sum(Fields!UnitsInStock.Value) =>> Max(Fields!UnitsInStock.Value,"Chart1"), "Red",
>> Sum(Fields!UnitsInStock.Value) = Min(Fields!UnitsInStock.Value,"Chart1"),
>> "Yellow", true, "Green")
>> Example is attached at the bottom of this posting.
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Chris Ashworth" <anonymous@.discussions.microsoft.com> wrote in message
>> news:193d01c4a186$a9c8b850$a401280a@.phx.gbl...
>> > I'm trying to add expressions that will highlight the
>> > highest/lowest values on a chart, but I'm having some
>> > difficulty.
>> >
>> > It's a simple bar chart showing total charges by customer.
>> >
>> > In an interesting twist, as I was writing this post VS.NET
>> > has screwed up my project, I get a 'object reference not
>> > set to an instance of an object error' when I double-click
>> > on a chart, or try adding a new one, so I'm writing from
>> > memory.
>> >
>> > Category Field : Customer
>> > Data Field : total_charge
>> >
>> > The chart displays a bar for each company, plotting the
>> > sum of total_charge's for each company.
>> >
>> > I would like to write an expression which can
>> > conditionally format the highest/lowest value on the
>> > chart, which would seem to me to be a fairly
>> > straightforward exercise (and a time-saver as the chart
>> > control has done the grunt work for you), but I can't seem
>> > to be able to do it. The only way I see of doing this is
>> > to create a new dataset/filter to calculate to the
>> > sum/maximum sum for each customer.
>> >
>> > I would have thought you could programmatically access the
>> > data the chart is displaying, but so far I've found
>> > little/no documentation on the subject.
>> >
>> > I hope this makes sense, any help would be appreciated.
>> ---
>> <?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>20</Inclination>
>> <Shading>Real</Shading>
>> <WallThickness>25</WallThickness>
>> <DrawingStyle>Cylinder</DrawingStyle>
>> <Clustered>true</Clustered>
>> </ThreeDProperties>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> <Color>Firebrick</Color>
>> </Style>
>> <Legend>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> </Style>
>> <Position>RightCenter</Position>
>> </Legend>
>> <Palette>Excel</Palette>
>> <ChartData>
>> <ChartSeries>
>> <DataPoints>
>> <DataPoint>
>> <DataValues>
>> <DataValue>
>> <Value>=Fields!UnitsInStock.Value</Value>
>> </DataValue>
>> </DataValues>
>> <DataLabel>
>> <Style />
>> </DataLabel>
>> <Style>
>> <BackgroundColor>=Switch(Sum(Fields!UnitsInStock.Value)
>> =>> Max(Fields!UnitsInStock.Value,"Chart1"), "Red",
>> Sum(Fields!UnitsInStock.Value) = Min(Fields!UnitsInStock.Value,"Chart1"),
>> "Yellow", true, "Green")</BackgroundColor>
>> </Style>
>> <Marker>
>> <Size>6pt</Size>
>> </Marker>
>> </DataPoint>
>> </DataPoints>
>> </ChartSeries>
>> </ChartData>
>> <CategoryAxis>
>> <Axis>
>> <Title>
>> <Style />
>> </Title>
>> <Style>
>> <FontSize>8pt</FontSize>
>> </Style>
>> <MajorGridLines>
>> <Style>
>> <BorderWidth>
>> <Default>1.5pt</Default>
>> </BorderWidth>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> </Style>
>> </MajorGridLines>
>> <MinorGridLines>
>> <ShowGridLines>true</ShowGridLines>
>> <Style>
>> <BorderStyle>
>> <Default>Dotted</Default>
>> </BorderStyle>
>> </Style>
>> </MinorGridLines>
>> <MajorTickMarks>Outside</MajorTickMarks>
>> <MinorTickMarks>Outside</MinorTickMarks>
>> <MajorInterval>5</MajorInterval>
>> <MinorInterval>1</MinorInterval>
>> <CrossAt>0</CrossAt>
>> <Margin>true</Margin>
>> <Visible>true</Visible>
>> </Axis>
>> </CategoryAxis>
>> <DataSetName>Northwind</DataSetName>
>> <PointWidth>55</PointWidth>
>> <Type>Bar</Type>
>> <Top>0.25in</Top>
>> <Title>
>> <Style>
>> <BorderStyle>
>> <Default>Solid</Default>
>> </BorderStyle>
>> </Style>
>> </Title>
>> <Width>6.375in</Width>
>> <CategoryGroupings>
>> <CategoryGrouping>
>> <DynamicCategories>
>> <Grouping Name="ProductCategory">
>> <GroupExpressions>
>> <GroupExpression>=Fields!CategoryName.Value</GroupExpression>
>> </GroupExpressions>
>> </Grouping>
>> <Label />
>> </DynamicCategories>
>> </CategoryGrouping>
>> <CategoryGrouping>
>> <DynamicCategories>
>> <Grouping Name="ProductName">
>> <GroupExpressions>
>> <GroupExpression>=Fields!ProductName.Value</GroupExpression>
>> </GroupExpressions>
>> </Grouping>
>> <Label>=Fields!ProductName.Value</Label>
>> </DynamicCategories>
>> </CategoryGrouping>
>> </CategoryGroupings>
>> <Height>3.25in</Height>
>> <SeriesGroupings>
>> <SeriesGrouping>
>> <StaticSeries>
>> <StaticMember>
>> <Label>Stock</Label>
>> </StaticMember>
>> </StaticSeries>
>> </SeriesGrouping>
>> </SeriesGroupings>
>> <Subtype>Plain</Subtype>
>> <PlotArea>
>> <Style>
>> <BackgroundColor>OldLace</BackgroundColor>
>> </Style>
>> </PlotArea>
>> <Left>0.25in</Left>
>> <ValueAxis>
>> <Axis>
>> <Title>
>> <Caption>Amount</Caption>
>> <Style />
>> </Title>
>> <Style>
>> <BorderColor>
>> <Default>IndianRed</Default>
>> </BorderColor>
>> <FontSize>8pt</FontSize>
>> </Style>
>> <MajorGridLines>
>> <ShowGridLines>true</ShowGridLines>
>> <Style>
>> <BorderColor>
>> <Default>Blue</Default>
>> </BorderColor>
>> <BorderStyle>
>> <Default>Dashed</Default>
>> </BorderStyle>
>> </Style>
>> </MajorGridLines>
>> <MinorGridLines>
>> <ShowGridLines>true</ShowGridLines>
>> <Style>
>> <BorderColor>
>> <Default>CornflowerBlue</Default>
>> </BorderColor>
>> <BorderStyle>
>> <Default>Dotted</Default>
>> </BorderStyle>
>> </Style>
>> </MinorGridLines>
>> <MinorTickMarks>Cross</MinorTickMarks>
>> <Min>0</Min>
>> <MajorInterval>20</MajorInterval>
>> <MinorInterval>5</MinorInterval>
>> <Interlaced>true</Interlaced>
>> <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>32d95cbf-5e5b-4fb3-a37a-39b9506b8c80</rd:DataSourceID>
>> <ConnectionProperties>
>> <DataProvider>SQL</DataProvider>
>> <ConnectString>data source=(local);initial
>> catalog=Northwind</ConnectString>
>> <IntegratedSecurity>true</IntegratedSecurity>
>> </ConnectionProperties>
>> </DataSource>
>> </DataSources>
>> <Width>6.75in</Width>
>> <DataSets>
>> <DataSet Name="Northwind">
>> <Fields>
>> <Field Name="ProductID">
>> <DataField>ProductID</DataField>
>> <rd:TypeName>System.Int32</rd:TypeName>
>> </Field>
>> <Field Name="ProductName">
>> <DataField>ProductName</DataField>
>> <rd:TypeName>System.String</rd:TypeName>
>> </Field>
>> <Field Name="SupplierID">
>> <DataField>SupplierID</DataField>
>> <rd:TypeName>System.Int32</rd:TypeName>
>> </Field>
>> <Field Name="CategoryID">
>> <DataField>CategoryID</DataField>
>> <rd:TypeName>System.Int32</rd:TypeName>
>> </Field>
>> <Field Name="QuantityPerUnit">
>> <DataField>QuantityPerUnit</DataField>
>> <rd:TypeName>System.String</rd:TypeName>
>> </Field>
>> <Field Name="UnitPrice">
>> <DataField>UnitPrice</DataField>
>> <rd:TypeName>System.Decimal</rd:TypeName>
>> </Field>
>> <Field Name="UnitsInStock">
>> <DataField>UnitsInStock</DataField>
>> <rd:TypeName>System.Int16</rd:TypeName>
>> </Field>
>> <Field Name="UnitsOnOrder">
>> <DataField>UnitsOnOrder</DataField>
>> <rd:TypeName>System.Int16</rd:TypeName>
>> </Field>
>> <Field Name="ReorderLevel">
>> <DataField>ReorderLevel</DataField>
>> <rd:TypeName>System.Int16</rd:TypeName>
>> </Field>
>> <Field Name="Discontinued">
>> <DataField>Discontinued</DataField>
>> <rd:TypeName>System.Boolean</rd:TypeName>
>> </Field>
>> <Field Name="CategoryName">
>> <DataField>CategoryName</DataField>
>> <rd:TypeName>System.String</rd:TypeName>
>> </Field>
>> <Field Name="NullUnits">
>> <DataField>NullUnits</DataField>
>> <rd:TypeName>System.Int32</rd:TypeName>
>> </Field>
>> </Fields>
>> <Query>
>> <DataSourceName>Northwind</DataSourceName>
>> <CommandText>SELECT TOP 10 *, NULL AS NullUnits
>> FROM [Alphabetical list of products]
>> WHERE (UnitsOnOrder > 0)</CommandText>
>> <Timeout>30</Timeout>
>> </Query>
>> </DataSet>
>> </DataSets>
>> <LeftMargin>1in</LeftMargin>
>> <rd:SnapToGrid>true</rd:SnapToGrid>
>> <rd:DrawGrid>true</rd:DrawGrid>
>> <rd:ReportID>4792d607-5639-4c89-ac36-2794e9e78a74</rd:ReportID>
>> <BottomMargin>1in</BottomMargin>
>> </Report>
>>
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment