Embedding inside SAS Visual Analytics¶
Data Controller can be embedded inside a SAS Visual Analytics report as a data-driven content (DDC) object. This unlocks scenarios where a user can safely modify the values in an underlying SAS table, and have the visualisation updated- all from inside the same report.
URL¶
Open the editor as a DDC by appending ?embed=va to the editor route:
`https://yourserver/DC/#/editor/<library>/<table>?embed=va`
The ?embed= parameter accepts three values:
| Value | Behaviour |
|---|---|
true |
Chrome (header, back button, sub-nav) is hidden. Editor functions normally. |
va |
Same chrome-hiding as true, plus editor becomes "VA-aware" - any report filters are captured, and columns can be displayed / hidden using the Edit Report interface. Filter button is disabled (use VA filters instead) |
false (or omitted) |
Standard interactive UI. |
How VA drives the editor¶
VA pushes a JSON payload to the iframe via window.postMessage whenever the selected rows change. Data Controller listens for these messages and:
- Resolves each VA
parameterto a DC column by matching on column label. - Builds a filter (using existing Filter machinery) over the selected values.
- Hides any VA columns marked as
brushso the grid stays focused on the user-editable columns (except primary key cols which are always shown)
If VA sends an empty / unmatched message the editor falls back to the unfiltered view but stays in VA mode.
More logic available in `va-messaging.service.ts'.
Configuration in VA¶
In the VA Report Designer, add a Data-Driven Content object and set the URL to the editor route shown above. Be sure that any report level filters have their corresponding parameters added to the DDC object itself.
Debugging¶
The following snippet can be used in console to dump the values being provided to DC from VA:
console.log(JSON.stringify(window.__vaLastMessage?.data, null, 2))