Thursday, October 22, 2009

SSRS sub totals using WCF services

SQL Server 2005 reporting services can communicate with services developed using WCF like connecting to SQL Server databases.
Sub totals can be added to the columns by adding the expression to the textbox placed at the table footer.
=Sum(Fields!Salary.Value,"DataSet1")
This works fine in case of report trying to retrieve values from the sql server database using sql queries or stored procedures. But the same expression will give error in case of wcf service.
Make the following change to display the sub totals.
=Sum(CInt(Fields!Salary.Value),"DataSet1")