I have to configure WCF Service as Data Source reference in SSRS but did not find its solution yet. Any help in this regard will be really appreciated! Thanks in Advance.
CodePudding user response:
I found two related tutorials, hope it will be useful to you.
Consuming a WCF Service from an SSRS (RDL) Server Report
WCF Service as DataSource in SSRS
CodePudding user response:
Just read this two articles:
https://www.codeproject.com/Articles/37270/Consuming-a-WCF-Service-from-an-SSRS-RDL-Server-Re
https://srinivasgorantla.blogspot.com/2015/07/wcf-service-as-datasource-in-ssrs.html?m=0
[DataContract]
public class Item
{
[DataMember]
public int ItemID { get; set; }
[DataMember]
public string ItemName { get; set; }
[DataMember]
public double ItemSales { get; set; }
}
[ServiceContract]
public interface IService1
{
[OperationContract]
List GetAllItems();
}
public List GetAllItems()
{
return ItemData();
}
private List ItemData()
{
List itemList = new List();
itemList.Add(new Item { ItemID = 1, ItemName = "Bikes", ItemSales = 125000.00 });
itemList.Add(new Item { ItemID = 2, ItemName = "Clothes", ItemSales = 100000.00 });
itemList.Add(new Item { ItemID = 3, ItemName = "Cars", ItemSales = 75000.00 });
return itemList;
}
<Query>
<Method Namespace="http://tempuri.org/" Name="GetAllItems" />
<SoapAction>http://tempuri.org/IService1/GetAllItems</SoapAction>
</Query>
