接上篇,做一个简单的web services。就是把设计好的crystal report以web services 的形式公布。客户端调用该web 服务,不管是windows用户还是web用户,都可以轻松调用该服务。操作如下:
1。create a web services using vb.net, add a current crystal report file (*.rpt) , publish the rpt file as a web services (on the solution tree,right click the rpt file ,chose "publish as web services")
2.build solution;
3.add the web reference to a client user(both windows or web user).
4,use crystalreportviewer to contain and display the rpt file.
5.add underneath codes to source code(after initialize(component initialize or pageinitialize)
crystalreportviewer1.reportsource = new localhost.xxService()
OK,一切就这么简单。
实际应用中应该会有很多难题,遇到了,再想办法解决。后会有期。