mmajcica / DeploySsrs

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

Data Source When Deploying SSRS Report #4

Closed MarshallPless closed 6 years ago

MarshallPless commented 6 years ago

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

mmajcica commented 6 years ago

Hi, Data Sources can be only 'declaratively' specified in the configuration and then they will be created. You can't provide them as artifacts (like rdl files). I think it is mentioned in the description page somewhere. This is because they are easy to create and if specified in config file it is also easy to manipulate the environment dependent values from within the release.

Does this answer you question?

MarshallPless commented 6 years ago

Since I am somewhat new to writing config files can you provide an example?

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 20, 2018 7:17 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

Hi, Data Sources can be only 'declaratively' specified in the configuration and then they will be created. You can't provide them as artifacts. I think it is mentioned in the description of the page somewhere. This is because they are easy to create and if specified in config file it is also easy to manipulate the environment dependent values from within the release.

Does this answer you question?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-406571225, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXdz6pR_olb8eVe_iV_267153PAENks5uIbwcgaJpZM4VW3BJ.

mmajcica commented 6 years ago

Sure, here you can find one:

https://marketplace.visualstudio.com/items?itemName=mmajcica.deploy-ssrs

<DataSources>
    <DataSource ConnectionString="Data Source={{Server}}\{{Instance}};Initial Catalog=MyDB" Name="MyDB" Extension="SQL" CredentialRetrieval="Integrated" />
    <DataSource ConnectionString="Data Source={{Server}};Initial Catalog=MetaData" Name="MetaData" Extension="SQL" CredentialRetrieval="Store" UserName="user" Password="password" WindowsCredentials="True" />
</DataSources>
MarshallPless commented 6 years ago

Yup – I have that in my code. I am able to create the Data Source. However, when I deploy a new Report it is not showing the data source. So I need to figure out how to tell the newly deployed report to use the new or existing data source.

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 20, 2018 7:27 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

Sure, here you can find one:

https://marketplace.visualstudio.com/items?itemName=mmajcica.deploy-ssrs

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-406573108, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXQvnzUC2OapvtfMDeK4HHxlf0fNpks5uIb51gaJpZM4VW3BJ.

mmajcica commented 6 years ago

The should match on name.

Check here https://github.com/mmajcica/DeploySsrs/blob/64bf1ba98c08ebf593c60cf6f523353b7e6aade1/task/ps_modules/ssrs.psm1#L946

and here

https://github.com/mmajcica/DeploySsrs/blob/64bf1ba98c08ebf593c60cf6f523353b7e6aade1/task/ps_modules/ssrs.psm1#L986

MarshallPless commented 6 years ago

Unfortunately, it is not. I will test some more. Thanks.

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 20, 2018 7:34 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

The should match on name.

Check here https://github.com/mmajcica/DeploySsrs/blob/64bf1ba98c08ebf593c60cf6f523353b7e6aade1/task/ps_modules/ssrs.psm1#L946

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-406574544, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXaFgZ7vfsAHuxC99aL6brQw4mqBnks5uIcAugaJpZM4VW3BJ.

MarshallPless commented 6 years ago

Follow up.

It seems the data source within the report cannot simply be a pointer to a shared data source. It must contain the same exact name. Odd- but true.

Thanks for your help!

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 20, 2018 7:27 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

Sure, here you can find one:

https://marketplace.visualstudio.com/items?itemName=mmajcica.deploy-ssrs

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-406573108, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXQvnzUC2OapvtfMDeK4HHxlf0fNpks5uIb51gaJpZM4VW3BJ.

MarshallPless commented 6 years ago

Mario Do you mind if I ask one more question?

            I see you have the ability to add security, however, it appears that its associate at the folder level.

            IF that is true:  Is there a way to add it at the report level? We implement our security at the report level.

Thanks. PS> I appreciate all your help !

My xml: Sample?

[cid:image001.png@01D424D3.5D588A10]

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 20, 2018 7:34 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

The should match on name.

Check here https://github.com/mmajcica/DeploySsrs/blob/64bf1ba98c08ebf593c60cf6f523353b7e6aade1/task/ps_modules/ssrs.psm1#L946

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-406574544, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXaFgZ7vfsAHuxC99aL6brQw4mqBnks5uIcAugaJpZM4VW3BJ.

mmajcica commented 6 years ago

Not at all.

It is sure possible what you are asking for. You can set SecurityPolicy on the following elements:

It is set in the same way as on folder, just nest it under the desired element, e.g.

<Report Name="Error Report" Hidden="true" FileName="Error Report.rdl">
    <Security>
        <Security Name="Administrator">
          <Roles>
            <Role>Browser</Role>
            <Role>Content Manager</Role>
          </Roles>
        </Security>
  </Security>
</Report>

I also tested it after the implementation on Reports, so it should be good to go (I haven't tested DataSets much).

Let me know how it went.

MarshallPless commented 6 years ago

As I started loading my older reports I ran into this error. Not much about it on the “internet”. Seen this before? - The id mentioned has rights to all folders (full rights) so no reason this should be happening. Unfortunately it doesn’t tell me what its trying to do when it says it doesn’t have rights.

2018-07-27T13:30:21.1355363Z ##[error]Exception calling "CreateCatalogItem" with "7" argument(s): "The permissions granted to user 'NATLAUTO\NACBUILD1$' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'NATLAUTO\NACBUILD1$' are insufficient for performing this operation."

Thanks.

This is mine and its not adding the security to the report.

</Folder>
<Folder Name="DEV" Hidden="false">
  <Reports>
    <Report Name="0003S-New Dealer Activity" Hidden="false" FileName="0003S-New Dealer Activity.rdl"/>
      <Security>
        <Security Name="NATLAUTO\SSRS-0003">
          <Roles>
            <Role>Browser</Role>
          </Roles>
        </Security>
      </Security>

………..

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Thursday, July 26, 2018 3:52 PM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

Not at all.

It is sure possible what you are asking for. You can set SecurityPolicy on the following elements:

It is set in the same way as on folder, just nest it under the desired element, e.g.

I also tested it after the implementation on Reports, so it should be good to go (I haven't tested DataSets much).

Let me know how it went.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-408215263, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXYndFXHMdlpUjFF8d6rc8IwJ9vDIks5uKh3UgaJpZM4VW3BJ.

mmajcica commented 6 years ago

It just means that user on which you are running you agent NATLAUTO\NACBUILD1$ doesn't have sufficient rights to deploy that report.

MarshallPless commented 6 years ago

But it does… at the folder level it has full rights.

I cant tell “which” report is not being deployed. I would be able to trouble shoot it better if it gave some information as to which one was failing.

Anywhere I can look? My other option is to start removing reports – and I have over 300 in this project.

The entire log. 2018-07-27T13:42:35.1675798Z ##[section]Starting: Deploy reports 2018-07-27T13:42:35.1675798Z ============================================================================== 2018-07-27T13:42:35.1675798Z Task : Deploy MS SQL SSRS Reports 2018-07-27T13:42:35.1675798Z Description : Deploy items on MS SQL SSRS server based on a configuration file. 2018-07-27T13:42:35.1675798Z Version : 3.1.1 2018-07-27T13:42:35.1675798Z Author : Mario Majcica 2018-07-27T13:42:35.1675798Z Help : 2018-07-27T13:42:35.1675798Z ============================================================================== 2018-07-27T13:42:50.7936133Z ##[warning]The text box Textbox52' and the text boxTextbox61' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.7936133Z ##[warning]The text box Textbox51' and the text boxTextbox61' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8404909Z ##[warning]The text box Textbox50' and the text boxTextbox16' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8404909Z ##[warning]The text box Textbox50' and the text boxTextbox43' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8404909Z ##[warning]The text box Textbox50' and the text boxTextbox45' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8561144Z ##[warning]The text box Textbox49' and the text boxTextbox46' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8561144Z ##[warning]The text box Textbox49' and the text boxTextbox77' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8561144Z ##[warning]The text box Textbox49' and the text boxTextbox16' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:50.8717433Z ##[warning]The text box Textbox47' and the text boxTextbox61' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:52.3874855Z ##[warning]The text box Textbox11' and the text boxTextbox13' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:52.4030946Z ##[warning]The text box GrossReserves7' and the text boxGrossReserves9' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:52.4030946Z ##[warning]The text box GrossReserves7' and the text boxGrossReserves8' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:52.6687542Z ##[warning]The text box Textbox11' and the text boxTextbox13' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:52.6687542Z ##[warning]The text box GrossReserves7' and the text boxGrossReserves9' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:52.6687542Z ##[warning]The text box GrossReserves7' and the text boxGrossReserves8' overlap. Overlapping report items are not supported in all renderers. 2018-07-27T13:42:54.0750905Z ##[error]Exception calling "CreateCatalogItem" with "7" argument(s): "The permissions granted to user 'NATLAUTO\NACBUILD1$' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'NATLAUTO\NACBUILD1$' are insufficient for performing this operation." 2018-07-27T13:42:54.1375900Z ##[section]Finishing: Deploy reports

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 27, 2018 9:44 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

It just means that user on which you are running you agent NATLAUTO\NACBUILD1$ doesn't have sufficient rights to deploy that report.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-408422612, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXRJOytBYABNjviPNIJ_6BrgY8KYfks5uKxkrgaJpZM4VW3BJ.

mmajcica commented 6 years ago

Have you perhaps made security on the folder such that the build account has no rights to deploy into it? Can you add on that folder security also the build account with an admin role?

mmajcica commented 6 years ago

Also, lets continue via email. Can you drop me your email address via http://blog.majcica.com/contact/ ?

MarshallPless commented 6 years ago

Done thanks,. mpless@nationalautocare.commailto:mpless@nationalautocare.com

Marshall Pless 904.285.4401 x8127

From: Mario Majcica notifications@github.com Sent: Friday, July 27, 2018 9:52 AM To: mmajcica/DeploySsrs DeploySsrs@noreply.github.com Cc: Marshall Pless MPless@nationalautocare.com; Author author@noreply.github.com Subject: Re: [mmajcica/DeploySsrs] Data Source When Deploying SSRS Report (#4)

Also, lets continue via email. Can you drop me your email address via http://blog.majcica.com/contact/ ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mmajcica/DeploySsrs/issues/4#issuecomment-408424910, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AnhzXQML6y78MR2IEgIyK4Dz5lAcVgyZks5uKxsCgaJpZM4VW3BJ.