1

我正在使用 Reportico 5.2.0的 Laravel 扩展来生成报告。我有一个表单,我在其中填写所有查询参数,并有按钮来获取 HTML、PDF、CSV 的输出。

我能够获取 HTML 输出,因为它是在视图中编写并通过 ajax 返回的。

当我单击 PDF 按钮时,我想获取 PDF。

我试过这个文档但没有成功 http://www.reportico.org/swsite/site/doc/reportico/tutorial_reportico.using.pkg.html#using.embedding

当我尝试在此处按照他们的 laravel 文档http://www.reportico.org/laravel/public/index.php/embed-links将链接嵌入到视图中时,
它指出ModeController Not found error

是否只能在单击链接或通过 ajax 时获取 PDF?

4

2 回答 2

1

我找到了解决方案,

我只需要将我的网址指向

http://{laravel_app_url}/index.php/reportico/ajax?project={project-name}
&target_format=PDF&report={XML-file}

target_format相应地更改输出类型。但需要注意的是,我需要在生成 PDF 和 CSV 输出之前生成 HTML 输出。

于 2017-02-07T11:56:08.247 回答
1

另一种方法是使用专用路线来运行报告:-

http://{laravel_app_url}/index.php/reportico/execute/{project-name}/{reportname-without-xml-extension}?target_format=PDF

并以标准输入模式打开报告

http://{laravel_app_url}/index.php/reportico/prepare/{project-name}/{reportname-without-xml-extension}

于 2017-02-07T22:46:28.557 回答