Problem statement
Our requirement is to extract the data from JSON string, followed by filtering the extracted data, using business logics and display the result in SSRS Report.
Development challenges
- Data source is SharePoint list, so the developer isn't able to write SQL statement.
- SSRS allows only VB code and .NET Framework 2.0 or .NET Framework 3.5.
- Referenced and supporting DLL should present in the Report Server Bin folder and GAC.
- Function or method used inside the report should return only the string type.
Solution
The solution is to develop custom DLL file in .NET version 2.0 and reference the DLL in SSRS Report Code.
Let’s see the solution step by step.
Step 1
We have to create a DLL. Open Visual Studio 2005 File -> New Project -> Class Library.

Step 2
We are going to use Newton Soft JSON DLL (No dependent DLL) to desterilize the JSON Data. Since SSRS supports .NET version below 3.5, we are going to use Newtonsoft.JSON.DLL version 2.0.
Download Newton soft JSON all version DLL -> Link.
- Imports Newtonsoft.Json.Linq
- Public Class Class1
- Public Shared Function Message(ByVal Jval As String, ByVal Val As String) As String
- Dim json As JObject = JObject.Parse(Jval)
- Return (json.SelectToken("Venue").SelectToken(Val).ToString)
- End Function
- End Class

Step 3
We need to configure some properties before building DLL.
Project -> Properties -> select Signing tab -> Check Sign the Assembly -> Select <New from drop down.

Step 4
Open AssemblyInfo.vb file and add <Assembly: AllowPartiallyTrustedCallers()> in the code, which allows the report Server to call this DLL.
Note
This code needs System.SecurityPackage.

Step 5
Build the project. Right click on the Solution Explorer -> Build. Once build is successfully complete, DLL file is present in the Bin\Debug or Bin\Release.

Step 5









Former memberPosted May 16, 2017, 7:08 AM
I have one question regarding SSRS and large data handling. i post it as question in this web site. here is the url http://www.c-sharpcorner.com/forums/how-ssrs-handle-large-data-when-pagination-is-configured please see my question and answer if you know it. thanks
Gowtham RajamanickamPosted May 16, 2017, 5:10 AM
Good article.....keep writing....