torsdag 2 februari 2017

Reporting Services, reports, reporting extension Visual Studio and headache

I was involved in a discussion about report creation in the Microsoft Dynamics CRM group on Facebook the other day where started digging in how to use Visual Studio 2015 for reporting since Jonas Rapp asked about that. He thought it was silly that his devolpment team had to have both VS 2015 and 2012 to be able to work, 2015 for general coding and 2012 for reports.

Now, I have always been using the Data Tools, which has been knows as BIDS (Business Intelligence Development Studio) when I've been doing the reports since most of my report building has been on premise and I need the database to be able to work anyway so I've been doing the job on the SQL server where the BIDS has been installed, or at least after I request it to be installed if it's not our environment.
Since I've been fiddling a bit with SSIS I know it's possible to download the Data Tools for VS 2015, that's the same tool you're using for SSIS and reports so I had a quick look at the Data Tools download which was all fine and dandy. It worked very good to open a reporting solution and move stuff around. All good.

Now, what I didn't think about was that you might like to do online reports which require the Reporting Extensions. As I said earlier, I haven't done much reporting for online since the customers we've been working with that wants reports have been on premise. Anyway, reporting extension it is and that's available here for Dynamics 365 and on that very page the pre reqs state that it should work with VS 2013 and 2015 however the comments at the bottom pretty clearly says that it doesn't work.

Next thing. As I had installed the Data Tools for VS 2015 I started using them, big mistake. I altered a report for a CRM 2016 update 1 (might be called spring release, I don't know, but it is version 8.1 on premise) and uploaded it to the CRM server. That did not end well and there was a ton of errors saying very odd things which I just didn't care about at the moment, might come back to that later. Thank god for version control, go back to previous version, make the same changes in the SQL Server Data Tool (some VS 2013 shell methink) and upload it again, this time with better results.

The moral is the following, don't use bleeding edge Visual Studio for reporting, unfortunately, specially since it should be working according to the MS pages.

Hope someone gets less headache from this.

Rickard Norström
Developer at CRM-Konsulterna 

2 kommentarer:

  1. The problem about SDT for VS2016 is that it targets SQL Server 2016 for reports definition, which leads to errors when uploading reports into CRM.
    To avoid this problem, you just have to edit the report project properties, then define the target to SQL Server 2012/2014 (if my memory is correct), then compile the project report. Take the RDL from the bin directory and you should be good to go.

  2. Great Feedback Tanguy. The report property TargetServerVersion is set to "SQL Server 2008 R2, 2012 or 2014" so that doesn't seem like the issue. It is an old-ish project that's been started in CRM 2013.