65.9K
CodeProject is changing. Read more.
Home

SSRS Report Integration With Web Api

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.30/5 (7 votes)

Apr 29, 2015

CPOL

1 min read

viewsIcon

67360

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