mmajcica / DeploySsrs

Build-Release task for VSTS/TFS that manages Microsoft's SQL Server Reporting Services
MIT License
21 stars 21 forks source link

Warnings on DataSet Deployments #14

Open fup43 opened 5 years ago

fup43 commented 5 years ago

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>
mmajcica commented 5 years ago

That's what we get from SSRS, I can't exclude that. But that is a valid message. As I do upload the dataset with the reference specified in the file, that one can't be found and that is why the warning message is written out. It is true that I do set later the right DS in a different call: https://github.com/mmajcica/DeploySsrs/blob/31cb5311bfcc7a0993012a18163d21ce9839a4c5/task/ps_modules/ssrs.psm1#L1090

For reports, I think it is fixed and the following would be a better approach: https://github.com/mmajcica/DeploySsrs/blob/31cb5311bfcc7a0993012a18163d21ce9839a4c5/task/ps_modules/ssrs.psm1#L948

However, I have no time at the moment to look at it nor the necessary to run tests. If you feel it, I'll be happy to accept a PR.