使用rs.exe自動佈署報表
使用rs需用vb語言撰寫指令碼(存成rss) 建立好rdl檔 開啟文字檔並複製下方程式碼,存為rss檔 (路徑自行修改) 開啟文字檔並貼上 rs -i rss檔名 -s ReportServer的URL -u 使用者 -p 密碼 (例如rs -i deploy.rss -s http://127.0.0.1/ReportServer -u aaa -p aaa) rss內容 Dim definition As [Byte]() = Nothing Dim warnings As Warning() = Nothing '資料夾名稱 Dim datasourceFolderName As String = "Data Sources" Dim datasourceFolderPath As String = "/" + datasourceFolderName '報表資料夾名稱,所有發佈的報表放此 Dim reportsFolderName As String = "DeployReports" Dim reportsFolderPath As String = "/" + reportsFolderName 資料來源名稱 Dim DataSourceName As String = "DeteSource" '本機上設計好的報表存放資料夾 Dim filePath As String = "C:\createRDL\" '連線字串(資料來源) Dim connectionString As String = "Data Source=localhost;Initial Catalog=DataBaseName;Connect Timeout=120" Public Sub Main() rs.Credentials = System.Net.CredentialCache.DefaultCredentials '建立報表資料夾 Cre