您的位置:首页 > 其它

SharePoint 2013 BI之report service 常用功能 连接到SharePoint List 数据源

2013-11-01 22:06 513 查看
本文讲述SharePoint 2013 BI之report service 常用功能 连接到SharePoint List 数据源。

笔者参考http://technet.microsoft.com/en-us/library/ee633650.aspx 尝试在report 中连接SharePoint List 数据源,但是发现该文档里面有明显的三处错误,也不知道微软的发布这个文档的时候是怎么测试的,为避免更多的用report service的同学遇到这种问题,特写一篇博文说明下我实践的步聚。

准备工作:配置report service 和创建报表的基本步聚请参考 《SharePoint
2013 BI 之 report service 实例》

1. 在report 站点中新建一个List 列表用于测试,命名为 ListDataSource 

2. 加入一个测试列和输入两三行测试数据 



3. 新建report project 

4. 新建数据源,连接字符串为 http://YourMoss2013Server/report, 认证方式为windows 集成验证,数据源命名为ListDataSource 

5. 新建data set,查询语句为,data set 命名为 ListDataSet

<RSSharePointList>
<ListName>ListDataSource</ListName>
<ViewFields>
<FieldRef Name="ID"/>
<FieldRef Name="Title"/>
<FieldRef Name="SalesAmount"/>
</ViewFields>
<Query>
<Where>
<IsNotNull>
<FieldRef Name="Title"/>
</IsNotNull>
</Where>
</Query>
</RSSharePointList>


注意微软的帮助文档里面就是这个Query text有三处错误



错误a:标签listName应该为ListName, 首字母没有大写,如果这样是死活也查询不出来的, 报标签 listName无效的错

        b.  标签viewFields应该为ViewFields, 首字母同样没有大写,如果这样是死活也查询不出来的,报标签viewFields无效的错

       c.  IsNotNull 字句不需要type,这个报的错比较想不到

          最外层报错为:Value does not fall within the expected range 

         log里面报错为:

           Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset ''. ---> System.ArgumentException: Value does not fall
within the expected range.    

 at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListItemDataWithCallback2

   6.新建报表并选择 ListDataSet作为数据集

   


7.发布报表并查看结果 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐