dry18813
2015-06-05 09:12
浏览 77
已采纳

Jasper报告 - 未找到资源

I am developing a jasper report in PHP I have tried embedded jasper library 0.9d -- PhpJasperLibrary-master After fixing part of the code in the library, It works normally but it cannot display table format which is very important for me to develop Jasper report so I give up in this method and build up an jasper server.

I have installed the PHP Client(v2.0) by composer and using the sample code in the following link

http://community.jaspersoft.com/wiki/php-client-sample-code http://community.jaspersoft.com/project/php-client/releases

I am not sure why there is a lot of bugs in the sample code like getjob(s) function and passing variable to class client.

Anyway, I fixed it and the server info can be called. In the last stage, I cannot run the report and the error message shown that the resource of my report not found.

Jaspersoft\Exception\RESTRequestException

Resource /20150604 not found. 

I could like you to help me and I hope I can release a prefect version after all parts done.Thanks

And the below is my report information.

I have put my report under the folder /reports and it can run in the jasper server

I have checked the URL that calling the report is like below

localhost:9090/jasperserver/rest_v2/reports/20150604.html

I have concern about the URL but I cant find any reference to it. So please support me to fix the problem. Thanks

additional: here is the code I call the report

$report = $c->reportService()->runReport('/20150604', 'html');

图片转代码服务由CSDN问答提供 功能建议

我正在用PHP开发一个jasper报告 我已经尝试过嵌入式jasper库0.9d - PhpJasperLibrary-master After 修复库中的部分代码, 它正常工作,但它无法显示表格式,这对我来说非常重要,因此我开始使用这种方法并建立一个jasper服务器。 \ n

我已经由作曲家安装了PHP客户端(v2.0)并使用以下链接中的示例代码

http://community.jaspersoft.com/wiki/php-client-sample-code http://community.jaspersoft.com/project/php-client/releases \ n

我不确定为什么样本代码中存在很多错误,例如getjob(s)函数并将变量传递给类客户端。

无论如何,我修复了它并且 可以调用服务器信息。 在las中 t阶段,我无法运行报告,并显示错误消息,显示我的报告资源未找到。

 找不到Jaspersoft \ Exception \ RESTRequestException 
 
Resource / 20150604。  
   
 
 

我希望你能帮助我,我希望在完成所有部分后我可以发布一个完美的版本。谢谢

以下是我的报告信息。

我已将报告放在文件夹/ reports 下,它可以在jasper服务器中运行

我 已检查调用报告的URL如下所示

  localhost:9090 / jasperserver / rest_v2 / reports / 20150604.html 
   
  
 

我对URL有所顾虑,但我找不到任何引用。 所以请支持我解决问题。 谢谢

其他:这是代码我 致电报告

  $ report = $ c-> reportService() - > runReport('/ 20150604','html'); 
  <  / pre> 
 
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dreamy1992 2015-06-05 17:17
    已采纳

    Hmm the rest endpoint to "run" a report is js/rest_v2/?path to report?.html

    Unless your report is in the root of your organization, then you need a path.

    Check out this (line 20): https://github.com/jasonhuber/Jaspersoft_InputControlsFromCSV/blob/master/index.html#L20

    and check in the web services guide page 71...

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题