Passing parameters in WCF
Hello.
I am wondering how it is possible to pass parameters to a report while consuming a WCF service running under FastReport.Service.dll.
The problem arises when I try to call the GetReport method. Here is the code I have put in the ASP.NET application that consumes the web service:
FastReportServiceClient reportServiceClient = new FastReportServiceClient();
reportServiceClient.Open();
ReportItem reportItem = new ReportItem();
reportItem.Path = @Demo reports\+nomeReport;
//Attempt of passing parameters through dictionary
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("CognomeReport", "Davolio");
reportItem.Parameters = dic;
GearItem gearItem = new GearItem();
gearItem.Name = "PDF";
Stream stream = reportServiceClient.GetReport(reportItem, gearItem);
reportServiceClient.Close();
I was not able to find a working code for passing parameters through WCF.
Could anyone suggest me a way to perform this action ?
Thank you in advance for any help.
I am wondering how it is possible to pass parameters to a report while consuming a WCF service running under FastReport.Service.dll.
The problem arises when I try to call the GetReport method. Here is the code I have put in the ASP.NET application that consumes the web service:
FastReportServiceClient reportServiceClient = new FastReportServiceClient();
reportServiceClient.Open();
ReportItem reportItem = new ReportItem();
reportItem.Path = @Demo reports\+nomeReport;
//Attempt of passing parameters through dictionary
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("CognomeReport", "Davolio");
reportItem.Parameters = dic;
GearItem gearItem = new GearItem();
gearItem.Name = "PDF";
Stream stream = reportServiceClient.GetReport(reportItem, gearItem);
reportServiceClient.Close();
I was not able to find a working code for passing parameters through WCF.
Could anyone suggest me a way to perform this action ?
Thank you in advance for any help.