none
xml 得到匹配xpath! RRS feed

  • 问题

  • <?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="pubsConnectionString">
          <ConnectionProperties>
            <ConnectString>Data Source=VSS_SERVER\;Initial Catalog=pubs;User ID=sa</ConnectString>
            <DataProvider>SQL</DataProvider>
          </ConnectionProperties>
          <rd:DataSourceID>e095bd55-266c-4918-bb1b-7831ed4d3692</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <BottomMargin>2.5cm</BottomMargin>
      <RightMargin>2.5cm</RightMargin>
      <PageWidth>21cm</PageWidth>
      <rd:DrawGrid>true</rd:DrawGrid>
      <InteractiveWidth>21cm</InteractiveWidth>
      <rd:GridSpacing>0.25cm</rd:GridSpacing>
      <rd:SnapToGrid>true</rd:SnapToGrid>
      <Body>
        <ColumnSpacing>1cm</ColumnSpacing>
        <ReportItems>
          <Chart Name="chart1">
            <Legend>
              <Visible>true</Visible>
              <Style>
                <BorderStyle>
                  <Default>Solid</Default>
                </BorderStyle>
              </Style>
              <Position>RightCenter</Position>
            </Legend>
            <Subtype>Plain</Subtype>
            <Title />
            <Height>7.61905cm</Height>
            <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>
            <PointWidth>0</PointWidth>
            <Left>4.25cm</Left>
            <ThreeDProperties>
              <Rotation>30</Rotation>
              <Inclination>30</Inclination>
              <Shading>Simple</Shading>
              <WallThickness>50</WallThickness>
            </ThreeDProperties>
            <DataSetName>pubsDataSet_Demo</DataSetName>
            <PlotArea>
              <Style>
                <BorderStyle>
                  <Default>Solid</Default>
                </BorderStyle>
                <BackgroundColor>LightGrey</BackgroundColor>
              </Style>
            </PlotArea>
            <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>
            <Type>Column</Type>
            <Width>7.61905cm</Width>
            <CategoryGroupings>
              <CategoryGrouping>
                <DynamicCategories>
                  <Grouping Name="chart1_CategoryGroup1">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Name.Value</GroupExpression>
                    </GroupExpressions>
                  </Grouping>
                  <Label>=Fields!Name.Value</Label>
                </DynamicCategories>
              </CategoryGrouping>
            </CategoryGroupings>
            <Palette>Default</Palette>
            <ChartData>
              <ChartSeries>
                <DataPoints>
                  <DataPoint>
                    <DataValues>
                      <DataValue>
                        <Value>=Sum(Fields!ID.Value)</Value>
                      </DataValue>
                    </DataValues>
                    <DataLabel />
                    <Marker />
                  </DataPoint>
                </DataPoints>
              </ChartSeries>
            </ChartData>
            <Style>
              <FontFamily>宋体</FontFamily>
              <BackgroundColor>White</BackgroundColor>
            </Style>
          </Chart>
        </ReportItems>
        <Height>11.5cm</Height>
      </Body>
      <rd:ReportID>200bb607-6d4f-474d-8539-c8723f466610</rd:ReportID>
      <LeftMargin>2.5cm</LeftMargin>
      <DataSets>
        <DataSet Name="pubsDataSet_Demo">
          <rd:DataSetInfo>
            <rd:TableAdapterGetDataMethod>GetData</rd:TableAdapterGetDataMethod>
            <rd:DataSetName>pubsDataSet</rd:DataSetName>
            <rd:TableAdapterFillMethod>Fill</rd:TableAdapterFillMethod>
            <rd:TableAdapterName>DemoTableAdapter</rd:TableAdapterName>
            <rd:TableName>Demo</rd:TableName>
          </rd:DataSetInfo>
          <Query>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
            <CommandText>SELECT ID, Name FROM dbo.Demo</CommandText>
            <DataSourceName>pubsConnectionString</DataSourceName>
          </Query>
          <Fields>
            <Field Name="ID">
              <rd:TypeName>System.Int32</rd:TypeName>
              <DataField>ID</DataField>
            </Field>
            <Field Name="Name">
              <rd:TypeName>System.String</rd:TypeName>
              <DataField>Name</DataField>
            </Field>
          </Fields>
        </DataSet>
      </DataSets>
      <Width>16cm</Width>
      <InteractiveHeight>29.7cm</InteractiveHeight>
      <Language>zh-CN</Language>
      <TopMargin>2.5cm</TopMargin>
      <PageHeight>29.7cm</PageHeight>
    </Report>

    ------------
    用c#帮我匹配Report->Body->ReportItems->Chart节点. 
                
    xx
    2009年3月19日 1:51

答案