SSRS Deployment (ISqlSsrsDeployment)
Overview
The SSRS Deployment operation allows you to configure SQL Server Reporting Services (SSRS) resources that will be deployed during installation. You can define the target folders for reports, datasets, and datasources, and add one or more SSRS resources to be deployed to the report server.
This object is created under SqlDatabasesComponent and appears in the SSRS Deployments tab in Advanced Installer.
Methods
- AddResource (string path) -> ISqlSsrsResource Adds a new SSRS resource (e.g., report definition .rdl file or shared dataset) from the specified path. Returns the created ISqlSsrsResource.
- RemoveResource (ISqlSsrsResource resource) Removes the specified ISqlSsrsResource from this deployment.
Properties
- Name (string) {get}{set} Gets or sets the display name of this SSRS deployment.
- ServerUrl (string) {get}{set} Gets or sets the URL of the report server (e.g., http://server/reportserver).
- ReportsFolder (string) {get}{set} Gets or sets the folder on the SSRS server where report files will be deployed.
- DatasetFolder (string) {get}{set} Gets or sets the folder on the SSRS server where datasets will be deployed.
- DatasourceFolder (string) {get}{set} Gets or sets the folder on the SSRS server where datasources will be deployed.
- RemoveResourcesOnUninstall (bool) {get}{set} When true, removes deployed SSRS resources during uninstall.
- Condition (string) {get}{set} Gets or sets a Windows Installer condition that controls whether this deployment runs. If the condition evaluates to false, deployment is skipped.
- Resources (SAFEARRAY(Variant)) {get} Returns the list of ISqlSsrsResource objects added to this deployment.
Sample commands
# SQL Operations - SSRS Deployment $advinst = New-Object -ComObject "AdvancedInstaller" $project = $advinst.CreateProject($advinst.ProjectTypes.Enterprise) # Create a SSRS Deployment operation $ssrsDeployment = $project.SqlDatabasesComponent.NewSsrsDeployment("My SSRS Deployment") # Configure SSRS deployment properties $ssrsDeployment.ServerUrl = "http://my-report-server/reportserver" $ssrsDeployment.ReportsFolder = "MyReports" $ssrsDeployment.DatasetFolder = "MyDatasets" $ssrsDeployment.DatasourceFolder = "MyDataSources" # Add a report resource $report = $ssrsDeployment.AddResource("F:\cmdlet\res\ssrsReport.rdl") # Optionally remove resources on uninstall $ssrsDeployment.RemoveResourcesOnUninstall = $true # Inspect added resources $ssrsDeployment.Resources # Save the project $project.SaveAs("F:\cmdlet\output\SSRS Deployment.aip")