Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / database / SQL-Server / SQL-Server-2008R2

SSRS Report Integration With Web Api

4.30/5 (7 votes)
29 Apr 2015CPOL1 min read 67.4K  
The idea is to source SSRS report datasource with web api output. The datasource can take XML input datasource hence we can allow web api to give us desired XML output dataset in defined format or schema. Once we have that it is easy to sourced or housed it into SSRS reports -RDL or Client RDLC in .

Introduction

The idea is to source SSRS report datasource with web api output. The datasource can take XML input datasource hence we can allow web api to give us desired XML output dataset in defined format or schema. Once we have that ,it is easy to sourced or housed it into SSRS reports -RDL or Client RDLC in .net. Below is the quick implementation steps to kick start. Feel free to post your ideas or suggestions around.

Create RDL Reports

 

  • Open BIDS and add new RDL reports.
  • Add datasource
  • Add Dataset using Datasource
  • Datasource-Web api or any XML output coming from any services.
  • Create Table and place dataset field in rows and column.

rdl

rdl

rdl

rdl

rdl

rdl

rdl

rdl

rdl

rdl

Create Weforms Or Web Api

This is simple webform which emits XMl output in response stream. For brevity purpose I kept the implementation pretty simple. One can very well call web api within this code base add response header and can convert JSon ouput to XML .

 

api

 

api

Wrapping Up

I find this cool, and find this handy guide only if we want to play around with API output to design reports using RDL SSRS report server platform.

http://spacefold.com/lisa/post/2011/10/14/Actual-Factual-JSON-data-in-SSRS.aspx

Issue and Resolution

Warning 1 [rsInvalidExpressionDataType] The Value expression used in textrun ‘PRICE.Paragraphs[0].TextRuns[0]’ returned a data type that is not valid.

\Report1.rdl 0 0

Delete rdl.data file and see the preview

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)