Error while publishing a report using rs.exe - reporting-services

I'm getting the following error when publishing a report from the command line using the report scripting tool:
System.Web.Services.Protocols.SoapException: The definition of this
report is not valid or supported by this version of Reporting
Services. The report definition may have been created with a later
version of Reporting Services, or contain content that is not
well-formed or not valid based on Reporting Services schemas
There are other questions regarding this error and the solution always seems to be to either install SQL Server 2016 or to change my reports project to output for 2014. This does, in fact, work but it shouldn't be necessary. My SQL Server version is 13.0.4446.0, which is 2016. Furthermore, I can publish just fine from within VS with it set to 2016.
Anyone know what's causing this?

A couple things to try:
What version of VS are you using? I came across an issue where I'd open a solutions in VS 2015 (I think) and it upgraded report definitions without telling me. When you pick a deployment target in VS it changes the file on the fly, not the source file in the solution. Hence the different results you see.
You can check this by downloading a report from SSRS & open the RDL in a text editor. Compare with your solution RDL & check the header. The Schema at the top is what you want to compare:
Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"
Another option: Have you tried deploying with PowerShell? Check out the SSRS GitHub for commands but it will be 2, maybe 3 lines of code. Very easy to use.

Related

Unknown error when upgrading from SSRS 2014 to 2016

I had to upgrade the report server used by some application from SSRS 2014 to SSRS 2016.
I did the migration manually, because the old and new SSRS were installed on different machines, and I could not do an in-place update.
So the approach was (long story short):
backup ReportServer on SSRS 2014
install SSRS 2016 on new server
restore ReportServer database
update its structure to match SSRS 2016; I used Sql Compare to get structure from an in-purpose, empty ReportServer database created by SSRS 2016
added record in ServerUpgradeHistory with version for SSRS 2016 (173)
restored the Encryption keys from SSRS 2014.
Everything works ok, with one small issue.
When I try to open SSRS Web Portal URL (http://...myServer.../Reports), or to refresh main page, I get the following error popup.
This error doesn't appear to affect the functionality of SSRS - all reports work just fine. Also it does's appear when opening Web Service URL (http://...myServer.../ReportServer).
So it's just annoying so far.
I searched for the guid string in Catalog table (I thought it might be some folder name or something), but I found nothing.
Does anyone have any idea where it comes from and how to get rid of it?
Thank you
Edit
Recently I updated from SSRS 2016 to 2017, and I kept carrying this error with me.
However I found the offending item. It is in Catalog table, and it is of Type = 3 (Resource), with mime-type application/octet-stream
I deleted it from catalog (I did a backup of it into a separate table - catalog_bak), but I still get the error when I load main page in (/reports)
Beside that, it never pops-up again, with one exception: it always shows-up when I access Site Settings -> Branding
I guess it has something to do with branding packages.
Does anyone knows where are they stored, and how can I uninstall / clean-up that?
A Branding Package is created by a user. If the original package can't be found or is corrupted it should revert to the default. Have you tried removing the package or creating and uploading a new one? Also, try downloading SQL Server Mobile Report Publisher (https://www.microsoft.com/en-us/download/details.aspx?id=50400) and then connect your server with it. It may contain a theme that was used on your original server.
For me Uninstall and Reinstall did the trick for me.

Versioning of reports in reporting services (SSRS)

It is not the first time this question has been asked, but no solution has been found yet. The only thread I found somewhat relevant was this but it is 4 years old: SSRS Reports Versioning
Perhaps a solution has been found since then?
Back to my questions:
I have several reports in a Visual Studio solution (BIDS). From here I can deploy to several reporting servers: Test1, Test2 and Production.
1) It seems that the granularity of deployment is: Reports, Datasets and Datasources. This can be setup in Properties for the solution. But I want to be able to only deploy a single report, if I only have changes to one report. How do I do this? As it is now it seems that I have to deploy ALL reports.
2) Since I have more than 1 place to deploy there is a possibility of the reports getting out of sync. Normally the procedure would be to deploy the reports to Test until everything is fine, and thereafter deploy to Production. But since this is a manual process something can go wrong. Therefore I believe it would be nice to have some sort of versioning on the individual reports. But I can find no way of doing this? I'm thinking that it would be really nice if a timestamp and/or versionnumber could be set on the reports when they are deployed. Is there a way to do this?
Thanks in advance.
How about putting the version number of the report on the report itself? You would need to run the report to see it though.
To deploy a single report, right-click on the report name and Deploy to deploy that report (or dataset or data source).
As far as the deployment issues, you can use version control such as Visual Studio Team Foundation Server.
https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx

How can I add an embedded data source to RDL in C# code?

I am trying to use SSRS in a multi-tenant situation. The base version we want to support is SQL Server 2008 but if R2 is needed we might be ok with that.
I am currently using the ReportingService2005.asmx endpoint which seems to expose the ReportService2005SoapClient class (even though all samples seem to show ReportingService2005 class).
When we run a report I want to make a copy of that report from the server, add an embedded datasource, point the datasets to that datasource and then run the report.
I have gotten as far as:
getting the RDL from the server
modifying the XML to add the DataSource
pointing the datasets to point to the new datasource
...but when I try to "CreateReport" I get the following error:
System.Web.Services.Protocols.SoapException: The dataset ‘DataSet1’ refers to the data source “mydatasource_LOCAL”, which does not exist.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch()
I have added the dataset to the RDL, it looks the same as when I add one in the designer. However, I assume something needs to be added to the server? What am I missing?
(As an aside, I know MS Dynamics enabled multi-tennant SSRS in a single instance, but I see no info on how they did it. If they have any code or anything they share someone could point me to that would be awesome.)
You're using the correct endpoint, more or less. From MSDN:
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010 endpoint includes the functionalities of both endpoints and contains additional management features.
In any case, you mention you modify the RDL to use a new data source in step 2. I might be wrong, but I think you probably still need to add a DataSource item to your report catalog using the ReportingService2010 CreateDataSource(...) method.
If you deploy a new report from Visual Studio to report server it wil also mention in the log that it's deploying the data source before it deploys the report.
Of course you could also create that data source on the server beforehand, using the report manager (though "mydatasource_LOCAL" may not be an ideal name).

Does Microsoft SQL Report Builder require Reporting Services running at all?

I'm having trouble figuring this out.
I stopped ALL of local SQL Services, e.g. SQL Server, SQL Agent, Reporting Services. Then using Report Builder 2.0 to create a report connecting to a remote SQL Server (No SSRS running) out in the farm. When I click on "Run" button, for some odd reasons, it still render the report.
I thought you must have SSRS running in the first place. Is SQL Reporting Services even required for Report Builder?
Img
alt text http://www.freeimagehosting.net/image.php?0bf8bb1f1d.jpg
When Reporting Services runs a report, it creates a data file of the data used in the report and, if nothing changes, it uses that data the next time the report runs instead of hitting the server again. You could be seeing the cached data.
Look where the report is kept. There will be a report file, say MyReport.rdl and also the data, MyReport.rdl.data. You could delete that data file otherwise simply changing the report parameters (if you have some) will generally cause the report to disregard the cached data and make a trip to the server again.
I'm answering my own question. Here's my observation after some googling and experimenting.
Report Builder is using a stand alone report control to render report. Visual Studio.NET is probably using the same thing when preview a report. SSRS is required when developers need to incorporate web-based reporting solution, e.g. ASP.NET, as well as to manage reports.
What's really bothering me is that to author reports in VS.NET, I must be using Business Intelligence Projects. In order to do that, I must install SQL Server 2005/2008 with SSRS. Why is so when SSRS is not even required in a LOCAL environment?

SSRS and MDX causes VStudio to crash

I am trying to generate a report using reporting services in visual studio 2005. the data source is in MDX DB and was created successfuly. When I save the query in the query builder window it closes and displays an alert : "the query cannot be read from the query window, please check for syntax errors"
and then VS crushes!
the query has no parameters and works on management studio without any problems.
I have installed all of my win updates, but sql server sp3 (that had a problem)
I also have service pack 2 for my framework
any idea what is going on?
try pasting from VS into notepad (or SSMS) and then copy from notepad (or SSMS) back into VS to make sure that there are not any "strange" characters (like smart quotes). It's vaugely possibly that SSMS is stripping these out when you paste into it.
Otherwise it may be an issue with your failed SP3 install.