BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Does anyone know of any products or SAS add-ons that would enable us to output report summary data to an internal website (static -- no server, just HTML pages), and would ennable the high-level reports to link to further pages of drill-down information?

For example, if I'm outputting a sales report by region to an internal website, is there a product that will take my dataset or proc summary output and, in addition to generating the high-level report of sales*region (sales by region), would also make the regions hyperlinks linking to drill-down reports for those regions (the drill-down report could be a list of reps for that region and their sales information)?

Thanks.
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi: This is a rather long program that illustrates many of the features you asked about. For more information about ODS and creating static HTML files, the Tech Support web site that you can find here:
http://support.sas.com/faq/040/FAQ04019.html (the techniques shown here work for ODS HTML, too)
http://support.sas.com/rnd/base/topics/templateFAQ/Template.html
http://support.sas.com/faq/032/FAQ03231.html

is most helpful. If your procedure of choice was not PROC PRINT, PROC REPORT or PROC TABULATE for your summary reports, then you would have to use techniques in the procedure's table template, as described here:
http://support.sas.com/faq/032/FAQ03260.html



Good luck!
cynthia
[pre]
proc format;
value $link 'M' = 'Males.html'
'F' = 'Females.html';
value agefmt 13.222222-13.22223 = 'http://www.sas.com'
other = 'http://www.setgame.com';
run;
ods listing close;
** there are better ways to set a numeric format;
** I just used a quick way;

** create a static report file with links;
** using URL= style attribute;

ods html path='c:\temp' (url=none)
file='file_with_url.html'
style=sasweb;

proc report data=sashelp.class nowd;
title 'with PROC REPORT';
title2 'click on a link to see the detail data';
footnote ;
column sex n age height;
define sex / group
style={url=$link.};
define n / 'Count';
define age / mean 'Average Age'
style={url=agefmt.};
define height / mean 'Average Height';
run;

proc tabulate data=sashelp.class;
title 'with PROC TAB';
title2 'click on a link to go to URL';
class sex;
classlev sex /style={url=$link.};
var age height;
tables sex,
mean*(age*{style={url=agefmt.}} height);
run;
ods html close;

** because the links in the format were pointing to 2 HTML files, I have to;
** make sure that those files exist in the same directory as the above;
** files, so I create them here;
** the LINK= option in the SAS title, allows me to make each of these;
** 2 files point to each other and point back to their "calling" file;

ods html path='c:\temp' (url=none)
file='Females.html' style=sasweb;

proc print data=sasuser.class noobs;
title 'Data on Women';
title2 link='file_with_url.html' 'Go Back To Summary';
footnote link='Males.html' 'Detail Report for Men';
where sex = 'F';
var name age height;
run;
ods html close;

ods html path='c:\temp' (url=none)
file='Males.html' style=sasweb;
proc print data=sasuser.class noobs;
title 'Data on Men';
title2 link='file_with_url.html' 'Go Back To Summary';
footnote link='Females.html' 'Detail Report for Women';
where sex = 'M';
var name age height;
run;
ods html close;

[/pre]
JerryH
Calcite | Level 5
Cynthia, a comment if it's okay. I have copied your code on two of the threads so far and pasted them first into a SAS program editor. It wouldn't run because the lines were over 960 characters. I then pasted it into Notepad and wrapped and when I brought the notepad file into SAS DSM it was the same result. Do I have to retype all of ti?
Cynthia_sas
SAS Super FREQ
You know, this has happened to me, too. Somehow the Carriage Returns are strange in some text editors. I have had the best luck with cutting and pasting the code from the Forum into Microsoft Word first (where the CR characters always turn out correctly) and then re-cutting and pasting from there into the SAS Editor window (Display Manager). You should not have to retype the code.

At any rate, I have saved it in a file and if cutting and pasting doesn't work for you as described above, then email me at cynthia.zender@sas.com and I will email you the program.

Thanks for the heads-up.
cynthia

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 891 views
  • 0 likes
  • 3 in conversation