You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/topics/Reports.md
+9-8
Original file line number
Diff line number
Diff line change
@@ -51,19 +51,20 @@ In addition, the [`Reports` plugin](../references/qwc2_plugins.md#reports) provi
51
51
Here is an example to configure a report for a layer, whose datasource is a PostgreSQL table, assuming a `qwc-docker` setup.
52
52
53
53
- Create a Jasper report template using [Jasper Studio](https://community.jaspersoft.com/download-jaspersoft/community-edition/) with the desired layout.
54
-
- To include data from the PostgreSQL datasource in your report, add a Postgres Data Adapter, using the name of the PG service definition in your `pg_service.conf` as the name of the data adapter.
55
-
- Create a report parameter, though which the document-service will pass the primary key of report feature.
56
-
- Define the data query in the `Dataset and Query Dialog`, in the form
57
54
58
-
SELECT <fields> FROM <table_name> WHERE <pk_column> = $P{<FEATURE_PARAM_NAME>}
55
+
- To include data from the PostgreSQL datasource in your report, add a Postgres Data Adapter, using the name of the PG service definition in your `pg_service.conf` as the name of the data adapter.
56
+
- Create a report parameter, though which the document-service will pass the primary key of report feature.
57
+
- Define the data query in the `Dataset and Query Dialog`, in the form
59
58
60
-
If you need a more complex query, you'll need to explicitly specify the `table_name`, `pk_column` and `FEATURE_PARAM_NAME` in the document template resource configuration, see below.
59
+
SELECT <fields> FROM <table_name> WHERE <pk_column> = $P{<FEATURE_PARAM_NAME>}
61
60
62
-
- If you want to include external resources (images, etc), set the resource path relative to the `$P{REPORT_DIR}` path as described in the [`README`](../references/qwc-document-service_readme.md).
61
+
If you need a more complex query, you'll need to explicitly specify the `table_name`, `pk_column` and `FEATURE_PARAM_NAME` in the document template resource configuration, see below.
62
+
63
+
- If you want to include external resources (images, etc), set the resource path relative to the `$P{REPORT_DIR}` path as described in the [`README`](../references/qwc-document-service_readme.md).
63
64
64
65
- Save your report to the document service report dir, i.e. as `volumes/reports/MyReport.jrxml`.
65
66
66
-
- If you included any custom fonts in your report, place these in `ttf` format in `volumes/reports/fonts` respecting the naming convention described in the [`README`](../references/qwc-document-service_readme.md).
67
+
- If you included any custom fonts in your report, place these in `ttf` format in `volumes/reports/fonts` respecting the naming convention described in the [`README`](../references/qwc-document-service_readme.md).
67
68
68
69
- Associate the report with a layer via `themesConfig.json` by adding the following to the desired theme configuration entry:
69
70
@@ -100,6 +101,6 @@ Here is an example to configure a report for a layer, whose datasource is a Post
100
101
101
102
- Test your report, either through the QWC2 interface, or via a direct call to the document service, i.e.:
0 commit comments