Published on :
Reporting EXTERNE

AHGhtml Macro - HTML Report Generation and Opening

This code is also available in: Deutsch Español Français
Attention : This code requires administrator privileges.
This macro defines an HTML output file in a temporary directory (via external macros %AHGtempdir and %AHGrdm). It uses ODS HTML to encapsulate the execution of the %AHGreportby macro, then closes the ODS destination. Finally, it executes the 'start' system command (Windows-specific) to open the generated file.
Data Analysis

Type : EXTERNE


Data is provided via the &dsn macro parameter.

1 Code Block
MACRO
Explanation :
Macro definition. File path calculation, ODS opening, call to the underlying reporting macro, ODS closing, and system command for file opening.
Copied!
1%macro AHGhtml(dsn,option=label);
2%local html;
3%let html=%sysfunc(compress(%AHGtempdir%str(\)%AHGrdm.HTML));
4 ods html file="&html";
5 %AHGreportby(&dsn,0,which=,whichlength=,sort=0,groupby=0,groupto=0,topline=,showby=0,option=nowd,labelopt=%str( ;));
6 ods html close;
7 x "start &html";
8%mend;
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.