Author SHA1 Message Date
dc b20c3f3507 docs(va): filter shot with rows to see, and no wrapperless crop
Captured from the report viewer at 1920x1100: two prompts (a value list and a
date), 21 rows returned by
FILTER : ( ( SOME_DROPDOWN = 'Option 1' AND SOME_DATE = '01JUL1960'd ) ).

- drops the header/FILTER crop, which had no VA chrome, and the sentence it
  illustrated
- drops the "single row it matches" wording, which no longer describes the
  picture
- documents the date clause as a code block instead of a second image
2026-10-29 14:05:23 +00:00
dc f803656936 docs(va): two-parameter report shot with a date literal
Replaces the three-parameter screenshot with a two-parameter one - a value
list and a date - and adds a zoomed crop of the DC header and FILTER line.

The date parameter arrives as a display date and is rendered as a SAS date
literal ('12FEB1960'd), the same as a date filter built inside Data
Controller. That is worth showing because VA's own prompt containers in the
report header show only the parameter label: the FILTER line is where the
selected values are legible.
2026-10-29 13:14:15 +00:00
dc 5d9a133261 docs(va): show Data Controller inside a real VA report
Adds the two screenshots the embed page was missing, both captured from a
Viya deployment with Data Controller embedded as a data-driven content
object:

- three report parameters (SOME_CHAR, SOME_DROPDOWN, SOME_NUM) reaching one
  object, with the combined FILTER line and the single matching row in the
  editor
- the object's Options pane, showing the URL as a Web Content property
  rather than a data source

Also documents two things that make an embedded object look broken when the
deployment is fine: the URL is an object property and the object needs no
data assigned, and an unlicensed / not yet accepted deployment shows its
licensing screen inside the object.  The debugging section now says the
parameter label in the postMessage payload is the key va_parmap matches.
2026-10-29 12:52:26 +00:00
3 changed files with 19 additions and 1 deletions

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

+19 -1
View File
@@ -50,6 +50,10 @@ VA pushes a JSON payload to the iframe via `window.postMessage` whenever the sel
If VA sends an empty / unmatched message the editor falls back to the unfiltered view but stays in VA mode. If VA sends an empty / unmatched message the editor falls back to the unfiltered view but stays in VA mode.
In the report below, two report parameters - `SOME_DROPDOWN` and `SOME_DATE` - reach one Data Controller object, and the editor shows both the combined filter and the rows it matches:
![A value and a date parameter filtering the embedded editor](img/va-report-filters.png)
More logic available in [`va-messaging.service.ts`](https://git.datacontroller.io/dc/dc/src/branch/main/client/src/app/services/va-messaging.service.ts). More logic available in [`va-messaging.service.ts`](https://git.datacontroller.io/dc/dc/src/branch/main/client/src/app/services/va-messaging.service.ts).
## Mapping parameters to columns ## Mapping parameters to columns
@@ -168,6 +172,10 @@ The mapping lives entirely in the URL of the report object, so the job is to get
Everything before the `#` is the normal deployment URL; the `#/editor/...` part is the DC route, and `?embed=va` plus the `va_parmap` entries are what this page describes. One object per report tab, each with its own entry, is what lets two tabs filter the same column differently. Everything before the `#` is the normal deployment URL; the `#/editor/...` part is the DC route, and `?embed=va` plus the `va_parmap` entries are what this page describes. One object per report tab, each with its own entry, is what lets two tabs filter the same column differently.
The URL is a property of the object, not a data source: it lives in **Options > Web Content > URL**, and the object needs no data assigned for Data Controller to open its own table. In the designer that section looks like this (the field is scrolled to the end of a long URL):
![The Web Content URL property on a Data-driven content object](img/va-report-object-options.png)
3. **Make the parameter reach the object.** VA sends an object only the parameters its query uses. A report parameter that the object's data does not reference never arrives, and the mapping then has nothing to map - DC reports it as `VA is not sending ...` in the banner. So bind the parameter into the object (assign it as a source on the object's query, as you would for any other visual), rather than only defining it at report level. 3. **Make the parameter reach the object.** VA sends an object only the parameters its query uses. A report parameter that the object's data does not reference never arrives, and the mapping then has nothing to map - DC reports it as `VA is not sending ...` in the banner. So bind the parameter into the object (assign it as a source on the object's query, as you would for any other visual), rather than only defining it at report level.
4. **Save the report**, then open it. DC shows the applied filter above the grid, so a correct mapping is visible without opening the editor: 4. **Save the report**, then open it. DC shows the applied filter above the grid, so a correct mapping is visible without opening the editor:
@@ -176,6 +184,12 @@ The mapping lives entirely in the URL of the report object, so the job is to get
FILTER : ( ( REGION = 'Europe' ) ) FILTER : ( ( REGION = 'Europe' ) )
``` ```
A date parameter arrives as a display date and is rendered as a SAS date literal, the same as a date filter built inside Data Controller:
```text
FILTER : ( ( SOME_DROPDOWN = 'Option 1' AND SOME_DATE BETWEEN '01JAN1960'd AND '31MAR1960'd ) )
```
Something wrong shows the banner instead, with the cause and the fix - see [When a mapping cannot be used](#when-a-mapping-cannot-be-used) above. Something wrong shows the banner instead, with the cause and the fix - see [When a mapping cannot be used](#when-a-mapping-cannot-be-used) above.
!!! note !!! note
@@ -187,6 +201,8 @@ The object runs as the person **viewing** the report, using their SAS identity -
Register everyone who will open the report before you ship it (Users in DC), and test the report as one of them rather than as the person who built it - the author often has elevated permissions, so a report that works for them can fail for everyone else. Register everyone who will open the report before you ship it (Users in DC), and test the report as one of them rather than as the person who built it - the author often has elevated permissions, so a report that works for them can fail for everyone else.
The deployment itself has to be licensed and past its End User License Agreement before it is embedded, for the same reason: an unlicensed instance shows the licensing screen (the agreement, then the free tier until a key is uploaded) inside the object, which reads as a broken embed rather than as setup that was never finished. Accept the agreement and register the key by opening the deployment directly, then reload the report.
## Debugging ## Debugging
A hook script can tell an embedded editor from a standalone one without any client-side inspection: `work.browser_info` carries the page URL and `referrer`, and `work.browser_url_vars` carries `embed=va`. See [Browser Variables](/developer-guide/browser-variables/). A hook script can tell an embedded editor from a standalone one without any client-side inspection: `work.browser_info` carries the page URL and `referrer`, and `work.browser_url_vars` carries `embed=va`. See [Browser Variables](/developer-guide/browser-variables/).
@@ -195,4 +211,6 @@ The following snippet can be used in console to dump the values being provided t
``` ```
console.log(JSON.stringify(window.__vaLastMessage?.data, null, 2)) console.log(JSON.stringify(window.__vaLastMessage?.data, null, 2))
``` ```
Each entry in its `parameters` array carries a `label`, and that label is what a `va_parmap` entry has to match (and what the name match uses when there is no entry). When a mapping appears to do nothing, compare the labels in this dump with the left-hand side of the entries in the object's URL - a parameter that VA labels differently from what was typed in the URL is silently a different parameter.