-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the FileExtensionsToUpload parameter to control which file type… #323
base: master
Are you sure you want to change the base?
Conversation
…s from the folder are uploaded.
Could you add an example or two so that the intended use/benefit is a little more clear? |
@SQLvariant - Did you mean in the comment above? In general I needed this because our RDL and RDS files are in the same location locally, but need to be deployed to different locations on the server. By default Write-RsFolderContent takes Data Sources and Reports and assumes that they have to go in the same directory. Or assumes that if you want to update your Reports you also want to update your Data Sources. It can also help to address another issue where you will get warnings if the Data Sources are not uploaded to the server before the Reports. I had to move to slightly different approach and used Write-RsFolderContent as an example for my own function. I needed a callback for each item that was uploaded in order to update the each Data Source's connection credentials and update each report's Data Source Reference with the correct path on the server after they were uploaded. |
Oh I was asking if you could add an example to the |
Ok Sorry this took me so long, I've added another example. |
Please add a test covering this new functionality in https://github.com/microsoft/ReportingServicesTools/blob/master/Tests/CatalogItems/Write-RsFolderContent.Tests.ps1 |
What about to download report file extension ? |
Added the FileExtensionsToUpload parameter to Write-RsFolderContent in order control which file type from the folder are uploaded.
Changes proposed in this pull request:
For Example
Write-RsFolderContent -ReportServerUri 'http://localhost/reportserver_sql2012' -Path c:\Reports -RsFolder '/monthlyReports' -FileExtensionsToUpload @(".rsdl")
Write-RsFolderContent -ReportServerUri 'http://localhost/reportserver_sql2012' -Path c:\Reports -RsFolder '/dataSources' -FileExtensionsToUpload @(".rsds", ".rsd", ".rds")
How to test this code:
-FileExtensionsToUpload @(".rsds", ".rsd", ".rds")
Has been tested on (remove any that don't apply):
(This is my first powershell-based pull-request so please let me know if my style is off in anyway or if this isn't something wanted in the main branch, this is a feature that I needed to automate our deployment)