Hi,
the execution of the job gives me the written web_out in the report.
As attached
How can I get rid of it?
Thank you
Please do not provide MS office files, most people here will not/cannot download them due to risk or policy.
So what's wrong? The two text strings on the left?
How is that page generated, as in: What's the code?
yes,The two text strings on the left.
The code in attached.
Thanks
%macro ciclo;
%let tot_tavole=0;
Proc sql noprint;
select distinct cod_tavola_2, Max(NUM_SOTTO_TAVOLA)as max, cod_impresa ,label,descrizione_tavola,
cats('T_',cod_tavola_2,"_",NUM_SOTTO_TAVOLA,"_",cod_impresa,"_2_F" )as table
into
:cod_tav_1 - :cod_tav_999,
:NUM_SOTTO_TAVOLA_1 - :NUM_SOTTO_TAVOLA_999,
:cod_impresa_1 - :cod_impresa_999 ,
:label_1 -:label_999,
:descrizione_1 -: descrizione_999,
:table_1 -:table_999,
:denominazione_1 -:denominazione_999
from Tavole_statistiche_new
/* condizione perche la stessa impresa può avere più cod_tavola*/
where cod_tavola_2= "&cod_tavola"
group by cod_tavola_2, cod_impresa,label,descrizione_tavola,table
;
quit;
%let tot_tavole=&sqlobs.;
/*%put il numero degli sheet : &tot_tavole;*/
/*se la tavola è presente nella tabella ne fa la trasposta altrimenti va alla fine del codice e scrive
la pagina html che non è presente*/
%if &tot_tavole> 0 %then %do ;
%do i=1 %to &tot_tavole;
%do j=1 %to &&NUM_SOTTO_TAVOLA_&i;
%crea_tavola(cod_tavola=&&cod_tav_&i,NUM_SOTTO_TAVOLA=&j,cod_impresa=&&cod_impresa_&i);
%end;
%end;
filename F_XLXP FILESRVC parenturi="&SYS_JES_JOB_URI"
name= "Tavola Statistica.xml"
contenttype='application/x-xml'
contentdisp='attachment; filename= "Tavola Statistica.xml"';
%do i=1 %to &tot_tavole;
%do j=1 %to &&NUM_SOTTO_TAVOLA_&i;
%rinominare_colonne(cod_tavola=&&cod_tav_&i,NUM_SOTTO_TAVOLA=&j,cod_impresa=&&cod_impresa_&i);
/*%put numero sotto tavole nel ciclo :&&NUM_SOTTO_TAVOLA_&i;*/
/*
%export(cod_tavola=&&cod_tav_&i,cod_impresa=&&cod_impresa_&i,);
*/
%end;
%export(cod_tavola=&cod_tavola,cod_impresa=&cod_impresa,descrizione=&descrizione);
%end;
/*Creazione link per scaricare excel
%let EXCEL_LINK=%bquote(<a href=""&_FILESRVC_F_XLXP_URI/content"" target='_SELF'>Excel</a>);
%put &=EXCEL_LINK;
*/
/*creazione pagina web da cui scaricare la tavola
filename f_htm FILESRVC parenturi="&SYS_JES_JOB_URI"
name='_webout.htm';
ods html5 file=f_htm style=&_ODSSTYLE
text="<span>^{style systemtitle Download Tavola^{nbspace 3}&EXCEL_LINK </span> ";
*/
%let EXCEL_LINK=%bquote(<center><a href=""&_FILESRVC_F_XLXP_URI/content""
style="background:linear-gradient(to bottom, #314c69 5%, #62768a 100%);
background-color:#314c69;
border-radius:14px;
border:2px solid #23374d;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Helvetica;
font-size:15px;
font-weight:bold;
padding:27px 76px;
text-decoration:none;
text-shadow:0px 1px 0px #23374d;
">Download Tavola &cod_tavola </a></center>);
/* Create the HTML output for display in the Web browser;*/
filename f_htm filesrvc parenturi="&SYS_JES_JOB_URI"
name='_webout.htm';
ods html5 file=f_htm style=&_ODSSTYLE text="
<style type='text/css'>
body {
background: url('https://sasviyaweb-ivass.utenze.bankit.it//files/files/c47640ab-dc53-466d-913b-843defc45cbe/content')top no-repeat;
background-size:auto;
background-attachment: fixed;
}
.banner {
color: #ffffff;
font-size:15px;
font-weight: bold;
border:5px solid #23374d;
padding: 70px;
background-color: #23374d !important;
background: url(https://sasviyaweb-ivass.utenze.bankit.it//files/files/0b511c5a-9e0c-4919-93c7-96810261dfcb/content)top no-repeat;
background-size: 250px;
height: 0px;
font-family: lato,arial,helvetica,sans-serif;
}
</style>
<body>
<div align='center' class='banner' >Estrattore Tavole Statistiche</div>";
ods html5 text=" <span>^{ style systemtitle &EXCEL_LINK}</span>";
%end;
%else %do;
ods html5 text="<style>
body {background: url('https://sasviyaweb-ivass.utenze.bankit.it//files/files/c47640ab-dc53-466d-913b-843defc45cbe/content')top no-repeat;
background-size:auto;
background-attachment: fixed;
/* height: 180px;*/
}
.banner {
color: #ffffff;
font-size:15px;
font-weight: bold;
border:5px solid #23374d;
padding: 70px;
background-color: #23374d !important;
background: url(https://sasviyaweb-ivass.utenze.bankit.it//files/files/0b511c5a-9e0c-4919-93c7-96810261dfcb/content)top no-repeat;
background-size: 250px;
height: 0px;
font-family: lato,arial,helvetica,sans-serif;
}
.highlightme { background-color:#f8f8f8;
color:#23374d;
font-size:15px;
font-weight:bold;}
</style>
<body>
<br>
<br>
<div align='center' class='banner' >Estrattore Tavole Statistiche</div>;
<br>
<br>
<span class='highlightme'>Per visualizzare la tavola &cod_tavola ritornare sul Report e cliccare sulla scritta Scarica Tavola presente nel report in alto a destra </span></div>";
%end;
ods html5 close;
%mend;
%ciclo;
filename f_htm filesrvc parenturi="&SYS_JES_JOB_URI" name='_webout.htm';
I've never used device FILESRVC , but don't see that name= is a valid option?
Does this happen when sqlobs=0?
The NAME=option is not in the documentation. Try removing that.
if I delete NAME=option it doesn't work
I've run out of suggestions. I never got a chance to use this filename device, so I just pointed out what seemed odd to me. You should contact SAS tech support if you don't find an answer here. Buona fortuna Antonella! 🙂
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.