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.

style2

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.

  1. -- Slicer
  2. SELECT username FROM user GROUP BY username;

Create a Table chart and use the :username in the IN clause.

  1. -- Table
  2. SELECT * FROM user WHERE 1 = 1 {{ AND username IN (:username) }}

More dynamic query examples:

  1. -- Query parameter from Slicer
  2. SELECT * FROM user WHERE 1 = 1 {{ AND name IN (:name) }}
  3.  
  4. -- Query parameter from Single value
  5. SELECT * FROM user WHERE 1 = 1 {{ AND name = :name }}
  6.  
  7. -- More
  8. SELECT *
  9. FROM user
  10. WHERE 1 = 1
  11. {{ AND department IN (:department) }}
  12. {{ AND role = :role }}
  13. {{ AND created <= :created }}
  14. ORDER BY last_login DESC

Nested parameters are not supported. For example:

  1. -- Invalid
  2. SELECT *
  3. FROM user
  4. WHERE 1 = 1
  5. {{
  6. AND department IN (:department)
  7. {{ AND role = :role }}
  8. }}

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.drillthrough1

  • Create a pie chart in Report 1. Go to Drill Through tab. Choose the source column and destination report.drillthrough2

  • Click the Cup piece on the pie chart.

If this component has drill through defined, there will be a —> icon on the title bar.

drillthrough3

  • 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.drillthrough4

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.