English 中文(简体)
贾斯珀特报告从提供网络服务的供应商那里获得数据。如何?
原标题:Jaspert report get data from provider with web service. How to?

有系统,它有数据,并且可以提供它的数据与网络服务(例如Lotus Notes数据库)一起提供。 贾斯帕能否通过拨打网络服务为它的报告获取数据?

最佳回答

您可以, 但可能会变得非常复杂非常快。 但是如果您想要在这条路径上旅行, 您肯定可以使用 < a href=" http:// jasperreports. sourceforge. net/ api/ net/ sf/ jasperreports/ engine/ data/ JRXmlData source. html" rel="nofollow" > JRXmlDatasource 。 您必须定义数据源如 :

new net.sf.jasperreports.engine.data.JRXmlDataSource(
net.sf.jasperreports.engine.util.JRLoader.getLocationInputStream("http://yourserver.com/xml_data_source")

http://blog.altosresresearch.com/use-xml-data-source-for-chart-second-in-jasperreports/"rel="nofollow" > this post, 似乎有人开始类似的搜索, 从远程服务器检索报告所需的xml数据。

说起来,这可能会少得多的工作,而你的代码可能更能维持, 如果你从服务器获取代码中的数据, 选择您想要的报告字段, 并把它作为 JRMap Collection 数据源传递, 特别是如果远程服务提供一种 wsdl, 您可以使用 Apache Axis 等工具生成客户端 。

问题回答

利用网络服务数据源,现在可以做到这一点。

http://community.jaspersoft.com/project/web-services-data-source

这个共同体项目实施一个自定义数据源,是利用最新的自定义数据源框架(内部利用数据适应器)建立的。

它还在“贾斯珀报告”服务器内工作:

您可以使用它填充基于查询的输入控制, 并通过 Tople 来填充特设报告( 商业版 ) 。

谢谢 谢谢





相关问题
IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

ASP.net web services

I am using a web service which sets the Thread.CurrentPrincipal object while logging in and soon later when another webmethod of the same web service accesses Thread.CurrentPrincipal, its different/...

Unity Container Disposing and XML Web Service

I am registering some wrapers over un-managed objects in container. How can I dispose of them at the end of the container s lifetime? Please bear in mind I have an XML Web service.

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

热门标签