Reporting services Reporting Services中的复杂图?

Reporting services Reporting Services中的复杂图?,reporting-services,Reporting Services,我试图模仿这张图,或者尽可能接近: 特点: 底部的代码(需要有) 侧面费率(需要有) 今年的数据集和去年的数据集(需要有) 向上和向下指示改善/恶化(很好) 我知道如何在Excel中创建它: 为这两个数据集创建一个折线图 在图形的属性中,删除线 插入,然后根据需要设置向上栏和向下栏的格式 我在Reporting Services的布局视图中做到了这一点: 这是一个趋势线被禁用的折线图。没有上杆/下杆,但这是可以接受的 问题是,当我切换到“预览/发布”视图时,它会变成这样: 所有的线

我试图模仿这张图,或者尽可能接近:

特点:

  • 底部的代码(需要有)
  • 侧面费率(需要有)
  • 今年的数据集和去年的数据集(需要有)
  • 向上和向下指示改善/恶化(很好)
我知道如何在Excel中创建它:

  • 为这两个数据集创建一个折线图
  • 在图形的属性中,删除线
  • 插入,然后根据需要设置向上栏和向下栏的格式
我在Reporting Services的布局视图中做到了这一点:

这是一个趋势线被禁用的折线图。没有上杆/下杆,但这是可以接受的

问题是,当我切换到“预览/发布”视图时,它会变成这样:

所有的线条都是无缘无故出现的

我发布了一个先前(现在已删除)的问题,征求对此的建议,并收到了使用散点图的建议。但除非我遗漏了什么,否则散点图需要两个数字轴?当我尝试在“Y值”字段中删除“Rate”值时,我得到错误“value不能为null。参数名称:value”(没有报告参数“value”)。它似乎也不能在一个轴上有两个数据集

那么,我应该怎么做?有没有办法让趋势线在预览/发布视图中消失?或者,有没有办法让散点图来完成我想要的?或者其他一些简单的图表


编辑:这是Reporting Services 2005中的内容,所以您知道。

RDL如下。我只是使用所有东西的默认值。出于某种原因,我不得不为图表设置颜色以显示任何内容。而且你也必须填补高和低。我只是把开盘和收盘的平均数放进去,这样它们就不会出现了

编辑:修改为包含十字和菱形。我将一个新系列的所有值设置为去年,然后只打开标记。今年我又做了同样的事情。他们的位置似乎并不理想,但这是我能做的最好的了

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <DataSources>
    <DataSource Name="DataSource1">
      <rd:DataSourceID>892866e1-c006-4497-9545-251d2a43feb0</rd:DataSourceID>
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString>Data Source=rover4;Initial Catalog=master</ConnectString>
        <IntegratedSecurity>true</IntegratedSecurity>
      </ConnectionProperties>
    </DataSource>
  </DataSources>
  <InteractiveHeight>29.7cm</InteractiveHeight>
  <rd:DrawGrid>true</rd:DrawGrid>
  <InteractiveWidth>21cm</InteractiveWidth>
  <rd:GridSpacing>0.25cm</rd:GridSpacing>
  <rd:SnapToGrid>true</rd:SnapToGrid>
  <RightMargin>2.5cm</RightMargin>
  <LeftMargin>2.5cm</LeftMargin>
  <BottomMargin>2.5cm</BottomMargin>
  <rd:ReportID>55a6b44d-b38d-4f58-b9bf-fd26c6f80e4a</rd:ReportID>
  <PageWidth>21cm</PageWidth>
  <DataSets>
    <DataSet Name="master">
      <Fields>
        <Field Name="codename">
          <DataField>codename</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="thisyear">
          <DataField>thisyear</DataField>
          <rd:TypeName>System.Int32</rd:TypeName>
        </Field>
        <Field Name="lastyear">
          <DataField>lastyear</DataField>
          <rd:TypeName>System.Int32</rd:TypeName>
        </Field>
      </Fields>
      <Query>
        <DataSourceName>DataSource1</DataSourceName>
        <CommandText>Select 'code1'  as codename, 45 as thisyear, 46 as lastyear
union
Select 'code2'  as codename, 42 as thisyear, 55 as lastyear
union
Select 'code3'  as codename, 57 as thisyear, 40 as lastyear
union
Select 'code4'  as codename, 10 as thisyear, 11 as lastyear</CommandText>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
      </Query>
    </DataSet>
  </DataSets>
  <Width>16cm</Width>
  <Body>
    <ColumnSpacing>1cm</ColumnSpacing>
    <ReportItems>
      <Chart Name="chart1">
        <Legend>
          <Style>
            <BorderStyle>
              <Default>Solid</Default>
            </BorderStyle>
          </Style>
          <Position>RightCenter</Position>
        </Legend>
        <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>
          </Axis>
        </CategoryAxis>
        <DataSetName>master</DataSetName>
        <PlotArea>
          <Style>
            <BackgroundColor>LightGrey</BackgroundColor>
            <BorderStyle>
              <Default>Solid</Default>
            </BorderStyle>
          </Style>
        </PlotArea>
        <ThreeDProperties>
          <Rotation>30</Rotation>
          <Inclination>30</Inclination>
          <Shading>Simple</Shading>
          <WallThickness>50</WallThickness>
        </ThreeDProperties>
        <PointWidth>0</PointWidth>
        <SeriesGroupings>
          <SeriesGrouping>
            <StaticSeries>
              <StaticMember>
                <Label>Value2</Label>
              </StaticMember>
              <StaticMember>
                <Label>This year markers</Label>
              </StaticMember>
              <StaticMember>
                <Label>last year markers</Label>
              </StaticMember>
            </StaticSeries>
          </SeriesGrouping>
        </SeriesGroupings>
        <Top>0.25cm</Top>
        <Subtype>Candlestick</Subtype>
        <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>
            <Max>100</Max>
            <Margin>true</Margin>
            <Visible>true</Visible>
            <Scalar>true</Scalar>
          </Axis>
        </ValueAxis>
        <Type>Stock</Type>
        <Width>15cm</Width>
        <CategoryGroupings>
          <CategoryGrouping>
            <DynamicCategories>
              <Grouping Name="chart1_CategoryGroup1">
                <GroupExpressions>
                  <GroupExpression>=Fields!codename.Value</GroupExpression>
                </GroupExpressions>
              </Grouping>
              <Label>=Fields!codename.Value</Label>
            </DynamicCategories>
          </CategoryGrouping>
        </CategoryGroupings>
        <Palette>Default</Palette>
        <ChartData>
          <ChartSeries>
            <DataPoints>
              <DataPoint>
                <DataValues>
                  <DataValue>
                    <Value>=(Fields!thisyear.Value+Fields!lastyear.Value)/2</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=(Fields!thisyear.Value+Fields!lastyear.Value)/2</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!lastyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!thisyear.Value)</Value>
                  </DataValue>
                </DataValues>
                <DataLabel />
                <Style>
                  <BackgroundColor>SandyBrown</BackgroundColor>
                  <BackgroundGradientEndColor>Lime</BackgroundGradientEndColor>
                  <BorderColor>
                    <Default>Red</Default>
                  </BorderColor>
                </Style>
                <Marker>
                  <Size>6pt</Size>
                </Marker>
              </DataPoint>
            </DataPoints>
          </ChartSeries>
          <ChartSeries>
            <DataPoints>
              <DataPoint>
                <DataValues>
                  <DataValue>
                    <Value>=Sum(Fields!thisyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!thisyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!thisyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!thisyear.Value)</Value>
                  </DataValue>
                </DataValues>
                <DataLabel />
                <Style />
                <Marker>
                  <Type>Diamond</Type>
                  <Size>6pt</Size>
                </Marker>
              </DataPoint>
            </DataPoints>
          </ChartSeries>
          <ChartSeries>
            <DataPoints>
              <DataPoint>
                <DataValues>
                  <DataValue>
                    <Value>=Sum(Fields!lastyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!lastyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!lastyear.Value)</Value>
                  </DataValue>
                  <DataValue>
                    <Value>=Sum(Fields!lastyear.Value)</Value>
                  </DataValue>
                </DataValues>
                <DataLabel />
                <Style />
                <Marker>
                  <Type>Cross</Type>
                  <Size>6pt</Size>
                </Marker>
              </DataPoint>
            </DataPoints>
          </ChartSeries>
        </ChartData>
        <Style>
          <BackgroundColor>White</BackgroundColor>
        </Style>
        <Title />
        <Left>0.5cm</Left>
      </Chart>
    </ReportItems>
    <Height>10.36905cm</Height>
  </Body>
  <Language>en-US</Language>
  <TopMargin>2.5cm</TopMargin>
  <PageHeight>29.7cm</PageHeight>
</Report>

892866e1-c006-4497-9545-251d2a43feb0
SQL
数据源=4;初始目录=主目录
真的
29.7厘米
真的
21厘米
0.25厘米
真的
2.5厘米
2.5厘米
2.5厘米
55a6b44d-b38d-4f58-b9bf-fd26c6f80e4a
21厘米
代号
系统字符串
今年
System.Int32
去年
System.Int32
数据源1
选择“code1”作为代码名,选择45作为今年,选择46作为去年
联盟
选择“代码2”作为代码名,选择42作为今年,选择55作为去年
联盟
选择“代码3”作为代码名,选择57作为今年,选择40作为去年
联盟
选择“code4”作为代码名,选择10作为今年,选择11作为去年
真的
16厘米
1厘米
固体
右中心
固体
固体
外面
0
真的
主人
浅灰色
固体
30
30
简单的
50
0
价值2
今年
去年
0.25厘米
烛台
真的
固体
固体
外面
0
100
真的
真的
真的
股票
15厘米
=字段!代码名。值
=字段!代码名。值
违约
=(字段!thisyear.Value+字段!lastyear.Value)/2
=(字段!thisyear.Value+字段!lastyear.Value)/2
=总和(字段!去年值)
=总和(字段!今年。值)
桑迪布朗
石灰
红色
6pt
=总和(字段!今年。值)
=总和(字段!今年。值)
=总和(字段!今年。值)
=总和(字段!今年。值)
钻石
6pt
=总和(字段!去年值)