Code Monkey home page Code Monkey logo

deployssrs's People

Contributors

bentcg avatar donalfenwick avatar excaliburvt avatar mmajcica avatar phkrug avatar sjors-boom avatar sqlkabouter avatar vstrien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deployssrs's Issues

Reference DataSource Issue

Hi @mmajcica - Thanks again for supporting this Azure DevOps task!

I have "Reference DataSource" turned on - but this is not working as expected.

To confirm expected behavior - If a report names a data source

<DataSources>
   <DataSource Name="MY-DATA-SOURCE">
     <DataSourceReference>/DEV/DataSources/MY-DATA-SOURCE</DataSourceReference>
     <rd:DataSourceID>b854d181-2e6c-42f2-9a2d-39804cb15d55</rd:DataSourceID>
   </DataSource>
 </DataSources>

or say

<DataSources>
    <DataSource Name="MY-DATA-SOURCE">
      <DataSourceReference>MY-DATA-SOURCE</DataSourceReference>
      <rd:DataSourceID>104a6a0e-afa9-451d-83a2-93a974ef068c</rd:DataSourceID>
    </DataSource>
  </DataSources>

I have "No" DataSources defined in the DeployConfig.json. We'd prefer not to need expose or the DataSource configuration (and credential) in the Deploy Config, as these are set up and maintained separately.

Is it correct to have the expectation that given an RDL referencing a DataSource name (in my case (MY-DATA-SOURCE) that the task will find the most local DataSource of that name and match that DataSource into the RDL/Report as its deployed to that data source ?

Also to confirm, is the best approach is to have each RDL configured as the second example above ?

We obviously can't manage the <rd:DataSourceID> between environments - and that is what the "Reference DataSource" is supposed to achieve?

What are we otherwise missing ?

Security not applied at report level

Hi,

The DeploySsrs is working well for us and we have our first CD pipeline setup for reports, but I've noticed that security at the report level is not applied. I can apply security at Folder level, but not for individual reports.

In the script it passes in Folder and Name as params to Set-SecurityPolicy, but only Folder is used.

Is this a bug or not supported? I'm happy to submit a PR.

I've attached an example config below...

{
  "Name": "Root",
  "Folders": [
    {
      "Name": "Some general reports",
      "Hidden": false,
      "Reports": [
        {
          "Name": "My report",
          "Hidden": false,
          "FileName": "My Report.rdl",
          "Security": [
            {
              "Name": "mydomain\\someusers",
              "Roles": [
                "Browser"
              ]
            }
          ]
        }
      ]
    }
  ]
}

Cheers,

Ben

Question: Does this support SSRS 2017?

Hi,

Does this support SSRS 2017? My understanding is SSRS 2017 uses a new REST API rather than the old web service.

Or does using PowerShell mean you don't need to worry about the web service?

Thanks

Server Configuration

I'm setting this up for the first time. We already have folders, reports, etc. Is there a way to get the existing configuration json/xml?

Not sure if errors are from report deployment or the add-in

Hi @mmajcica

I'm getting this error:

2019-12-13T21:56:02.3378796Z ##[error]Cannot convert value "System.Object[]" to type "System.Xml.XmlDocument". Error: "'.', hexadecimal value 0x00, is an invalid character. Line 5057, position 10."

This seems to be coming from the add-in than a specific report.

I have a DeployConfig.json that is ~450 lines long. it gets to about line 50 before it fails, if I remove the report at the part of the file it then fails on the next etc.

Any hints on how to diagnose and resolve appreciated

##[error]Exception setting "Name": "The argument is null or empty. Provide an argument that is not null or empty, and then try the command again."

Hi,

Thanks for developing this plugin, looking forward to plugging it into my pipeline :)

I tried to configure deploy reports step in my pipeline, but I'm getting following error

2020-06-18T14:13:39.8697906Z ##[section]Starting: Deploy reports
2020-06-18T14:13:39.9321292Z ==============================================================================
2020-06-18T14:13:39.9322048Z Task         : Deploy MS SQL SSRS Reports
2020-06-18T14:13:39.9322810Z Description  : Deploy items on MS SQL SSRS server based on a configuration file.
2020-06-18T14:13:39.9323440Z Version      : 3.1.6
2020-06-18T14:13:39.9323874Z Author       : Mario Majcica
2020-06-18T14:13:39.9324313Z Help         : 
2020-06-18T14:13:39.9324879Z ==============================================================================
2020-06-18T14:13:46.8537916Z ##[error]Exception setting "Name": "The argument is null or empty. Provide an argument that is not null or empty, and then try the command again."
2020-06-18T14:13:46.9144049Z ##[section]Finishing: Deploy reports

here is my configuration
image

Do you know what is causing this trouble or how to debug it?

Thanks.

Report Description

CatalogItem supports a description, any chance you can add that? It could be picked up from the configuration.

like:

DataSource with sql server athentication

Hi,

How i should configure dataSource deployment when credentials are stored in SSRS ?
I'm using:

"DataSources": [
      {
          "ConnectionString": "Data Source=1.1.2.1;Initial Catalog=DB",
          "Name": "dsSomething",
          "Extension": "SQL",
          "CredentialRetrieval": "Store",
          "UserName": "User",
          "Password": "Pass",
          "WindowsCredentials": "True"
     }
 ]                   ]

Datasource is created, but cannont connect. I need to manually change "Type of credentials" from "Windows user name and password" to "Database user name and password".

I'm using SQL 2016
How to configure credentials type from windows to server in config file ?
Thanks for advance.

Edvin

Cannot authenticate against ReportService2010.asmx

Hello,

I have an SSRS server deployed as a VM in Azure and I am trying to use the hosted pipelines from Azure DevOps to deploy reports, but I am unable to successfully retrieve the .asmx file as part of the pipeline.

##[error]There was an error downloading 'https://[XXX.XXX.XXX.XXX/ReportServer/ReportService2010.asmx'.

I have tried Windows Auth, as well as SQL Auth, using several different username and password options. It does not appear there is a way to authenticate with the forms-based authentication. I assume that this is intended to be run from a build agent that is part of the same domain as the SSRS server, but that is not the case for our environment. I would like to be able to deploy using this pipeline task in this environment.

Warnings on DataSet Deployments

I'm getting a warning on all the shared data set deployments.

The dataset 'MyDataSet' refers to the shared data source 'MyDataSource', which is not published on the report server. The shared data source 'MyDataSource' must be published before this shared dataset can run.

The thing is, the data source is there, the data sets are getting linked to the data source, and after the deployment all of my reports run correctly. So the deployment is working.

I would like to just not have the warnings appear unless there was an actual problem (maybe there is, but everything seems to be working fine after).

Example of my config file:

<?xml version="1.0" encoding="utf-8"?>
<Folder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Root">
	<Folders>
		<Folder Name="Data Sources" Hidden="true">
			<DataSources>
				<DataSource ConnectionString="Data Source=__sqlServer__; Initial Catalog=db" 
							Name="MyDataSource" 
							Extension="SQL" 
							CredentialRetrieval="Store" 
							UserName="__sqlUser__" 
							Password="__sqlPassword__" 
							WindowsCredentials="True" />
			</DataSources>
                </Folder>
		<Folder Name="Datasets" Hidden="true">
			<Folders>
				<Folder Name="My Reports">
					<DataSets>
						<DataSet Name="MyDataSet" Hidden="false" FileName="MyDataSet.rsd" />
					</DataSets>
				</Folder>
			</Folders>
		</Folder>
		<Folder Name="Reports">
			<Folders>
				<Folder Name="My Reports">
					<Reports>
						<Report Name="My Report" Hidden="false" FileName="My Report.rdl" />
					</Reports>
				</Folder>
			</Folders>
		</Folder>
	</Folders>
</Folder>

Overwrite parameter is not supplied

Set-SecurityPolicy -Proxy $Proxy -Folder $currentFolder -RoleAssignments $Folder.RoleAssignments -InheritParentSecurity:$Folder.InheritParentSecurity -Overwrite

In every call where the parameter Overwrite is used the call looks like
... -Overwrite:$Overwrite

In this line the parameter is missing. Is that inteded or a bug?

How to Setup the basic fields on the Deploy Reports agent

Couple of issues i have run into

  1. Where is the windows authentication user set up ? per your overview, it says in the machine section but i am unable to locate it
    2)Does the SSRS report server URL need to have a publicly exposed URL for the agent to communicate with the server ?

SSRS Deploy - Configuration File provided is not valid

Hi,

I do not understand what file i should point the SSRS configuration file parameter to, please advise as i cannot find a resource on this but want to use the component.

The error:
2019-01-28T11:06:22.2915936Z ##[error]Provided configuration file path D:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\ is not valid.

I have tried pointing to rsreportserver:
image

The error:
2019-01-28T13:52:42.5160773Z ##[error]Invalid configuration file type.

Assistance would be appreciated. :)

Issues involving loading configuration via Json

[Folder]:new() doesn't have a 3 parameter overload, assume it was refactored and not tested with the JSON Version

Two calls to the += operator were not valid and did not appear to be needed.

Converted the true/false to boolean just like the GetXmlFolderItems method.

Added a Json version of the example ReportConfiguration file

Error: Provided files folder path is not valid

Issue:
I am facing issue with Report Files Path. Error is - ##[error]Provided files folder path.

Overview:
I am using VSTS with On-premise build agent and OAuthToken has been set.
I have provided Report Files Paths as "**/*.rdl " assuming it will pick up all the .rdl files in my $(build.sourcesDirectory) path. There are .rdl files in the subfolder of $(build.sourcesDirectory).However, I am still facing the issue.

Screenshots
image

image

image

Deploy error The 'class' keyword is not supported in this version of the language.

getting a "class"

2020-09-29T11:23:14.7232717Z ##[section]Starting: Deploy reports
2020-09-29T11:23:14.7421302Z ==============================================================================
2020-09-29T11:23:14.7421572Z Task : Deploy MS SQL SSRS Reports
2020-09-29T11:23:14.7421796Z Description : Deploy items on MS SQL SSRS server based on a configuration file.
2020-09-29T11:23:14.7422013Z Version : 3.1.10
2020-09-29T11:23:14.7422157Z Author : Mario Majcica
2020-09-29T11:23:14.7423153Z Help :
2020-09-29T11:23:14.7423328Z ==============================================================================
2020-09-29T11:23:15.6801281Z ##[error]At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1157 char:1

  • class Folder

The 'class' keyword is not supported in this version of the language.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1199 char:13

  • [string]Path()
    
  •         ~~~~
    

Unexpected token 'Path' in expression or statement.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1199 char:18

  • [string]Path()
    
  •              ~
    

An expression was expected after '('.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1210 char:1

  • class Report

The 'class' keyword is not supported in this version of the language.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1235 char:1

  • class DataSet

The 'class' keyword is not supported in this version of the language.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1260 char:1

  • class DataSource

The 'class' keyword is not supported in this version of the language.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1302 char:1

  • class RoleAssignment

The 'class' keyword is not supported in this version of the language.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1313 char:14

  • [string] ToString() { return "$($this.Name)" }
    
  •          ~~~~~~~~
    

Unexpected token 'ToString' in expression or statement.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1313 char:23

  • [string] ToString() { return "$($this.Name)" }
    
  •                   ~
    

An expression was expected after '('.

At C:\Azure_agent_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.10\ps_modules\ssrs.psm1:1316 char:1

  • class SsrsDataSource

The 'class' keyword is not supported in this version of the language.

Not all parse errors were reported. Correct the reported errors and try again.

2020-09-29T11:23:15.7003772Z ##[section]Finishing: Deploy reports

SSIS Folder Name Parameter

The README lists the following parameter:

SSIS folder Name: Folder name in the SSIS Package Store

I don't see this parameter in the task or understand why there would be a parameter for SQL Server Integration Services?

How to deploy a dataset

Hi Mario,
Can you please give me a sample on the xml required to deploy a shared dataset?
The shared datasets are already setup in my project as *.rsd.

Apologies if it's been mentioned elsewhere, I couldn't find any documentation on how to set it up.

I would imagine something along the lines of
<Folder Name="Datasets" Hidden="true"> <Dataset Name="BusinessStream" FileName="BusinessStream.rsd" /> </Folder>

Ernest

Curly braces

  1. I'm finding the documentation is not explaining exactly how the DB place holders {{Server}}{{Instance}} in the configuration file are used? I understand your code is creating the Datasource from the parameters used here but how do I feed in the variables for {{Server}}{{Instance}}? I'm currently just putting the actual connection strings into the xml file. Doing it this way I am expecting to create a totally separate xml file for each solution configured environment? I'm sure that's not what you're intending?
    The Visual Studio Reporting project (Microsoft Reporting Services Projects) I'm using does not allow us to have different connection strings in the datasource for each project configuration item (Debug, Release etc), so I don't understand where you're even expecting to pick up an environment specific value for those placeholders?
  2. The xml file example you give has no examples of syntax for the datasets but I seem to have guessed that by using is this correct?
  3. Can you please explain how the security inheritance is working? The existing inheritance seems to be forgotten if I place a single extra security on a folder where I have not also included the parent securities? Are there any element attributes (e.g. includeInheritance) we can use here which you perhaps haven't explained? (perhaps changing the collection node name to will help it's intelligibility too.
  4. Thanks very much for a marvellous TFS Extension otherwise, its very much appreciated, hope you can answer these questions?

The 'class' keyword is not supported in this version of the language.

When I try and use this tool I get the error below:-

2019-05-10T11:17:37.1366854Z ##[section]Starting: Deploy reports
2019-05-10T11:17:37.1572959Z ==============================================================================
2019-05-10T11:17:37.1573131Z Task : Deploy MS SQL SSRS Reports
2019-05-10T11:17:37.1573274Z Description : Deploy items on MS SQL SSRS server based on a configuration file.
2019-05-10T11:17:37.1573385Z Version : 3.1.4
2019-05-10T11:17:37.1573479Z Author : Mario Majcica
2019-05-10T11:17:37.1573590Z Help :
2019-05-10T11:17:37.1573692Z ==============================================================================
2019-05-10T11:17:38.6149542Z ##[error]At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1135 char:1

  • class Folder

The 'class' keyword is not supported in this version of the language.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1165 char:13

  • [string]Path()
    
  •         ~~~~
    

Unexpected token 'Path' in expression or statement.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1165 char:18

  • [string]Path()
    
  •              ~
    

An expression was expected after '('.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1176 char:1

  • class Report

The 'class' keyword is not supported in this version of the language.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1201 char:1

  • class DataSet

The 'class' keyword is not supported in this version of the language.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1226 char:1

  • class DataSource

The 'class' keyword is not supported in this version of the language.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1268 char:1

  • class RoleAssignment

The 'class' keyword is not supported in this version of the language.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1279 char:14

  • [string] ToString() { return "$($this.Name)" }
    
  •          ~~~~~~~~
    

Unexpected token 'ToString' in expression or statement.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1279 char:23

  • [string] ToString() { return "$($this.Name)" }
    
  •                   ~
    

An expression was expected after '('.

At D:\TFS2018Agent\Marg_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.4\ps_modules\ssrs.psm1:1282 char:1

  • class SsrsDataSource

The 'class' keyword is not supported in this version of the language.

Not all parse errors were reported. Correct the reported errors and try again.

Deploy reports error: error downloading asmx file

When attempting to deploy reports, I am getting an error for the deploy phase of the process.

image
I have confirmed that I am able to reach the ASMX endpoint manually with no issues.

The plugin is configured as follows:
image

Note: When attempting this with both WinAuth and SQL Server Auth, the same error results.

I have tried users with various permission settings with no change in results.

ImpersonateUser property, not ImpersonateUserSpecified

Hi,

First of all, thank you very much for this very useful DevOps task.

I am in a case where I deploy a SSAS DataSource for which I need to use Impersonation (no Kerberos).
image

So I configured the JSON Configuration File with the following properties, but I have the impression that the "ImpersonateUser" is not taken into account.
image

By checking the PowerShell code of your task, I have the impression that there is a small error at this level in function New-DataSource()
image

Is it a problem of use on my part?
Thank you for the feedback

Groups and Roles are not added to the security during deployment

The roles I added to the security inside my XML configuration are not added to SSRS during deployment.

I used the following XML as example:

<?xml version="1.0" encoding="utf-8"?>
<Folder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Root">
  <Folders>
    <Folder Name="MyFolder">
      <Reports>
        ...
      </Reports>
      <Security Name="myuser2">
        <Roles>
          <Role>Browser</Role>
          <Role>Content Manager</Role>
        </Roles>
      </Security>
    </Folder>
  </Folders>
  <Security>
    <Security Name="myuser1">
      <Roles>
        <Role>Browser</Role>
        <Role>Content Manager</Role>
      </Roles>
    </Security>
  </Security>
</Folder>

When testing the PowerShell functions I see that the Set-SecurityPolicy() function returns the folder path /Root for the root folder and /MyFolder/MyFolder for the MyFolder folder.

It seems that the folder name is added to one to many times to the path.

Support for PBIRS requested; deployment of Power BI reports

The current DeploySsrs version does not fully support the features of the new Power BI Reporting Server.

Desired outcome;
Being able to deploy a Power BI report using DeploySsrs.

A possible solution could be the Write-RsRestCatalogItem function at ReportingServicesTools that can deploy PBI reports, KPI's and other binary files (such as Excel or images).

@mmajcica Would you be willing to give your view on this request? I would like to know how I can contribute to your project.

Error while executing through PSSession

I am preparing the script which will deploy report through automated deploy.
When i run the script on my report server it will execute properly.
But when i tried to integrate into automated deploy it will initiate the powershell using PSSession at that time it's failing the deployment with below error.

Failed to establish proxy connection to http://101.112.20.1/ReportServer/ReportService2010.asmx : There was a
downloading 'http://101.112.20.1/ReportServer/ReportService2010.asmx'.
+ CategoryInfo : OperationStopped: (:) [], Exception
+ FullyQualifiedErrorId : Failed to establish proxy connection to http://101.112.20.1/ReportServer/Report
2010.asmx : There was an error downloading 'http://101.112.20.1/ReportServer/ReportService2010.asmx'.

even i tried to setup new proxy like below

` $proxy = New-RsWebServiceProxy -ReportServerUri $reportServerUri

Get-RsFolderContent -Proxy $proxy -ReportServerUri $reportServerUri -RsFolder $sourceRSFolder | Where-Object TypeName -eq 'Report' |
Select-Object -ExpandProperty Path |
Out-RsCatalogItem -Proxy $proxy -ReportServerUri $reportServerUri -Destination $downloadFolder`

Overwriting DataSources is handled badly

I'm currently trying to setup a pipeline and struggeling with the credential handling and the deployment of DataSources. The overwrite switch is handled quite badly by the SSRS itself. If the DataSource is present at the deployment the SSRS returns the status code 500 "Internal Server Error" (and 400 "Bad Request" in the body) of which both result in a deployment error in the pipeline. None of that is entirely true because the request is valid and the switch suggests that there could be already a DS with this name so handle that situation gracefully.

I suggest the intended behavior is that the DataSource is not overwritten if present and there is a warning. This happens if you deploy from within VS. The problem is that those http status code signal an error. So the SSRS is handling this whole situation quite bad. One solution could be to check if the DS is present before calling CreateDataSource from the API.

To add some background why this is a problem. I'd like to use a service account for that DataSource and store the credentials safely inside the SSRS. If I provide the full credentials on deployment the password would have to be in the XML and stored unencrpyted in the VCS. I can't deploy my reports with a properly linked DataSource without describing this DS in the XML for the reports. And I if I do that I would have to overwrite the DataSource because of how the SSRS handles overwriting. If the DS is overwritten I would have to either reapply the password for the DS in the SSRS website or provide the unencrypted password while deploying.

Exception calling "CreateFolder"

Exception calling "CreateFolder" with "3" argument(s): "The permissions granted to user '_Build' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'DOT\TFS12PRD_Build' are insufficient for performing this operation."

I have a TFS report structure structure with no folders in it. simple SSRS project inside the Visual Studio solution.

What is the proper settings in the config file?

I have a report server at /Reports/browse/ENGINEERING/Consultant%20Services

TFS REPO is WebsiteSolution/SSRSReportsProject/report1.rdl




	  <Folder Name="ENGINEERING/Consultant Services" Hidden="true" CleanExistingItems="false">
		  <Reports>
			  <Report Name="Report1" Hidden="false" FileName="Report1.rdl" />
		  </Reports>
	  </Folder>
		  
  
  </Folders>
  <Security>
    <Security Name="Users">
      <Roles>
        <Role>Browser</Role>
      </Roles>
    </Security>
    <Security Name="Administrator">
      <Roles>
        <Role>Browser</Role>
        <Role>Content Manager</Role>
      </Roles>
    </Security>
  </Security>
</Folder>

How to migrate the same report which was developed with SHARED DATA SOURCE to any other datasources(depending upon env) using XML config

I have various reports in DEV , QA and PROD environemnts .
Each environment has its own DataSource name. For example, DEVDATASOURCE, QADATASOURCE, and PRODDATASOURCE.

My objective is to develop an SSRS report, "Report1" by specifying its data source as DEVDATASOURCE and then use DEPLOY SSRS task to deploy and migrate "REPORT1" from DEV -> QA ->PROD.

Is there any way I can achieve my objective using this DEPLOY SSRS task? If so, could you please explain it.

Report Files Path with wildcard

Hello

I'm trying to use **/*.rdl in the report files path but I Always have this Following error message

Provided files folder path C:\TFS\Agents\SSI\SSRS\ssrs-dev-cd1_work\r1\a***.rdl is not valid.

All my rdl file are located in several folders under this folder C:\TFS\Agents\SSI\SSRS\ssrs-dev-cd1_work\r1\a\SSRS\SSRS\MyFolder\

Is it the correct that i m using wildcard in report files path

Tks

"Report" used for name when Name attribute missing in XML configuration

When using an XML file for the configuration, if the Name attribute is not specified on the Report element "Report" is used as the name when deploying.

$r = [Report]::new($report.name, $report.fileName, [System.Convert]::ToBoolean($report.inheritParentSecurity), [System.Convert]::ToBoolean($report.hidden))

I am not sure where the "Report" value is coming from as I've the options below and Name is still being set to "Report":

  • Replacing $report.name with $report.Attributes["Name"].Value
  • Replacing $report.name with $null

The ValidateNotNullOrEmpty validation attribute on the class doesn't generate an error as the value is neither null or empty.

Wrong property used for getting SharedDataSetReference name

Hi @mmajcica and @sqlkabouter.

I think there is bug in concept how shared datasets are referenced.

Look into this part of code (lines 954+):

If ($ReferenceDataSets -and $DataSets)  {
    $nodes = $Definition.SelectNodes('d:Report/d:DataSets/d:DataSet/d:SharedDataSet/d:SharedDataSetReference/..', $NsMgr)

     foreach($node in $nodes)
     {
          @($Datasets | Where-Object { $_.Name -eq $node.ParentNode.Name }) | ForEach-Object { $node.SharedDataSetReference = $_.Path }
     }
}

In this code dataset's name defined in config file is compared to node.ParentNode.Name.
In si not correct because ParentNode.Name is name of report's datatable not shared datatable.
Shared datatable's name is inside $node.

If report's datatable has reference to shared datatable with same name there is no problem.
But if names are different, task will not match it.

Originally posted by @sebitsi in #1 (comment)

Unable to create subfolders

I have the following XML and expecting to create these folder structures in the report server.
However, it is creating only data source but not the subfolders.

Please help me out by specifying the correct way of specifying the XML to create subfolders and reports in subfolders.

This is the XML used
image

Expected FOLDER Structure on Report Server

screenshot1 - My ROOT folder structure
image

screenshot2 - My ENV folder structure

image

screenshot2 - My Reports structure
Lets say I have two reports under HOME -->QA-->AREPORTS
image

Error ps_modules\ssrs.psm1:1156 char:1

I am getting this error ps_modules\ssrs.psm1:1156 char:1. I tried to follow everything in the documentation. I have on SQL Server 2017 Reporting Services. I have a very simple setup, just trying to deploy one report as a proof of concept. I do not want the dataset to be deployed as it using a shared dataset already on the server
report
.

Here is my config file.




    <Folder Name="Reports">
      <Reports>
        <Report Name="Report1" Hidden="false" FileName="Report1.rdl" />
      </Reports>
      
    </Folder>
  </Folders>
  <Security>
    <Security Name="Users">
      <Roles>
        <Role>Browser</Role>
      </Roles>
    </Security>
    <Security Name="Administrator">
      <Roles>
        <Role>Browser</Role>
        <Role>Content Manager</Role>
      </Roles>
    </Security>
  </Security>
</Folder>

3.1.8\ps_modules\ssrs.psm1:1156 char:1

  • class Folder

The 'class' keyword is not supported in this version of the language.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1198 char:13

  • [string]Path()
    
  •         ~~~~
    

Unexpected token 'Path' in expression or statement.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1198 char:18

  • [string]Path()
    
  •              ~
    

An expression was expected after '('.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1209 char:1

  • class Report

The 'class' keyword is not supported in this version of the language.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1234 char:1

  • class DataSet

The 'class' keyword is not supported in this version of the language.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1259 char:1

  • class DataSource

The 'class' keyword is not supported in this version of the language.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1301 char:1

  • class RoleAssignment

The 'class' keyword is not supported in this version of the language.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1312 char:14

  • [string] ToString() { return "$($this.Name)" }
    
  •          ~~~~~~~~
    

Unexpected token 'ToString' in expression or statement.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1312 char:23

  • [string] ToString() { return "$($this.Name)" }
    
  •                   ~
    

An expression was expected after '('.

At D:\vsts-agent-win7-x64-2.122.1_work_tasks\DeploySsrs_8608c690-a833-11e7-a937-ebb9e5076155\3.1.8\ps_modules\ssrs.psm1:1315 char:1

  • class SsrsDataSource

The 'class' keyword is not supported in this version of the language.

Not all parse errors were reported. Correct the reported errors and try again.

Data Source When Deploying SSRS Report

We are deploying SSRS reports and data sources directly from VS. In this the Data Source is being dropped.
I have tried several configuration changes to get the report to recognize the data source.
Is there an entry we can add that will force the location of the Data Source? In your statement below it seems it is defaulting to "DataSource" and our folder name is "Data Source".

Reference DataSources: If selected the DataSources in the configuration file will be referenced in the Reports, by matching the DataSource name.

Thanks!
Marshall

Need Wild cards support in Report Files Path

I have various reports with logical grouping under $(Build.SourcesDirectory) as below. I have tried various match pattern options on Report Files Path to do deployment but in vain.

Reports source folder path
$(Build.SourcesDirectory)*grp1*\bin\release\1.rdl
$(Build.SourcesDirectory)*grp1*\bin\release\2.rdl
$(Build.SourcesDirectory)*grp2*\bin\release\3.rdl
$(Build.SourcesDirectory)*grp3*\bin\release\4.rdl

Few of Match Patterns I have tried
*\bin*
*\bin\release*
$(Build.SourcesDirectory)*\bin*

However, I have found a workaround for this. Usage of the VSTS COPY FILES task with FLATTEN FOLDERS option can resolve it. Would be great, if you can fix this issue in your DEPLOY SSRS task with the match patterns?

Incompatible SSRS Server versions

I have a rdl that was created using VS2017 and latest SSDT version. When I try to deploy the RDL to a SSRS 2014 instance. I get the following error.

##[error]Exception calling "CreateCatalogItem" with "7" argument(s): "The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded."

When we deploy using VS2017 we have to set the target server version to "SQL Server 2008 R2, 2012 or 2014". If I set the target server version to "SQL Server 2016 or later" I get...

The report server at 'http://{server}/reportserver' is an earlier version than the one specified in the TargetServerVersion property. The RDL files generated by the build process are incompatible with the report server. Change TargetServerVersion to '' then Clean and Rebuild to generate RDL with matching schema.

What versions of SSRS does this tool support? Is there a way to set a target server version?

Error when deploying Data Sources

Build runs without issue, unless I have Reference Datasets checked.
Syntax of my data sources follows the examples in the "Example of the configuration file".
Error is - "The property 'InnerText' cannot be found on this object. Verify that the property exists and can be set".
assuming tied to the line of code mentioned in this issue
#14
-$Datasources | Where-Object { $.Name -eq $node.Name } | ForEach-Object { $node.DataSourceReference = $.Path.ToString() ; $node.ChildNodes[2].InnerText = $_.Id }

any thoughts on what I have missing? Thanks!!

how to pass server name into configuration file

We have create the configuration file using the var {{Server}} in the data source configuration,
the result of the deploy doesn't appear modified:

This is the information of the config file:
image

In the release pipeline the variables are created:
image

And the task as the following info:
image

thank you.

Access Denied Error

Here is my configuration for the task. All I get when I execute the release is ##[Error]Access is denied. Any help/ideas would be greatly appreciated. Thanks in advance.
image

Here is the error I get on the logs
2019-01-11T02:45:39.8351702Z ==============================================================================
2019-01-11T02:45:39.8351702Z Task : Deploy MS SQL SSRS Reports
2019-01-11T02:45:39.8351702Z Description : Deploy items on MS SQL SSRS server based on a configuration file.
2019-01-11T02:45:39.8351702Z Version : 3.1.3
2019-01-11T02:45:39.8351702Z Author : Mario Majcica
2019-01-11T02:45:39.8351702Z Help :
2019-01-11T02:45:39.8351702Z ==============================================================================
2019-01-11T02:45:45.8508839Z ##[error]Access is denied
2019-01-11T02:45:45.8665094Z ##[section]Finishing: Deploy reports
2019-01-11T02:45:45.8821200Z ##[section]Finishing: Release

Here is my configuration file

`<?xml` version="1.0" encoding="utf-8"?>
<Folder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Root">
  <Folders>
    <Folder Name="Folder">
      <Folders>
        <Folder Name="Data Sources" Hidden="true">
          <DataSources>
            <DataSource ConnectionString="Data Source=myserver;Initial Catalog=mydb" Name="UPenterprise" Extension="SQL" CredentialRetrieval="Integrated" />
            <DataSource ConnectionString="Data Source=myserver;Initial Catalog=mydb" Name="UPenterprise" Extension="SQL" CredentialRetrieval="Store" UserName="SSRSUser" Password="123123" WindowsCredentials="False" />
          </DataSources>
        </Folder>
        <Folder Name="UPExpress" Hidden="true">
          <Reports>
            <Report Name="ArchiveRollback" Hidden="true" FileName="ArchiveRollback.rdl" />
          </Reports>
          <Security>
            <Security Name="SSRSUser">
              <Roles>
                <Role>Browser</Role>
                <Role>Publisher</Role>
                <Role>Content Manager</Role>
              </Roles>
            </Security>
          </Security>
        </Folder>
      </Folders>
      <Security>
        <Security Name="Users">
          <Roles>
            <Role>Browser</Role>
          </Roles>
        </Security>
        <Security Name="SSRSUser">
          <Roles>
            <Role>Browser</Role>
            <Role>Content Manager</Role>
          </Roles>
        </Security>
      </Security>
    </Folder>
  </Folders>
</Folder>

SSRS destination folder
image

A few more pieces of information. The configuration file lives in the destination server where reports will be deployed to. I am not sure if this could be causing the problem.

Error from SSRS Log
library!ReportServer_0-8!1be8!01/10/2019-21:16:50:: i INFO: Call to GetItemTypeAction(wsdl/ReportService2010.asmx). User: UPEXCHANGE-DEV\SSRSUser.
library!ReportServer_0-8!1be8!01/10/2019-21:16:50:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: , Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The path of the item 'wsdl/ReportService2010.asmx' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash.;
library!WindowsService_44!1fa0!01/10/2019-21:23:52:: i INFO: Call to CleanBatch()
library!WindowsService_44!1fa0!01/10/2019-21:23:52:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings, 0 edit sessions.
library!WindowsService_44!1fa0!01/10/2019-21:23:52:: i INFO: Call to CleanBatch() ends

Wildcard for reports in configuration file

Is there are way to write the configuration file so that it can deploy multiple/all reports ao a specific folder without listing each report file by name or do you have to customize the build/release process each time a developer adds a report?

Json Configuration File Doesn't Work

When trying to use a json configuration file it complains about ssrs.psm1 line 472. I checked the Folder class and it definitely doesn't have that constructor ...

Cannot find an overload for "new" and the argument count: "3".
At .\ssrs.psm1:472 char:5
+     $f = [Folder]::new($folder.name, $Parent, $folder.hidden)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest

Default value for endpoint not working

"defaultValue": "http://your.server/ReportServer/ReportService2010.asmx?wsdl",

The specified default value will not work in this current setting. As it not ends on .asmx the full URL will look like the following when run:
http://your.server/ReportServer/ReportService2010.asmx?wsdl/ReportService2010.asmx

It works without the ?wsdl though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.