前言介紹
- 這款 WordPress 外掛「JasperReports IO」是 2020-04-13 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2020-04-16,距離現在已有 1844 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
tdanciu |
外掛標籤
charts | jasper | reports | jaspersoft | visualizations |
內容簡介
JasperReports IO WordPress 插件可以擴展 WordPress REST API 的功能,作為 TIBCO JasperReports® IO 微服務引擎的代理,因此可以生成快速、高度互動且可以無縫嵌入頁面和文章或導出為 PDF、Excel、Word 或其他流行文件格式的報告和可視化數據。
插件提供了多個短代碼,可將報告或數據可視化內嵌到頁面或文章中、打開特殊的互動查看器或包含直接導出特定文檔格式的連結。
使用 JasperReports IO WordPress 插件需要的主要配置選項是 TIBCO JasperReports® IO 微服務引擎運行的 URL。該 URL 通常只能由托管 WordPress 實例的服務器訪問,並且不應該從瀏覽器公開訪問(請參閱下面的安全性部分)。
短代碼 :
報告內嵌短代碼
您可以使用下列短代碼將互動報表或數據可視化內嵌到頁面或文章中:
[jrio report='/uri/of/the/report/in/the/jrio/repository']
內嵌報告容器的尺寸可以通過寬度和高度短代碼參數來控制,而比例調整行為可以使用 scale 短代碼參數來控制,如以下短代碼示例所示:
[jrio report='/uri/of/the/report/in/the/jrio/repository' scale='width' width='300px']
如果 JasperReports IO 报告或数据可视化项有自己的参数,您可以使用与相应报告参数相同名称的短代碼参数传递值。但是,由于短代碼参数不区分大小写,所以对于驼峰式命名法,需要使用名为 mappings 的特殊报告名称映射短碼参数。
例如,ChartThemesReport 从 JasperReports IO 存储库中提取出具有控制所显示图表颜色渐变的 chartTheme 参数。请注意报告参数的驼峰名。应使用具有相同名称的短代碼参数将此报告参数的值传递给 JasperReports IO 微服务,但是 WordPress 会自动将其转换为小写,因此该 reporting 服务不能识别该参数。因此,我们使用 mappings 短代碼参数指示 charttheme 短代碼对应于 chartTheme 报告参数。
如果报告参数全是小写,则不需要此类报告参数映射。
报告查看短代碼:
您可以使用下列短代碼在页面或文章中包含超链接,以在当前浏览器页面上方显示全屏互动报告查看器中打开报告或数据可视化。
在这里点击打开报告 [jrio_viewer report='/samples/reports/chartthemes/ChartThemesReport']here[/jrio_viewer].
報告短代碼支持報告參數和與報表內嵌短代碼相同的參數映射技術。
報告導出短碼:
此短碼可用於在頁面或文章中插入報告或數據可視化導出鏈接。
单击此类链接,報告或數據可視化將被導出為支持的文檔格式之一,并作为下載文件发送到瀏覽器。
輸出短碼
原文外掛簡介
The JasperReports IO WordPress plugin extends the WordPress REST API to act as a proxy for the TIBCO JasperReports® IO microservice engine and thus allows generating reports and visualizations that are fast, highly interactive, and seamlessly embeddable into pages and blog posts or can be exported to PDF, Excel, Word or other popular document formats.
It provides several shortcodes for embedding the reports or data visualizations into the page or blog post, for opening them in a special interactive viewer, or for including the links for directly exporting those to specific document formats.
The main configuration option needed to use the JasperReports IO WordPress plugin is the URL where the TIBCO JasperReports® IO microservice engine is running. This URL should normally be accessible only by the server hosting the WordPress instance and should not be publicly accessible from the browser (see the Security section below).
Shortcodes
Report Embedding Shortcode
The following shortcode can be used to embed an interactive report or data visualization into a page or blog post:
[jrio report='/uri/of/the/report/in/the/jrio/repository']
The size of the embedded report container can be controlled with the width and height shortcode parameters, while the scaling behavior can be controlled using the scale shortcode parameter as seen in the following shortcode example:
[jrio report='/uri/of/the/report/in/the/jrio/repository' scale='width' width='300px']
If the JasperReports IO report or data visualization has parameters of its own, you can pass values for those using shortcode parameters having the same name as the respective report parameters.
However, since shortcode parameters are case insensitive, for camel case report parameters, a special report name mapping shortcode parameter called mappings needs to be used.
In the following example, the ChartThemesReport from the JasperReports IO repository has a parameter called chartTheme, which controls the color pallette of the chart being displayed. Notice the camel case name of the report parameter. Using a shortcode parameter with the same name should be used to pass the value of this report parameter to the JasperReports IO microservice, but it will be converted to lower case automatically by WordPress and thus would not be recognized by the reporting service.
This is why we use the mappings shortcode parameter to indicate that charttheme shortcode would correspond to the chartTheme report parameter.
[jrio report='/samples/reports/chartthemes/ChartThemesReport' chartTheme='aegean' mappings='charttheme:chartTheme']
Such report parameter mappings are not needed if the report parameters are entirely lower case.
Report Viewing Shortcode
The following shortcode can be used to include a hyperlink in the page or blog post to open the report or data visualization in a fullscreen interactive report viewer that would be displayed on top of the current browser page.
Open the report by clicking [jrio_viewer report='/samples/reports/chartthemes/ChartThemesReport']here[/jrio_viewer].
The report viewing shortcode supports report parameters and the same parameter mapping technique as the report embedding shortcode.
Report Export Shortcode
This shortcode can be used to insert report or data visualization export links into the page or blog post.
By clicking such links, the report or data visualization would be exported into one of the supported document formats and sent to the browser as a download file.
The output shortcode parameter specifies the target export format and can be one of the following: html, pdf, xls, xlsx, docs, pptx, rtf, ods, odt, csv.
Click [jrio_export report='/report/path/in/jrio/repository' output='pdf']here[/jrio_export] to export to PDF.
Built-in Parameters
When executing reports and generating data visualizations with JasperReports IO, the plugin is automatically sending some parameters behind the scenes. The so-called built-in parameters have values that are provided internally by WordPress and cannot be overridden, by specifying them in the shortcodes.
This is the list of the build-in parameters that the JasperReports IO plugin injects into every report or data visualization generated by the JasperReports IO service:
WP_User_ID
WP_User_login
WP_User_email
WP_User_firstname
WP_User_lastname
WP_User_display_name
WP_User_roles
These built-in parameters can be used in reports to parametrize queries and filter information that only pertain to the current user being logged into WordPress and on whose behalf the report was executed.
Security
The TIBCO JasperReports® IO microservice does not have a security infrastructure of its own and relies on the caller/consumer to provide it. This is why when used in combination with this WordPress plugin, the reporting microservice has to be deployed behind a firewall and not be publicly accessible from the browser.
If it were to be publicly accessible, anybody could make REST API calls to it and have reports and data visualizations delivered without requiring any credentials or security related information from the caller.
The JasperReports IO plugin offers controlled access to the TIBCO JasperReports® IO by acting like a proxy that sits between the end user and the reporting microservice and channeling through the communication between the two. By doing so, the plugin also deals with the security part by ensuring that reports and data visualizations generated from a browser session are available only to that browser session only.
It thus offers session isolation to the microservice, which does not have such functionality itself.
Basically every user of this WordPress plugin has access only to the reports and data visualizations that have themselves generated based on unique execution IDs that are available only from within the current browser session.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「JasperReports IO」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。