2016-03-07 46 views
2

我們使用SQL Server 2012 Enterprise,並使用SQL Server Reporting Services(SSRS)生成大量報表。我們使用Visual Studio 2012/2013將報告部署到不同的服務器。我們有一個解決方案文件與不同的項目。如何在使用Visual Studio進行部署期間設置文件夾描述?

SSRS Solution Explorer

每個項目都有一個不同的目標文件夾。

Target Configuration

一切正常,只是我不知道如何使用Visual Studio部署設置文件夾說明罰款。

SSRS Folder Description

回答

1

我寫了一個存儲過程,而設置的說明。我需要在部署後運行存儲過程,這是一種解決方法,但我對此解決方案很滿意。

下面是代碼:

-- Folder Description: QC - Internal Reports 
UPDATE DBReporting.dbo.Catalog 
SET  Description = 'restricted to department QC' 
WHERE Type = 1 -- Folder 
     AND Name = 'QC - Internal Reports'; 

獎勵: 您也可以使用隱藏的目錄表在報告數據庫(子)報告。我使用Visual Studio中的報告描述來識別我想要隱藏的報告。

Report Properties in Visual Studio

-- Hides Reports 
UPDATE DBReporting.dbo.Catalog 
SET  Hidden = 1 
WHERE Type = 2 -- Report 
     AND Description = 'Hidden'; 

-- Hide Datasource Folder 
UPDATE DBReporting.dbo.Catalog 
SET  Hidden = 1 
WHERE Type = 1 --Folder 
     AND Name = 'Data Sources'; 
相關問題