Write custom Velocity templates to control the layout, sections, and content of your Risksheet PDF exports, including cover pages, rating tables, downstream traceability, and custom data sections.
The exporter object provides these methods for building your PDF layout:
Method
Purpose
exporter.exportMainSheet(hideColumns?)
Export the main risk grid. Optional comma-separated column bindings to hide.
exporter.exportSubTable(controlColumn)
Export rows where the control column has non-empty values
exporter.exportDownstreamTable(controlColumn)
Like exportSubTable but with automatic deduplication
exporter.exportRatingTable(ratingId)
Export a rating scale definition table (ID, Label, Description)
exporter.exportEnumTable(enumId)
Export an enumeration definition table (ID, Label, Description)
exporter.exportCustomTableData(columns, data)
Export arbitrary tabular data with custom column definitions
Set exporter.emptyPlaceholder = "N/A" before exporting to display custom text for empty cells.For full method signatures, parameters, and cell formatting behavior, see the PDF Export Template reference.
The Velocity template has access to the full Polarion Velocity context, including:
$document — the current Polarion document object
$transaction — the current transaction context
Custom macros from pdfExportMacros.vm (page breaks, table helpers)
The doc.pageAdded event only applies to the specific page where it is called. To show images or headers on every page, you must add doc.pageAdded after each #newPage() call. It does not auto-repeat for table overflow pages.
Attach risksheetPdfExport.vm to the global template if all documents should use the same export layout. Attach it to a specific document to override the template for that document only. The fromTemplate flag tracks which source was used.