tobania / VSTS.Extension.SqlReportingServices

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

Release management error when deploying to a reporting services. #2

Open Audberto opened 7 years ago

Audberto commented 7 years ago

Hi again. I hope you're enjoying this day.

Now I have the RDS file that correspond to a Datasource. When I try to upload it with two rdl files, Release Management ends with the following error. Also, I am copying images with the Release definition using your tool.

Please, Can you tell me what is causing that error? Do you notice something wrong in the Release Definition?

2017-03-02T19:28:49.9785083Z ##[error]Exception calling "Substring" with "2" argument(s): "Length cannot be less than zero. 2017-03-02T19:28:49.9785083Z ##[error]Parameter name: length"

2017-03-02T19:28:51.3845343Z ##[error]Exception calling "CreateDataSource" with "5" argument(s): "System.Web.Services.Protocols.SoapException: The name of the item '' is not valid. The name must be less than 260 characters long. The name must not start with a slash character or contain a reserved character. Other restrictions apply. For more information on valid item names, see http://go.microsoft.com/fwlink/?LinkId=248859. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemNameException: The name of the item '' is not valid. The name must be less than 260 characters long. The name must not start with a slash character or contain a reserved character. Other restrictions apply. For more information on valid item names, see http://go.microsoft.com/fwlink/?LinkId=248859.

2017-03-02T19:28:51.3845343Z ##[error] at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateDataSource(String DataSource, String Parent, Boolean Overwrite, DataSourceDefinition Definition, Property[] Properties, String ParameterName, CatalogItem& ItemInfo)

2017-03-02T19:28:51.3845343Z ##[error] at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateDataSource(String DataSource, String Parent, Boolean Overwrite, DataSourceDefinition Definition, Property[] Properties, CatalogItem& ItemInfo)"

releasedefinitionimage1 releasedefinitionimage2

Note: I have tried too to leaving the Connectionstring parameter in blank. But the same error occurs.

Thank you very much and sorry for all the inconvenience Best regards Audberto

anton-kirschhock commented 7 years ago

Okay I see a few things you should revisit:

I don't see something else which could be the reason for the failing task.

If you want a resource file uploaded aswel, tick "Include Resource files".

For the Substring issue, I patched it this morning. Can you check you have the latest version? Can you re-run the task? That issue should be solved.

I am currently working on another project, so I don't have time to write documentation concerning these items. I hope I find time after this project to write the documentation files of this github :)

Audberto commented 7 years ago

Hi.

I have installed the 1.2.29 version. After that, I added file extension as you suggest me. When I execute the release again, It finished registering the next error. Rds files were not published on Report Server and Rdl files were published but without Datasource reference.

2017-03-04T21:57:30.1356893Z ##[error]Exception calling "CreateDataSource" with "5" argument(s): "System.Web.Services.Protocols.SoapException: The name of the item '' is not valid. The name must be less than 260 characters long. The name must not start with a slash character or contain a reserved character. Other restrictions apply. For more information on valid item names, see http://go.microsoft.com/fwlink/?LinkId=248859. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemNameException: The name of the item '' is not valid. The name must be less than 260 characters long. The name must not start with a slash character or contain a reserved character. Other restrictions apply. For more information on valid item names, see http://go.microsoft.com/fwlink/?LinkId=248859. 2017-03-04T21:57:30.1356893Z ##[error] at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateDataSource(String DataSource, String Parent, Boolean Overwrite, DataSourceDefinition Definition, Property[] Properties, String ParameterName, CatalogItem& ItemInfo) 2017-03-04T21:57:30.1356893Z ##[error] at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateDataSource(String DataSource, String Parent, Boolean Overwrite, DataSourceDefinition Definition, Property[] Properties, CatalogItem& ItemInfo)"

Thanks a lot for your Help. Audberto.

anton-kirschhock commented 7 years ago

ok this looks like there is no name supplied to the datasource. Can you open the RDS file in a Text editor and look for a Name attribute?: `

SQL Please enter your username and password: 383ecb53-549c-4c72-8586-9a0a2c879d39

`

Do you only have one RDS file?

Audberto commented 7 years ago

Hi.

I have two datasources: NTfs2010ReportDS.rds and NTfs2010OlapReportDS.rds I have two Reports: Demo Backlog Overview.rdl and Demo Sprint Burndown.rdl Here you can see part of its definition: report_two_datasources report_one_datasource ntfs2010olapreportds ntfs2010reportds

Thanks a lot for your answer and help. Best regards Audberto

anton-kirschhock commented 7 years ago

Exactly what I was thinking: Can you add in the DataSourceDefinition tag an attribute Name for each RDS. That will be: Name="NTfs2010ReportDS" for NTfs2010ReportDS.rds and Name="NTfs2010OlapReportDS" for NTfs2010OlapReportDS.rds

should work now

Audberto commented 7 years ago

Hi. I did changes as you mention:

After a Release, the reports was deployed in reporting, but the datasources were not associated. The datasources> "NTfs2010OlapReportDS", "NTfs2010ReportDS" were not published in reporting. I'm sending you the log file as an attachment. [Log Deploy RDS y RDL files.txt](https://github.com/tobania/VSTS.Extension.SqlReportingServices/files/822630/Log.Deploy.RDS.y.RDL.files.txt) Thanks Audberto
anton-kirschhock commented 7 years ago

Screenshot the rds again please

Audberto commented 7 years ago

Hi. I am sending you RDS images: ntfs2010olapreportds1 ntfs2010reportds1 Best regards Audberto

anton-kirschhock commented 7 years ago

I have a feeling you use an older version of SQL Server reporting tools in Visualstudio to create the datasource. Our root tag is while your is DataSourceDefinition.

Can you try following xml code inside the NTfs2010ReportDs.rds file:

`<?xml version="1.0" encoding="utf-8"?>

SQL Data Source=VSALM;Initial Catalog=Tfs_Warehouse True 0ff74c49-84f6-42ee-a84a-2a7a52ac4a12 ` Also verify the connectionstring and GUID (from the rdl file Demo backlog overview).
Audberto commented 7 years ago

Hi. I have changed the RSD file as you indicated me. Regarding the RDL file:Demo Backlog Overview, I have changed Datasource name to:

NTfs2010ReportDS None 0ff74c49-84f6-42ee-a84a-2a7a52ac4a12 In the Release Definition I have the next parameters values: Remote Datasource path = /Home Remote Dataset path = /Home Note: I don't know why this error is in the log "...... the item '/Home' cannot be found" The release ends with error. The datasource and the report were [Log Deploy RDS y RDL files.txt](https://github.com/tobania/VSTS.Extension.SqlReportingServices/files/825840/Log.Deploy.RDS.y.RDL.files.txt) not published in Reporting. I'm sending the log file. Thanks Best regards Audberto
anton-kirschhock commented 7 years ago

If it said: cannot find /Home, it means the folder is missing.. Which version of...:

...Are you using?

Audberto commented 7 years ago

Hi. First of all, thanks a lot for your attention and help.

TFS 2015 UPD 2 SQL Server 2012 VS Enterprise 2015 UPD 2 RSS 11.0.6020.0 Perhaps the value of the datasource parameter "/Home" is my mistake. I specified this value in the Release definition, because I see this in Reporting Services. Please see image. Thanks. reportinservices

ygeelen-tb commented 7 years ago

Audberto, Home is just a name for the root of your directory. Use "/" as the root path instead of "/Home" and use a path that starts with "/TfsReports/..." for the reports. If it's still not working then please include a screenshot of your complete current release definition configuration?

Audberto commented 7 years ago

HI. I changed the path as you mentioned. The Release ended with error. The Datasources was created but the Reports Not. I'm sending some images of the Release Definition and attaching the log file where you can see the error. relesease definition - task copy files relesease definition - task sql reports deploy-1 relesease definition - task sql reports deploy-2 Log Deploy Process.txt

Comment: I haven't changed to build parameters as you mentioned before, because I had an error related with permissions whit a specific path. I'll work in it after we can have a successfully deploy.

Thanks a lot for your help. Best regards Audberto.

ygeelen-tb commented 7 years ago

Are you sure you have dataset file(s)? The file extension for those is *.rsd

Audberto commented 7 years ago

Hi. No I don't have RSD Files. I Have RDS files and RDL Files So, in that case may I have to uncheck "include Dataset Check" check in the Release definition? Audberto

ygeelen-tb commented 7 years ago

Indeed

Audberto commented 7 years ago

Hi. Ok. Now the release ended successfully. Datasorces and Reports were published, but when I see Reports properties, the datasource was not associated automatically. properties of the published report Audberto.

ygeelen-tb commented 7 years ago

Nice! Did you associate the reports with the datasource before deploying? You could also simply link them on the Report Server online, the link will not break when deploying again.

ygeelen-tb commented 7 years ago

If you confirm the issue is solved I will close the issue. It would be very kind if you could leave another review.

Audberto commented 7 years ago

Hi. Thanks a lot for your Help. Yes, The reports were associated to the datasource before the deploying process. I have two additional questions: 1) After the datasources were deployed, I had to changed manually "Credentials stored securely in the report server". each time the datasources are deployed in RSS. Do you know if there is a way to do it automatically when loading the datasource?m Please see image: Credentias in the datasource 2) I am not sure how to specify the path where reports should be loaded when the path is different for each RDL file to load. Please see image: Report Upload Path credentias in the datasource report upload path

Best Regards Audberto

ygeelen-tb commented 7 years ago

We'll try to check soon.. Do you need to link the datasource even when you deploy again after linking it manually on the report server? We didn't have that problem.

If you have multiple report folders you can simply add the deploy task multiple times. Will that suffice?

Audberto commented 7 years ago

Thanks a lot for your attention and suggestions. Is not very practical for what I need because I would have to be modifying the Release definition when I need to publish a report in a path that is not in the defined tasks. As the reports and folder structure are already in Visual Studio. Through a Build process, I download the files. When they are downloaded they already have the folder structure, so what I need is to take those reports including the folder structure and publish them in RSS. I hope I was clear with what I need to do

Best Regards Audberto.

ygeelen-tb commented 7 years ago

It's clear and we'll see if this is possible.

By the way: Visual Studio projects of type Reporting Services don't allow subfolder creation, while the ReportServer does allow this.

ygeelen-tb commented 7 years ago

About the datasource linking: we implemented a new feature, see the "Update Data Source" checkbox.