logo
small logo
  • Products
  • Buy
  • Support
  • Articles
  • Customer panel Support
    • en
    • pt
    • es
    • de
    • pl
    • JP
    • ZH
  • Home
  • /
  • Articles
  • /
  • Creating Web Service using FastReport.Service.dll
  • How to make report inheritance in FastReport.NET

    January 29, 2021

    When you are tasked with creating a large number of reports within one corporate style,

    read more
  • FastCube - High-Speed OLAP Cube Engine and Pivot Grid

    February 29, 2020

    It is difficult to imagine data analysis without OLAP (On-Line Analytical Processing) technology. Although there

    read more
  • How to programmatically set the default email client settings for sending emails from FastReport.NET

    February 12, 2021

    Like many other report generators, FastReport .NET allows you to send a report via email

    read more
  • Creating and outputting ITF-14 barcodes in .NET applications

    February 25, 2021

    ITF-14 (Interleaved Two of Five) is a two-band numeric code, otherwise known as a high-density

    read more
  • Create a new report with code VB.NET

    September 17, 2020

    Speaking of the .Net framework, we usually imagine the #C programming language. Simply because the

    read more

Creating Web Service using FastReport.Service.dll

July 8, 2013

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.

New Web Application

Add references on libraries FastReport.dll, FastReport.Bars.dll, FastReport.Service.dll

Create a new text file with name ReportService.svc in site root.

New Text File

Add next lines in file:

<%@ ServiceHost Service="FastReport.Service.ReportService" %>
 
<%@ Assembly Name="FastReport.Service" %>
 

 

Open web.config and add next sections in <configuration>:

<appSettings>
 <!-- path to folder with reports -->
 <add key="FastReport.ReportsPath" value="C:\Program files\FastReports\FastReport.Net\Demos\WCF" />
 <!-- name of connection string for reports -->
 <add key="FastReport.ConnectionStringName" value="FastReportDemo" />
 <!-- Comma-separated list of available formats PDF,DOCX,XLSX,PPTX,RTF,ODS,ODT,MHT,CSV,DBF,XML,TXT,FPX. 
 You can delete any or change order in this list. -->
 <add key="FastReport.Gear" value="PDF,DOCX,XLSX,PPTX,RTF,ODS,ODT,MHT,CSV,DBF,XML,TXT,FPX" />
 </appSettings>
 <connectionStrings>
 <add name="FastReportDemo" connectionString="XsdFile=;XmlFile=C:\Program Files\FastReports\FastReport.Net\Demos\Reports\nwind.xml"/>
 </connectionStrings>
 <system.serviceModel>
 <services>
 <service behaviorConfiguration="FastReportServiceBehavior" name="FastReport.Service.ReportService">
 <endpoint address="" binding="wsHttpBinding" contract="FastReport.Service.IFastReportService">
 <identity>
 <dns value="localhost" />
 </identity>
 </endpoint>
 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
 </service>
 </services>
 <behaviors>
 <serviceBehaviors>
 <behavior name="FastReportServiceBehavior">
 <serviceMetadata httpGetEnabled="True" />
 <serviceDebug includeExceptionDetailInFaults="True" />
 </behavior>
 </serviceBehaviors>
 </behaviors>
 <bindings>
 <basicHttpBinding>
 <binding messageEncoding="Mtom"
 closeTimeout="00:02:00" openTimeout="00:02:00"
 receiveTimeout="00:10:00" sendTimeout="00:02:00"
 maxReceivedMessageSize="67108864" maxBufferSize="65536"
 transferMode="Streamed">
 <security mode="None">
 <transport clientCredentialType="None" />
 </security>
 </binding>
 </basicHttpBinding>
 </bindings>
 </system.serviceModel>
 

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.

ReportService

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.

Configure Service Reference

 

Specify the address of an existing web service in configuration window.

To be continued.

about product download buy
avatar
Aleksandr Fediashov
Team lead
Fast Reports Team: Aleksandr Fediashov - Team Lead at Fast Reports
.NET WCF FastReport

Add comment
logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Buy
  • Download
  • Documentation
  • Testimonials
  • How to uninstall
  • Ticket system
  • FAQ
  • Tutorial Video
  • Forum
  • Articles
  • Our News
  • Press about us
  • Resellers
  • Extended licensing
  • Contact us

© 1998-2022 by Fast Reports Inc.

  • Privacy Policy