Published on :
Reporting SASHELP

HTML Paneling Report Generation

This code is also available in: Deutsch Español Français English
This program uses the ODS 'htmlpanel' tagset (included via an external .tpl file) to arrange the results of several procedures in a grid layout. Here, three 'sashelp.class' tables are displayed side-by-side or according to the column configuration defined in the ODS options.
Data Analysis

Type : SASHELP


The data used comes exclusively from the standard example table 'sashelp.class'. However, the script depends on an external code/template file 'htmlpanel.tpl'.

1 Code Block
MACRO & SETUP
Explanation :
Inclusion of the tagset definition file (template) and definition of a macro variable for the number of columns (although the option is overridden below).
Copied!
1%inc "htmlpanel.tpl";
2 
3%let panelcolumns = 2;
2 Code Block
ODS
Explanation :
Opening the ODS destination using the 'htmlpanel' tagset. The 'panelcolumns' option is set to 3. The 'panel(start)' event initializes the grid.
Copied!
1ods tagsets.htmlpanel file="printpanel.html" options(panelcolumns='3');
2 
3/* start the panelling */
4ods tagsets.htmlpanel event = panel(start);
3 Code Block
PROC PRINT
Explanation :
Execution of three identical PRINT procedures. Thanks to the active tagset, these outputs will be positioned in the panels of the generated HTML grid.
Copied!
1 
2PROC PRINT
3DATA=sashelp.class;
4RUN;
5PROC PRINT
6DATA=sashelp.class;
7RUN;
8PROC PRINT
9DATA=sashelp.class;
10RUN;
11 
4 Code Block
ODS
Explanation :
Closing the panel event, finalizing the grid layout in the HTML file.
Copied!
1ods tagsets.htmlpanel event = panel(finish);
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.