24 %MACRO _reportCasHTML (i_repdata =
31 l_nls_reportcas_errors
38 %LET l_nls_reportcas_errors = %STR(error(s));
40 data work._case_report;
41 SET &i_repdata. end=eof;
45 scn_abs_path abs_path $ 256
58 scnIdColumn idColumn $80
59 scnDescriptionColumn descriptionColumn $1000
60 scnProgramColumn programColumn $1000
61 scnLast_runColumn last_runColumn $1000
62 scnDurationColumn durationColumn $1000
65 label idColumn=
"&g_nls_reportCas_011."
66 scnIdColumn=
"&g_nls_reportCas_011."
67 scnDescriptionColumn=
"&g_nls_reportCas_003."
68 descriptionColumn=
"&g_nls_reportCas_012."
69 scnProgramColumn=
"&g_nls_reportCas_004."
70 programColumn=
"&g_nls_reportCas_013."
71 scnLast_runColumn=
"&g_nls_reportCas_022."
72 last_runColumn=
"&g_nls_reportCas_014."
73 scnDurationColumn=
"&g_nls_reportCas_008."
74 durationColumn=
"&g_nls_reportCas_015."
75 resultColumn=
"&g_nls_reportCas_016."
78 *** initalizing variables that MAY be used in a specific assert ***;
83 if (first.cas_id) then
do;
84 *** Columns
for scenario overview ***;
85 IF scn_errorcount GT 0 THEN DO;
86 errcountmsg =
'(' !! compress(put(scn_errorcount, 3.)) !!
' ' !!
"&l_nls_reportcas_errors." !!
')';
92 scn_abs_path = resolve (
'%_abspath(&g_root,' !! trim(scn_path) !!
')');
93 scn_pgm = resolve (
'%_stdpath(&g_root./saspgm/test,' !! trim(scn_abs_path) !!
')');
94 scn_duration = put (scn_end - scn_start, ??&g_nls_reportScn_013.) !!
" s";
95 c_scnid = put (scn_id, z3.);
98 %_render_idColumn (i_sourceColumn=scn_id
100 ,o_targetColumn=ScnIdColumn
102 %_render_dataColumn (i_sourceColumn=scn_desc
103 ,o_targetColumn=scnDescriptionColumn
105 %_render_dataColumn (i_sourceColumn=scn_duration
106 ,o_targetColumn=scnDurationColumn
109 *** Any destination that renders links shares
this if ***;
110 %
if (&o_html.) %then %
do;
111 LinkTitle1 =
"&g_nls_reportScn_010" !! byte(13) !! scn_abs_path;
112 LinkTitle2 =
"&g_nls_reportScn_011";
113 *** HTML-links are destinations specific ***;
114 %
if (&o_html.) %then %
do;
115 LinkColumn1 =
"file:///" !! scn_abs_path;
116 LinkColumn2 = c_scnid !!
"_log.html";
118 %_render_dataColumn (i_sourceColumn=scn_path
119 ,i_linkColumn=LinkColumn1
120 ,i_linkTitle=LinkTitle1
121 ,o_targetColumn=scnProgramColumn
123 scnLast_runColumn = catt (
'^{style [flyover="',LinkTitle2,
'" url="',LinkColumn2,
'"]', put (scn_start, ??&g_nls_reportScn_012.),
'}'
124 ,
"^{style logerrcountmsg ", errcountmsg,
'}');
127 *** Columns
for test cases ***;
128 if (cas_pgm=
"^_") then cas_pgm=
"";
129 IF cas_auton = . THEN DO;
130 abs_path = resolve (
'%_abspath(&g_root,' !! trim(cas_pgm) !!
')');
133 abs_path = resolve (
'%_abspath(&g_sasautos' !! put (cas_auton,1.) !!
',' !! trim(cas_pgm) !!
')');
136 duration = put (cas_end - cas_start, ??&g_nls_reportScn_013.) !!
" s";
137 c_casid = put (cas_id, z3.);
139 %_render_idColumn (i_sourceColumn=cas_id
141 ,o_targetColumn=idColumn
143 %_render_dataColumn (i_sourceColumn=duration
144 ,o_targetColumn=durationColumn
146 %_render_iconColumn (i_sourceColumn=cas_res
148 ,o_targetColumn=resultColumn
150 *** Any destination that renders links shares
this if ***;
151 %
if (&o_html.) %then %
do;
152 LinkTitle3 =
"&g_nls_reportCas_017 " !! c_casid;
153 LinkTitle4 =
"&g_nls_reportCas_018" !! byte(13) !! abs_path;
154 LinkTitle5 =
"&g_nls_reportCas_006";
155 *** HTML-links are destinations specific ***;
156 %
if (&o_html.) %then %
do;
157 LinkColumn3 =
"cas_" !! c_scnid !!
"_" !! c_casid !!
".html";
158 LinkColumn4 =
"file:///" !! abs_path;
159 LinkColumn5 = c_scnid !!
"_" !! c_casid !!
"_log.html";
162 %_render_dataColumn (i_sourceColumn=cas_desc
163 ,i_linkColumn=LinkColumn3
164 ,i_linkTitle=LinkTitle3
165 ,o_targetColumn=descriptionColumn
167 %_render_dataColumn (i_sourceColumn=cas_pgm
168 ,i_linkColumn=LinkColumn4
169 ,i_linkTitle=LinkTitle4
170 ,o_targetColumn=programColumn
172 %_render_dataColumn (i_sourceColumn=cas_start
173 ,i_format=&g_nls_reportCas_007.
174 ,i_linkColumn=LinkColumn5
175 ,i_linkTitle=LinkTitle5
176 ,o_targetColumn=last_runColumn
184 select max (scn_id) into :l_anzScenarios from work._case_report;
189 %let l_title=%str(&g_nls_reportCas_001 | &g_project - &g_nls_reportCas_002);
190 title j=c "&l_title.";
192 %if (&o_html.) %then %do;
193 ods html4 file="&o_path./&o_file..html"
195 headtext='<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />'
196 metatext="http-equiv=""Content-Style-Type"" content=""text/css"" /><meta http-equiv=""Content-Language"" content=""&i_language."" /"
197 style=styles.SASUnit stylesheet=(URL="css/SAS_SASUnit.css")
198 encoding="&g_rep_encoding.";
199 %_reportPageTopHTML(i_title = &l_title.
203 %do l_scnid=1 %to &l_anzScenarios.;
204 data work._current_scn;
205 set work._case_report (where=(scn_id=&l_scnid.));
208 data work._current_scn_overview;
209 set work._current_scn (where=(cas_id=1));
210 length Name $20 Value $1000;
211 Name="&g_nls_reportCas_011."; Value=c_scnid;output;
212 Name="&g_nls_reportCas_003."; Value=scnDescriptionColumn;output;
213 Name="&g_nls_reportCas_004."; Value=scnProgramColumn;output;
214 Name="&g_nls_reportCas_022."; Value=scnLast_runColumn;output;
215 Name="&g_nls_reportCas_008."; Value=scnDurationColumn;output;
218 *** Create specific HTML-Anchors ***;
219 %if (&o_html.) %then %do;
220 ods html4 anchor="SCN%sysfunc(putn(&l_scnid.,z3.))_";
222 proc print data=work._current_scn_overview noobs label
223 style(report)=blindTable [borderwidth=0]
224 style(column)=blindData
225 style(header)=blindHeader;
228 *** Supress title between testcases ***;
229 %if (&l_scnid. = 1) %then %do;
233 *** Show footnote only once ***;
234 %if (&l_scnid. = &l_anzScenarios.) %then %do;
235 %_reportFooter(o_html=&o_html.);
238 proc report data=work._current_scn nowd missing
239 style(lines)=blindData
242 columns idColumn descriptionColumn programColumn last_runColumn durationColumn resultColumn;
244 define idColumn / display style(Column)=rowheader;
245 define durationColumn / display style(Column)=[just=right];
246 define resultColumn / display style(Column)=[background=white];
248 compute before _page_;
249 line @1 "&g_nls_reportCas_010.";
253 *** Render separation line between scenarios ***;
254 %if (&o_html. AND &l_scnid. ne &l_anzScenarios.) %then %do;
255 ods html4 text="^{RAW <hr size=
""1
"">}
";
258 proc delete data=work._current_scn_overview;
260 proc delete data=work._current_scn;
264 %if (&o_html.) %then %do;
268 proc delete data=work._case_report;
271 %*** Reset title and footnotes ***;
276 %MEND _reportCasHTML;