none
Reporting services 能否用dataset作为数据源? RRS feed

答案

  • 可以用DATASET做为数据源

    参照这里
    http://technet.microsoft.com/zh-cn/subscriptions/ms152917.aspx
    努力+方法=成功
    • 已标记为答案 YiChun Chen 2010年1月18日 10:25
    2010年1月14日 6:34
  • Recently I had to write a SQL Server Reporting Services Report that used a web service for the data source, the web service returned a horrible .NET DataSet object which I had no control over.

    To use a web service from Reporting Services, the first step is to create a new Data Source of type: XML:

     

    image

    Then enter the URL to the web service in the connection string section.

    The next step is to create a new DataSet for the report.

    In the Query Designer enter the following:

     

    <Query>
       <Method Name="<web service method name>" Namespace="<webservice namespace url>”>
       </Method>
       <ElementPath IgnoreNamespaces="True">
    <web service method name>Response/<web service method name>Result/diffgram/NewDataSet/Table1   (replace Table1 with the dataset name if used)

        </ElementPath>

    </Query>

     

    If you need to pass parameters to the web service, this can be done by adding something like:

     

    <Parameters>
           <Parameter Name="<parameter name>">
               <DefaultValue></DefaultValue>
           </Parameter>
       </Parameters>

    But be sure that the case of the parameter name is exactly the same as the parameter in the report that you wish to pass in.

    • 已标记为答案 YiChun Chen 2010年1月18日 10:25
    2010年1月15日 9:07

全部回复

  • 可以用DATASET做为数据源

    参照这里
    http://technet.microsoft.com/zh-cn/subscriptions/ms152917.aspx
    努力+方法=成功
    • 已标记为答案 YiChun Chen 2010年1月18日 10:25
    2010年1月14日 6:34
  • Recently I had to write a SQL Server Reporting Services Report that used a web service for the data source, the web service returned a horrible .NET DataSet object which I had no control over.

    To use a web service from Reporting Services, the first step is to create a new Data Source of type: XML:

     

    image

    Then enter the URL to the web service in the connection string section.

    The next step is to create a new DataSet for the report.

    In the Query Designer enter the following:

     

    <Query>
       <Method Name="<web service method name>" Namespace="<webservice namespace url>”>
       </Method>
       <ElementPath IgnoreNamespaces="True">
    <web service method name>Response/<web service method name>Result/diffgram/NewDataSet/Table1   (replace Table1 with the dataset name if used)

        </ElementPath>

    </Query>

     

    If you need to pass parameters to the web service, this can be done by adding something like:

     

    <Parameters>
           <Parameter Name="<parameter name>">
               <DefaultValue></DefaultValue>
           </Parameter>
       </Parameters>

    But be sure that the case of the parameter name is exactly the same as the parameter in the report that you wish to pass in.

    • 已标记为答案 YiChun Chen 2010年1月18日 10:25
    2010年1月15日 9:07
  • 谢谢二位答疑,我去试试。
    杨昌源
    2010年1月20日 13:37