SharePoint2010: custom webpart与PerformancePoint Service之间的通信

PerformancePoint 2007出到SP3最高版本后,performancepoint team就不做后续了。现在SharePoint2010把PerformancePoint 融合,也确实强壮了SharePoint本身BI方面的功能。

SharePoint2010本身无论是在安全性,功能体验性还是其他为用户 为developer都在体验方面提供了不小的提升,这个就不用说了。

这个文章主要说说PPS与SharePoint 2010结合方面的一点小经验(the communication of sharepoint custom webpart & PPS report)。

1.SharePoint 本身提供的filter都可以和PPS report进行数据前段的connection的链接。

  在performance point 2007中是无法在前段进行数据连接的,只能在dashboard designer中先预先定义好PPS elements之间的关   系,然后在sharepoint 2007中使用。

2. 如何实现自定义的sharepoint webpart接受URL中的参数来过滤PPS report.

a) 实现UserInputFilterWebPart 接口,类库:using Microsoft.SharePoint.Portal.WebControls;

b) 实现接口方法:AutoPostBack() & GetUserSelectedValues()

c) 在GetUserSelectedValues中的返回数组中,返回MDX的字符串数组。

sample code:

protected

 

 

override bool AutoPostBack

{

 

 

get

{

 

 

return false;

}

 

 

set

{

}

}

 

 

/// <summary>

 

 

///

 

 

/// </summary>

 

 

/// <returns></returns>

 

 

protected override string[] GetUserSelectedValues()

{

 

 

if (Page.Request.QueryString[URLParaName] == null)

 

 

return new string[] { "[Dimension Scope].[Scope ID].members" };

 

 

else

{

 

 

string RScope = Page.Request.QueryString[URLParaName].ToString();

//if you need to pass more parameters to the PPS report, every parameter is a

//element of this string array.

 

 

return new string[] { "[Dimension Scope].[Scope ID].&[" + RScope + "]" };

}

}

 

Caution:

由于这个类别是通过reflector反射PPS类库获得,这个webpart在部署的时候,他的filter name是一个required 字段,如果想要清空这个值,并在前段隐藏掉这个webpart,那么在开发的时候注意在createchildcontrols方法中,要加上如下方法:

sample code:

 

 

protected

 

 

override void CreateChildControls()

{

 

 

 

base .FilterName = " " ;

 

 

 

base .CreateChildControls();

}

 

注:以上所有都是在vs 2010中开发!

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值