Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CADENZA-37830 CADENZA-37929 feat: Document support to show, fetch and download reports generated from report template embedding targets as PDF #63

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This project uses a version scheme based on the Cadenza main version in the form
- `Feature#circumference` property.
- `FeatureCollection#type` property
- `Geometry#coordinates` property
- Documentation for how to show, fetch and download embedding targets of type report as PDF (via the existing dataType=pdf option).

### Changed
- **BREAKING CHANGE** `CadenzaEditGeometryUpdateEvent#detail` is now typed as `FeatureCollection | Feature | undefined`. (Before: `{ geometry: Geometry }`)
Expand Down
8 changes: 4 additions & 4 deletions sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
hideMainHeaderAndFooter,
hideWorkbookToolBar,
highlightGlobalId,
jasperReportAsPdf,
requestAsPdf,
labelSet,
locationFinder,
mapExtent,
Expand All @@ -243,7 +243,7 @@
hideMainHeaderAndFooter: (hideMainHeaderAndFooter === 'on'),
hideWorkbookToolBar: (hideWorkbookToolBar === 'on'),
highlightGlobalId,
...(jasperReportAsPdf === 'on' && { dataType: 'pdf' }),
...(requestAsPdf === 'on' && { dataType: 'pdf' }),
labelSet,
locationFinder,
mapExtent: mapExtent && mapExtent.split(',').map(Number),
Expand Down Expand Up @@ -440,8 +440,8 @@
</div>
<div>
<label>
<input type="checkbox" name="jasperReportAsPdf" id="jasperReportAsPdf"/>
Show Jasper Report as PDF
<input type="checkbox" name="requestAsPdf" id="requestAsPdf"/>
Show as PDF (Reports)
</label>
</div>
</template>
Expand Down
15 changes: 9 additions & 6 deletions src/cadenza.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ export class CadenzaClient {
*
* @param {PageSource | EmbeddingTargetId} source - The source to show
* @param {object} [options]
* @param {DataType} [options.dataType] - Set to 'pdf' for views of type "JasperReports report"
* to show the report PDF directly, without any Cadenza headers or footers.
* @param {DataType} [options.dataType] - Set to 'pdf' for embedding targets of type report and of views with view
* type of "JasperReports report" to show the generated report PDF directly (without any Cadenza headers or
* footers).
* @param {UiFeature[]} [options.disabledUiFeatures] - Cadenza UI features to disable
* @param {boolean} [options.expandNavigator] - Indicates if the navigator should be expanded.
* @param {FilterVariables} [options.filter] - Filter variables
Expand Down Expand Up @@ -957,8 +958,9 @@ export class CadenzaClient {
*
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
* @param {DataType} dataType - The data type you want to get back from the server.
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
* and `"pdf"` for views of type "JasperReports report".
* Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
* table and indicator. `"pdf"` is supported for embedding targets of type report and of type view with a view type
* of "JasperReports report".
* @param {object} [options] - Options
* @param {FilterVariables} [options.filter] - Filter variables
* @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
Expand Down Expand Up @@ -1086,8 +1088,9 @@ export class CadenzaClient {
*
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
* @param {DataType} dataType - The data type you want to get back from the server.
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
* and `"pdf"` for views of type "JasperReports report".
* Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
* table and indicator. `"pdf"` is supported for embedding targets of type report and of type view with a view type
* of "JasperReports report".
* @param {object} [options] - Options
* @param {string} [options.fileName] - The file name to use; The file extension is appended by Cadenza.
* @param {FilterVariables} [options.filter] - Filter variables
Expand Down