FastReport.Net
Visual Studio
创建一个专门用于该测试的文件夹,该文件夹可以在磁盘的任意位置。
将FastReport.Service.dll,FastReport.Service.dll.config,FastReport.dll和FastReport.Bars.dll这4个文件复制到文件夹内。
创建两个子文件夹,分别用于存放数据和报表。
将FastReport 提供的示例数据库复制到数据文件夹内,该数据库一般存放在"\FastReport.Net\Demos\Reports\nwind.xml"中。
将\FastReports\FastReport.Net\Demos\WCF中的所有内容都复制到报表文件夹内,他报考了内置数据库连接的测试报表,简化测试过程。
在文本编辑器中打开配置文件:FastReport.Service.dll.config
在
在
创建service.bat文件,用以下内容。'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfSvcHost.exe' /service:C:\WCF\FastReport\FastReport.Service.dll /config:C:\WCF\FastReport\FastReport.Service.dll.config
以管理员权限运行service.bat,然后WCF Service Host的图标就会出现在系统托盘中了,双击图标出现:
打开浏览器,输入地址http://localhost:8732/FastReportService/
如果出现以上内容,说明服务工作正常,在配置文件中也可以更改服务器端口。
在Visual Studio中打开WCFServiceClient.csproj
在Service References–ReportService'点击右键,选择配置服务引用。
回到服务地址,地址应用以“/mex”结束(元数据交换)。
编译然后运行。