dc e58e735610
Build / Build-and-ng-test (pull_request) Failing after 3m11s
Build / Build-and-test-development (pull_request) Skipped
Lighthouse Checks / lighthouse (pull_request) Successful in 18m51s
feat(viewer): export the grid as PDF from the context menu
Adds a PDF entry to the right-click Export submenu, next to CSV and Excel,
so the grid as displayed can leave the browser as a printable document.

Implemented directly against PDF 1.4 rather than adding a PDF library: the
output is a text table, which needs no embedded fonts, no images and no
compression. The base-14 Courier font is used because its glyphs are exactly
600/1000 em wide, so column widths are arithmetic on character counts instead
of a font-metrics table - a 1200 x 12 grid is laid out in ~60 ms.

Layout: A4 landscape, bold header band repeated on every page with "Page n of
m" footers, numeric columns right-aligned, values word-wrapped inside their
column, and long tables paginated. Wide tables are fitted by shrinking the
body font first (7pt down to 5pt, so a 20-column table keeps full headers at
6pt) rather than squeezing columns; only at 5pt are columns scaled, and they
stop at 4 characters - past that trailing columns are dropped and the first
page says how many were kept, so nothing is omitted silently.

Encoding is WinAnsi, the widest set the base-14 fonts cover without embedding;
characters outside cp1252 print as '?'. A typeset, branded report is a
different feature and belongs on the server, where SAS formats and DC metadata
are available.

The export keeps the existing "what you see" contract: current selection (when
it spans more than one cell), otherwise the whole grid, hidden columns
omitted, leading housekeeping columns skipped. The range calculation that CSV
and Excel already used is now a shared getExportRange(), so the three formats
cannot drift apart. Rows are capped at 5000 and the subtitle says so.

Tests: pdf-export.util.spec.ts covers document structure (xref offsets, page
count, footer numbering), string escaping, WinAnsi mapping and fallback,
wrapping, alignment, multi-line values, pagination, font fitting and the
page-width invariant; hot-export.util.spec.ts covers grid extraction against a
real Handsontable instance.
2026-11-01 19:19:28 +00:00
2026-05-01 11:46:10 +01:00
2023-07-13 13:44:05 +02:00
2026-10-29 16:32:45 +00:00
2023-07-25 09:09:57 +01:00
2026-06-15 14:42:18 +02:00

Data Controller for SAS

Control your manual data modifications!

Alternatives to Data Controller include:

  • 💾 Developing / testing / deploying / scheduling overnight batch jobs to load files from shared drives
  • 🔒 Opening (and locking) datasets in Enterprise Guide or SAS® Table Viewer to perform direct updates
  • ❓ Asking a #DBA to run validated code after a change management process
  • 🌐 Building & maintaining your own custom web application
  • 🏃 Running #SAS or #SQL updates in production

Problems with the above include:

  • Legacy 'black box' solutions with little to no testing, documentation or support
  • End users requiring direct write access to critical data sources in production
  • Upload routines that must be manually modified when the data model changes
  • Breaches due to unnecessary parties having access to the data
  • Inability to trace who made a change, when, and why
  • Reliance on key individuals to perform updates
  • Building bespoke ETL for every new data source
  • High risk of manual error / data corruption

Data Controller for SAS® solves all these issues in a simple-to-install, user-friendly, secure, documented, battle-tested web application. Available on Viya, SAS 9 EBI, and SASjs Server.

An individual Viya deploy can be done in just 2 lines of #SAS code!

filename dc url "https://git.datacontroller.io/dc/dc/releases/download/latest/viya.sas";
%inc dc;

For a multi-user deploy, using a shared system account, please see deploy docs.

For further information:

For support, contact support@4gl.io or reach out on Matrix!

Development

Lighthouse CI

This project includes automated Lighthouse performance and accessibility checks that run on pull requests. The checks ensure:

  • Accessibility Score: Minimum 1.0 (100%) median score across all tested pages

The Lighthouse CI workflow:

  1. Sets up the development environment with SASjs server and mocked services
  2. Builds and serves the Angular frontend
  3. Installs Chrome and runs lhci autorun (Lighthouse CI) against key pages
  4. Uploads results as artifacts for review

To run Lighthouse checks locally:

cd client
npm install
npm run lighthouse

Configuration is in client/lighthouserc.js (URL list, desktop preset, Chrome flags, assertions).

S
Description
Capture, Review, Approve. This repo contains the source code (and release assets) for the Data Controller application.
https://datacontroller.io
Readme
38 MiB
1 Stars 5 Watchers 0 Forks
v7.21.0
Latest
2026-10-29 16:32:53 +00:00
Languages
TypeScript 45.9%
SAS 24.5%
JavaScript 17.4%
HTML 8.7%
SCSS 2.8%
Other 0.7%