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.
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:
- Main site: https://datacontroller.io
- Docs: https://docs.datacontroller.io
- Code: https://code.datacontroller.io
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:
- Sets up the development environment with SASjs server and mocked services
- Builds and serves the Angular frontend
- Installs Chrome and runs
lhci autorun(Lighthouse CI) against key pages - 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).