Report Component
Style customization
Title
Position (x, y, width, height, z Index)
Components can be repositioned and resized on the report. If you'd like to stack/overlap components, z index field can be used to control the stacking order.
Border
Content background color
After modifying the style, don't forget to click the save button to save the changes.
Types
Poli supports three types of components.
Static
- Text
- Image
- Iframe
Chart
Table
Pie
Pie chart requires the query to return at least two columns.
- Bar
Line chart requires the query to return at least two columns. One for X-axis (Key). The other for Y-axis (Value).
- Line
Line chart requires the query to return at least two columns. One for X-axis (Key). The other for Y-axis (Value).
- Area
Area chart requires the query to return at least two columns. One for X-axis (Key). The other for Y-axis (Value).
Filter
- Slicer
Slicer provides a list of values to select. It requires the query to return one column only.
- Single value
Dynamic SQL query with parameters
To use this feature, you would need to create at least one filter and one chart component. Here is how it works.
- Create a filter and define a query parameter. The query parameter serves as a placeholder for a real value in the query string.
- Create a chart and use the query parameter from the fitler in the SQL query.
- Enter/Select the value in the filter and click apply filter button to see the chart data change accordingly.For example:
Create a Slicer filter and define username as query parameter.
- -- Slicer
- SELECT username FROM user GROUP BY username;
Create a Table chart and use the :username in the IN clause.
- -- Table
- SELECT * FROM user WHERE 1 = 1 {{ AND username IN (:username) }}
More dynamic query examples:
- -- Query parameter from Slicer
- SELECT * FROM user WHERE 1 = 1 {{ AND name IN (:name) }}
- -- Query parameter from Single value
- SELECT * FROM user WHERE 1 = 1 {{ AND name = :name }}
- -- More
- SELECT *
- FROM user
- WHERE 1 = 1
- {{ AND department IN (:department) }}
- {{ AND role = :role }}
- {{ AND created <= :created }}
- ORDER BY last_login DESC
Nested parameters are not supported. For example:
- -- Invalid
- SELECT *
- FROM user
- WHERE 1 = 1
- {{
- AND department IN (:department)
- {{ AND role = :role }}
- }}
Drill through
Drill through is used to navigate from one component in a Report to another Report. To use it in Poli, you need to have at least two reports.
Create a pie chart in Report 1. Go to Drill Through tab. Choose the source column and destination report.
Click the Cup piece on the pie chart.
If this component has drill through defined, there will be a —> icon on the title bar.
- Report 2 is being displayed and product=Cup is passed along to Report 2. If there are any chart components on Report 2 that use :product query parameter in the query will become reactive.
Access permissions
Reports can be edited by Admin/Developer users, associated with a Group and viewed by all users. Check User Management for more details.