Skip to content

Latest commit

 

History

History
112 lines (73 loc) · 4.15 KB

README.md

File metadata and controls

112 lines (73 loc) · 4.15 KB

SSRS Powershell Deploy

PowerShell module to publish SQL Server Reporting Services project(s) (.rptproj) to a Reporting Server

Chat

Join the chat at https://gitter.im/ssrs-powershell-deploy/Lobby

Wiki

There's a project wiki on github, go ahead and expand it

This fork

This repository was forked from:

I've turned it into a proper github repo to allow discussion, pull requests etc.

Installation

PowerShell Gallery

Install the SSRS module from PowerShell Gallery:

Make sure you have PowerShell Gallery installed (instructions on their homepage). It's already available in Windows 10.

In an elevated powershell console run:

Install-Module -Name SSRS

Say y to installing from untrusted. Then close the elevated console and you will now have the Publish-SSRSProject/Solution commands available in all your powershell sessions.

If you can't use the gallery for some reason then you can do a manual install from a download:

Manual install

  1. Download the .zip from https://github.com/timabell/ssrs-powershell-deploy/releases/latest
  2. Right-click the zip file in windows explorer, click "properties", and then click "Unblock".
  3. Create folder Documents\WindowsPowerShell\Modules\
  4. Open up the zip file, copy the SSRS folder, paste it into Documents\WindowsPowerShell\Modules\. (Or somewhere on your $env:PSModulePath)

Usage

Publish-SSRSProject.ps1 -path YourReportsProject.rptproj -configuration Release -verbose

You can either specifiy a build configuration to read from the project file, or you can specify all the information required to publish in the rest of the parameters.

Publish-SSRSProject [-Path] <string> [[-Configuration]
	<string>] [[-ServerUrl] <string>] [[-Folder] <string>]
	[[-DataSourceFolder] <string>] [[-DataSetFolder] <string>]
	[[-OutputPath] <string>] [[-OverwriteDataSources] <bool>]
	[[-OverwriteDatasets] <bool>] [[-Credential] <pscredential>]
	[<CommonParameters>]

Example reports

To open the Example-Reports project in Visual Studio you'll need Sql Server Data Tools (SSDT)

General SSRS gotchas

Disappearing dataset panel - http://stackoverflow.com/questions/7960824/i-lost-datasets-pane-in-visual-studio/28883272#28883272

VS report projects cache both datasets and data. Remove all the .data files and the bin/ folder(s) to be sure your changes will work when published. http://stackoverflow.com/questions/3424928/in-ssrs-is-there-a-way-to-disable-the-rdl-data-file-creation

More SSRS love http://timwise.blogspot.co.uk/2015/08/100-reasons-i-hate-ssrs.html <3 <3

Development

Developed with PowerShell Tools for Visual Studio 2015

To test the module locally directly from the source tree you can import by specifiying the path to the psd1 file.

PS C:\repo\ReportDefinitions> Import-Module C:\repo\tim\ssrs-powershell-deploy\ssrs-powershell-deploy\SSRS\SSRS.psd1
PS C:\repo\ReportDefinitions> Publish-SSRSProject

See the exported commands with

PS C:\repo\ReportDefinitions> Get-Command -Module SSRS

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Publish-SSRSProject                                1.2.0      SSRS
Function        Publish-SSRSSolution                               1.2.0      SSRS

Unload again with

PS C:\repo\ReportDefinitions> Remove-Module SSRS