使用XML从SSRS报告中提取RSS源中的数据

时间:2013-03-04 20:33:32

标签: xml rss report reporting reporting-services

我的报告中有一个数据源,它从sharepoint页面中提取RSS Feed,其中包含我的报告所需的数据。问题是当我在报告中使用这个RSS feed和数据集时,我得到一个名为“description”的字段,其中包含我希望能够在报告中查看的所有数据。来自描述字段的数据样本如下所示:

`<div><b>Operating Unit:</b> OU1</div> <div><b>Company Name:</b> Company1</div> <div><b>Address Line 1:</b> PO BOX 9940</div> <div><b>State:</b> Texas</div> <div><b>Zip:</b> 77213-0940</div> <div><b>Phone:</b> phonenumber1</div> <div><b>Workflow State:</b> 4</div> <div><b>Hyperlink Path:</b> censor</div> <div><b>File Name Suffix:</b> censor</div> <div><b>Requestor Name:</b> User1 </div> <div><b>Approver Name:</b> Approver1</div> <div><b>Address Book Name:</b> AddressName1</div> <div><b>City:</b> HOUSTON</div> <div><b>Existing Vendor:</b> 0</div> <div><b>ApproverTemp:</b> VendorApprovers_TPR</div> <div><b>Address Book Date Str:</b> 3/4/2013</div> <div><b>Approver Date Str:</b> date</div> <div><b>Requestor Date Str:</b> date</div> <div><b>Oracle Vendor Number:</b> 111111111</div>`

我希望能够获取这些数据并将其实际纳入我的报告中,但我不确定如何从此表单中提取它。下面是我关于DataSource和DataSet的报告的代码

`<DataSources>
    <DataSource Name="DSSPRSS">
      <ConnectionProperties>
        <DataProvider>XML</DataProvider>
        <ConnectString>Censor1;Source=http%3A%2F%2Fteams%2Edjj%2Ecom%2Fsites%2FCorpFinance%2FProcurement%2FVendorSetup%2FForms%2FCompleted%2520Addressbook%2Easpx%3FView%3D%7B18e894cc%2D6f6f%2D408c%2D9ff9%2D34764395cb82%7D%26SortField%3DDocIcon%26SortDir%3DDesc%26InitialTabId%3DRibbon%252ELibrary%26VisibilityContext%3DWSSTabPersistence</ConnectString>
        <IntegratedSecurity>true</IntegratedSecurity>
      </ConnectionProperties>
      <rd:SecurityType>Integrated</rd:SecurityType>
      <rd:DataSourceID>06a70d58-3ebb-40ba-b132-239ec4d0d79b</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="RSS">
      <Query>
        <DataSourceName>DSSPRSS</DataSourceName>
        <CommandText />
      </Query>
      <Fields>
        <Field Name="Title">
          <DataField>title</DataField>
          <rd:UserDefined>true</rd:UserDefined>
        </Field>
        <Field Name="Link">
          <DataField>link</DataField>
          <rd:UserDefined>true</rd:UserDefined>
        </Field>
        <Field Name="Published_Date">
          <DataField>pubDate</DataField>
          <rd:UserDefined>true</rd:UserDefined>
        </Field>
        <Field Name="Description">
          <DataField>description</DataField>
          <rd:UserDefined>true</rd:UserDefined>
        </Field>
      </Fields>
    </DataSet>
  </DataSets>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
  <rd:ReportID>ad05aef6-265e-4c8a-a0be-7d5da939fbda</rd:ReportID>
</Report>`

这是专门用于表格中描述字段的代码。

 `<CellContents>
                    <Textbox Name="Description">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=Fields!Description.Value</Value>
                              <Style />
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Description</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>`

1 个答案:

答案 0 :(得分:0)

我通过使用数据集中的sharepoint页面功能解决了这个问题。 (Visual Studio 2008 SSRS)这上传了sharepoint页面,并解决了我的问题。