SSRS Report Builder How to parse JSON from Dataset field?
<p>I am creating a report in Microsoft SQL Server Report Builder 3.0 running on Microsoft SQL Server Reporting Services Version 11.0.2100.60.</p>

<p>I would like to parse JSON values stored in some of the fields from my DataSet. Below is a preview of my report showing raw JSON values.</p>

<p><a href="https://i.stack.imgur.com/SZvQK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SZvQK.png" alt="enter image description here"></a></p>

<p>The expression I expected (though not being added) would be something like below, </p>

<pre><code>=Newtonsoft.Json.Linq.JArray.Parse(Fields!MyFieldName.Value).ToString()
</code></pre>

<p>Since I need to <a href="https://msdn.microsoft.com/en-us/library/ms156028.aspx" rel="nofollow noreferrer">add custom or embedded code to my report</a> to be called from any expression, I have to <a href="https://msdn.microsoft.com/en-us/library/ms155974.aspx" rel="nofollow noreferrer">add an Assembly Reference to a Report</a>. Ref: <a href="https://msdn.microsoft.com/en-us/library/ms153561.aspx" rel="nofollow noreferrer">Using Custom Assemblies with Reports</a></p>

<p>So in my report properties, a reference to Json.net (Newtonsoft.Json.4.5.6) assembly has been added as described below.</p>

<p><a href="https://i.stack.imgur.com/BHAga.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BHAga.png" alt="enter image description here"></a></p>

<p>The path to the assembly is <code>C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Packages\Newtonsoft.Json.4.5.6\lib\net40\Newtonsoft.Json.dll</code>.</p>

<p>I have also tried adding the assembly to <code>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\</code> as well as <code>C:\Program Files\Microsoft SQL Server\MSRS10_50.SQL2008\Reporting Services\ReportServer\bin\</code> and changing the reference to the path but to no avail.</p>

<p>It is also mentioned that <a href="https://www.nuget.org/packages/Newtonsoft.Json/4.5.6" rel="nofollow noreferrer">the assembly has no dependency</a>.</p>

<p>So far, I have just added the assembly reference and nothing whatsoever has been changed. However, once I switch to preview my report, the error shows as described below:</p>

<p><a href="https://i.stack.imgur.com/Znt6R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Znt6R.png" alt="enter image description here"></a></p>

<pre><code>System.Web.Services.Protocols.SoapException: Error while loading code module: ‘Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’. Details: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.ReportingServices.Library.ReportingService2010Impl.CreateReportEditSession(String Report, String Parent, Byte[] Definition, String&amp; EditSessionID, Warning[]&amp; Warnings)
   at Microsoft.ReportingServices.WebServer.ReportingService2010.CreateReportEditSession(String Report, String Parent, Byte[] Definition, String&amp; EditSessionID, Warning[]&amp; Warnings) 
</code></pre>

<p>Is it because of the lack of permission attribute <code>AllowPartiallyTrustedCallers()</code> in the assembly? According to a reference <a href="http://www.sqlservercentral.com/blogs/dknight/2012/01/26/ssrs-custom-code-with-external-assemblies/" rel="nofollow noreferrer">here</a> which does not solve my issue since the assembly in my case is not custom built, and neither could another question found <a href="https://stackoverflow.com/questions/16943653/report-builder-custom-method-of-assembly-returns-error">here</a> and a tutorial <a href="http://www.wiseowl.co.uk/blog/s291/custom-assembly.htm" rel="nofollow noreferrer">here</a>. </p>

<p>What am I doing wrong? Or is there any working example for parsing JSON in SSRS report?</p>

<p>Any help would be of great assistance.</p>