tobania / VSTS.Extension.SqlReportingServices

VSTS Extension for uploading SSRS Reports
MIT License
14 stars 20 forks source link

Update Data Source not working when Shared Datasources are in different path than Reports #54

Open jabteles opened 5 years ago

jabteles commented 5 years ago

Hi,

The variable $RemoteRootPath stores something like /Enterprise/Reports which is the path for the Enterprise Reports we want to deploy.

When whe try to deploy the reports with $UpdateDataSourceToRemote to true, report datasources are not updated to the existing shared datasources.

Later in the script you assing $serverDataSources = $ssrs.ListChildren($RemoteRootPath,$true); but the $RemoteRootPath stores the reports destination folder, not datasources.

And when you compare if([System.String]::Compare($serverDataSource.Name.Trim(),$reportDataSourceName.Trim(),$true) -eq 0) it returns 1, not updating the datasources of the report.

It is trying to compare the report $reportDataSourceName which is correct but with a wrong $serverDataSource which returns the report.

I don't know if I'm doing something wrong.

If not, a feature would be to include a $DatasourceRootPath and assign it as an optional parameter in the release task when the "Update Data Source" is picked.

By doing this I could specify that my reports will be deployed to /Enterprise/Reports and they should find they're datasources in /Enterprise/Datasources.

Thanks and regards,

ygeelen-tb commented 5 years ago

Could you please provide screenshots of your task configuration and SSRS folder structure if possible ?

jabteles commented 5 years ago

Hi @ygeelen-tb ,

I attach our task and SSRS folder structure:

image

Datasources are in /Datasources

Reports are in /Relatorios

Regards,

jabteles commented 4 years ago

Hi, any update on this? Regards

ygeelen-tb commented 4 years ago

Could you try using the shared root folder for your DataSources and Reports as Remote Upload Path (I think "/" or "/Enterprise/")? And mimic the directory structure in source control to what exists on SSRS?

jabteles commented 4 years ago

@ygeelen-tb Thanks for your answer. I understand that is probably a technical workaround for the issue, but in our case we don't want to include the DataSources in the builds from the Development because they are controlled outside of that.

Don't know if my comment is a possibility for this scenario where the DataSources path differs from the Reports path:

a feature would be to include a $DatasourceRootPath and assign it as an optional parameter in the release task when the "Update Data Source" is picked.

By doing this I could specify that my reports will be deployed to /Enterprise/Reports and they should find they're datasources in /Enterprise/Datasources.