BI综述:
BI(Business Intelligence)即商务智能,它是一套完整的解决方案,用来将企业中现有的数据进行有效的整合,快速准确的提供报表并提出决策依据,帮助企业做出明智的业务经营决策。转自百科。
Dynamic CRM:
Microsoft Dynamics CRM是全球唯一以销售生产力为导向、对业务流程度高度可定制的客户关系管理系统。与Microsoft Office的完全集成,可以让用户轻松创建并维护清晰明了的客户数据,提供快速、灵活且经济实惠的客户交互工具,强化和改进公司的销售、营销和客户服务。转自官网。
学习过程:
1.前情概要。
作为一名CRM 开发兼职CRM Admin,当然十八般武艺样样精通。本人刚刚参加工作,不到半年,在校期间接触过Arcgis然后现在天天面对Dynamic CRM,好像然并卵。不过我仍然怀着一颗热忱的心来做CRM。
2.环境配置。
Dynamic CRM 的环境必须有,SQL Server必须有。VS你可以没有(如果你可以拿记事本)最好是2010版本。我经过多方测试从2010到2015都有试过,只在2010下好使,不知道这个设定是个什么鬼。
*CRM2013-Bids-ENU-i386这个插件一定要有。
Note:you should install Microsoft SQL Server 2008 first and during the installation,remember to select “Business Intelligence”.
3.创建一个Report。
如图所示当我们插件安装完成会在Solution模板里生成一个BI的目录,选择创建Report Server Project。命名按照各自规定来。
这里进入之后啥也没有。。。
Repors目录下创建一个新的rdl报表文件。
View——>Report Data——>Data Source——>配置查询方式(这里讲FetchXML)&链接数据源&UserName/Password
1.Connection String: ??
http://127.0.0.1/;testreport ? ? ? ??http://127.0.0.1 IP 访问地址 如果有端口号一并输入ex:?http://127.0.0.1:5555
testreport这个是CRM的 Organization 。IP 用端口隔开。?
ex: ??
1.http://127.0.0.1/;testreport ??
2.https://127.0.0.1/;testreport ? ??
3.http://127.0.0.1:5555/;testreport ?
4.https://127.0.0.1:5555/;testreport ?
2.Credentials下设置账户密码。
本地验证 和 账户密码验证。
本地验证:仅限CRM部署的环境和当前环境一致,不再赘述,能做Report 就对这个再熟悉不过了。
账户密码验证:development\administrator ? ?Domain\Administrator ? ?Administrator@Domain ?密码就是密码自己配置的。
3.FetchXML。
做过Dynamic CRM的都知道FetchXML是CRM的独特的查询方式,如果对此不是很熟悉恰好你对SQL很熟悉推荐一款在线工具。http://www.sql2fetchxml.com/
首先我们建立一张dataset并连上Datasource。
紧接着我们Query我们想要的数据。
<fetch distinct="false" no-lock="true" mapping="logical">
<entity name="ave_fwintake" enableprefiltering="1" prefilterparametername="CRM_Filteredave_FWIntake">
<attribute name="ave_fwintakecasedetailsguid" alias="ave_fwintakecasedetailsguid" />
<attribute name="ownerid" alias="ownerid" />
<attribute name="ave_fwintakeintakenotext" alias="ave_fwintakeintakenotext" />
<attribute name="ave_fwintakeid" />
<link-entity name="systemuser" from="systemuserid" to="ave_fwintakecasesupervisorguid" alias="ab" link-type="outer">
? ? ? ? <attribute name="ave_userdesignationtext"/>
? ? ? ? <attribute name="fullname" />
? ? </link-entity>
? ? <link-entity name="systemuser" from="systemuserid" to="owninguser" alias="ac" link-type="outer">
? ? ? ? <attribute name="ave_userdesignationtext"/>
? ? </link-entity>
</entity>
</fetch>
和SQL里的一样可调试。
注意几点:
1. ?Entity下的enableprefiltering="1"。(只显示一条在有些Report中我们只需要一条数据后面我们讲到Cube数据建模我们再讨论处理大数据的问题)
2.link-entity下的link-type="outer"。外联 内联 ?左联 ?多表联查属性。
3.fetch 下的distinct="false" no-lock="true" mapping="logical",排序啊 锁DB Mapping之类的,具体什么属性有一些我也不太懂。我才刚刚参加工作做到这样的确不容易。(还请各位大侠不吝赐教!)
4.设计报表,绑定Set,Set可以是多个。但是在报表中一个table内只能绑定一个set。
如图所示:一个简单的表就形成了 Preview 如果能成功就可以上传到CRM上跑一跑。
那这就成功了!
首发,瑕疵还望指教!