AS Tabular 的 Row Level 的 Role Base Model Security

Tabular Model 設計如下:

image

image

image

角色定義如下:

image

image

以 AS 的 Administrator 角色透過 Connection String 模擬 Role1 的結果

image

Provider=MSOLAP.6;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=TabularProject1_Byron_6f652aee-a22e-41fb-8df2-d60c4b278c0e;Data Source=SQL2014\I2;MDX Compatibility=1;Roles=Role1;Safety Options=2;MDX Missing Member Mode=Error;Optimize Response=3;Cell Error Mode=TextValue

 

直接以 C 帳號登入的結果

image

搭配 RS 時,透過動態產生連接字串:

image

其內容定義:

image

=IIF(Parameters!Role.Value="None","Provider=MSOLAP.6;Data Source=.\i2;Initial Catalog=TabularProject1","Provider=MSOLAP.6;Data Source=.\i2;Initial Catalog=TabularProject1;Role=" + Parameters!Role.Value)

報表參數定義:

image

報表設計如下:

image

其執行結果如下:

image

 

另外,有點奇怪的是:

在設計報表時,若資料來源選用 Analysis Services

image

則查詢一定要用 MDX 的產生器,因此不能寫 DAX

image

但若資料來源採用 OLE DB 的 Microsoft OLE DB Provider for Analysis Services 12.0

image

則可以自行編輯 DAX

image

由於 DirectQuery 只支援 DAX,所以若要採用 DirectQuery Mode 而非 InMemory Mode,且要利用 RS 呈現,或可如此撰寫 DAX

上述範例專案與報表:

https://onedrive.live.com/redir?resid=BF14192BD27975CB!56936&authkey=!AEM6dSaoa70pNmk&ithint=file%2czip

參考資料:

MVA — Implementing Tabular Model Solutions

Use EffectiveUserName with Excel Services (SharePoint Server 2013)

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s

%d 位部落客按了讚: