Hi all..
Is there any way that i can read protect my ods html outputs.. i.e. disable selection of the reports that i print in ods html .
If someone has done something in these lines maybe you could point me in the right direction.
Thanks..
Hi:
As far as I know, there are no ODS options to do this for ODS HTML. However, if you know system commands and can issue system commands, I suppose that after your job runs, you could issue an operating system command to make the files read-only.
cynthia
Thanks cynthia.. But what i was looking for was an option that would disable the user from selecting numbers or tables printed on an ods html.
I was able to get some commands and implement it in template. It does work to some extent but is not foolproof.
proc template;
define style test;
parent=styles.normal;
style body from body /
prehtml="<div
style='-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;'
unselectable='on'
onselectstart='return false;'
oncontextmenu='return false;'
onmousedown='return false;'
oncopy='return false;'
oncut='return false;'
onpaste='return false;'
>";
style body from body /
posthtml="</div>";
end;
run;
ods html file="/MYPATH/TEST.HTML" Style=test;
proc report data=sashelp.class;
run;
ods html close;
Hi:
If there's a JavaScript or scripting way to do what you want, or an HTML5 way to do what you want, you might be able to work with Tech Support to find it. When I was working on the ODS book, we used CODE= option to pass in some JavaScript for the browser, you might be able to do something like that...but my scripting language for browsers is limited to putting a counter or a button on the bottom of a page or designing an HTML form with an <ACTION> tag.
cynthia
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.