Wednesday, October 23, 2019

The maximum recursion 100 has been exhausted before statement completion

When running the report getting below error while report is trying to execute the SQL script

An error has occurred during report processing. (rsProcessingAborted)
Cannot read the next data row for the dataset .... (rsErrorReadingNextDataRow)
The statement terminated. The maximum recursion 100 has been exhausted before statement completion.

max recursion error is also a SQL error. Add below code at the end of the script which will resolve the issue.

Select 
-----------------

From Employee
where
--------------
option (maxrecursion 0)


Tuesday, October 1, 2019

Create Data bar chart report in SSRS


Follow the below steps to Create Data bar chart report in SSRS

Use the below scripts to create dataset.

SELECT geo.StateProvinceName, sum(Fact.SalesAmount) as SalesAmount
       FROM FactInternetSales AS Fact
INNER JOIN DimSalesTerritory AS Sales on Fact.SalesTerritoryKey=Sales.SalesTerritoryKey
Inner join DimGeography as geo on geo.SalesTerritoryKey=Sales.SalesTerritoryKey
          group by geo.StateProvinceName

·         Right Click table column -> Insert -> Data bar
·         Click on data bar -> Select Values -> Sales Amount
·         Right-click the chart and choose 'Show Data Levels'
·         Save Report and Run the report.