We have an easy way to implement a web service using the library FastReport.Service.dll (WCF Service Library), which is supplied with FastReport .Net.
Our example is based on creating a simple web application with a web service functions, but you can modify your existing project based on .NET Framework 4.0 or newer.
Run Visual Studio and create a new ASP.NET Web Application project under .NET Framework 4.0.
Add references on libraries FastReport.dll, FastReport.Bars.dll, FastReport.Service.dll
Create a new text file with name ReportService.svc in site root.
Add next lines in file:
Open web.config and add next sections in <configuration>:
The key "FastReport.ReportsPath" should contain a path to folder with reports. You can set demo folder «\FastReport.Net\Demos\WCF» for example.
The key "FastReport.ConnectionStringName" should contain connection string name. This line should be registered in section <connectionStrings>.
Let's run our site and check the availability of a Web service by access to a file ReportService.svc.
When you deploy the project on the server, be sure to check for files FastReport.dll, FastReport.Bars.dll, FastReport.Service.dll in the folder /bin.
Examples of client programs can be found in the folder \FastReport.Net\Demos\C#\WCFClient and \FastReport.Net\Demos\C#\WCFWebClient. Open each project in Visual Studio and right click on ReportService and select Configure Service Reference.
Specify the address of an existing web service in configuration window.
To be continued.