RDL file is not valid (a horror story you should read anyway if you are an aspiring Dynamics consultant)

By | June 17, 2017

It was one of those unexpected errors that can drive you crazy since they provide absolutely no details as to why they are happening.  Yet, I was not doing anything extraordinary – I was merely trying to create an SSRS report for Dynamics 365(turned out that’s an extraordinary task.. sometimes), it was 11 PM on Friday night (yes, I know.. who does it at 11 PM on Friday night.. ), and I was constantly getting this error:


I was also getting it at 12 AM, and at 1 AM on Saturday, and, then, I called it a day and gave up (only to get back to it on Saturday – see below)

The error went like this:

Error Uploading Report
This report can’t upload. This issue can occur when the Report Definition Language (RDL) file is not valid. If you contact support, please provide the technical details.
Activity ID: 47ebe340-68ed-4a4c-95b0-b5e1061c2b57

And, of course, it had some details in the log file:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred while trying to add the report to Microsoft Dynamics 365. Try adding the report again. If this problem persists, contact your system administrator.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
<Message>An error occurred while trying to add the report to Microsoft Dynamics 365. Try adding the report again. If this problem persists, contact your system administrator.</Message>
<ExceptionSource i:nil=”true” />
<InnerFault i:nil=”true” />
<OriginalException i:nil=”true” />
<TraceText i:nil=”true” />

Unfortunately, those details were not particularly useful.

Did I mention I never created reports for Dynamics 365 on this particular laptop? So, before I started on Friday night, I had installed the following components:

  • Visual Studio 2015 and Data Tools
  • Report Authoring Extensions for Dynamics 365

That is supposed to be a supported configuration, according to the download page:


And, yet, it was not working.

So, how do you troubleshoot an issue like this? You can keep poking around, but there is a simple test:

  • I’ve created a new report using Dynamics report wizard
  • And downloaded it
  • And loaded it into the Visual Studio
  • Did some minor changes
  • And tried to upload it back into Dynamics

Guess what – I got exactly the same error! But that meant I was onto something, and the only possible explanation was that Visual Studio had updated the report in such a way that it became incompatible with Dynamics somehow.

What could be incompatible? It would likely be the format of that RDL file. The report was working fine in the Visual Studio, though, so I spend about an hour looking at the schema, trying to get some clue.

And then I thought: is there actually a way to target different versions of the SSRS server when building a report? That was actually the right question, and there was an answer:


Did you happen to think it was the end of it? Well, why would it be.. I am writing a detective story here:)

So, no, it was not the end. I made those changes, I configured the project to target 2008-2014 versions:

It was around 10 AM on Saturday, btw..

And I tried uploading the report to Dynamics. The same stubborn error showed up again!

I spent the following 30 minutes scratching my head – this was kind of beyond me. But you can’t keep scratching your head forever when you need the report to be up and running.. so, why is it not making any difference. Was it the wrong option? I was on the right track – that was my gut feeling at that time. What did I miss? After a bit more scratching, I figured why don’t I look at the rdl again – may be I’d be able to spot the version number there? Sure enough, it was right there, right at the top of the file, and for some strange reason it was still telling me the report was targeting 2016 version:

Now this was strange..

What do we do when there is a question? We ask google. Here is what google answered:


God bless you, Google! And Rami A, whoever you are, who provided the final clue:

This is by design.

See https://connect.microsoft.com/SQLServer/Feedback/Details/2103422

Posted by Riccardo [MSFT] on 12/18/2015 at 5:07 PM
By design, TargetServerVersion affects build output files, not source files. You deploy the build output files (which you can grab from the \bin\Debug or \bin\Release folder within your project) rather than the source files.

So there we go! If you ever run into this problem, do this:

  • Change the target server version of your report project (make it 2008, …, 2014)
  • Build/Rebuild the project!!
  • Do not upload the original rdl file to Dynamics – instead, use the one you’ll find in the “bin/debug” or “bin/release” folder

(and, probably, don’t do those things in the new environment on a Friday night when you are supposed to be getting ready for the weekend instead:) )

18 thoughts on “RDL file is not valid (a horror story you should read anyway if you are an aspiring Dynamics consultant)

  1. Pingback: Setting Visual Studio correctly for Dynamics 365 Reporting | Strategy 365 Limited

  2. Alvin Budiman

    This helped me on the same error message. Thank you!

    1. Alex Shlega Post author

      Horror story, like I said.. but, at least, apparently I’m not alone in this:)

  3. Marie

    You saved me thank you so much.
    To be more explicit. To Change the version.
    ‘Change the target server version of your report project (make it 2008, …, 2014)’
    Right click on the name of the Project on the right hand side of the screen under ‘Solution Explorer’ pin. In Visual studios.
    Click on properties, then you use see that screen above

  4. Ted

    Yes, yes, a thousand times yes. I have struggled with this for hours.
    For me, after building, it was the report in Debug that worked when uploading.
    This has saved my sanity for another day.

  5. Sravan Kumar Ch

    Thanks you Alex so much. Yes I ran exactly on a Friday night but guess what I didn’t end up with a horror story and the reason is this blog post. Thanks once again.

  6. P-H

    As soon as I add an image to the project I have the same error when i reupload.
    I can use existing image resize them etc. But adding new images is giving me the same error.

  7. Tom

    Thank you so much! I was just about to tear my report apart looking for incompatible parts before I spotted this. Can’t believe it was so simple, and yet so obscure if you don’t know the cause.

  8. James Xia

    Thanks. This is the best story I’ve heard so far in year 2018! You saved me.

  9. Sudhakarreddy Chidipudi

    Good Info , it will save time of developers.


Leave a Reply

Your email address will not be published. Required fields are marked *