BookmarkSubscribeRSS Feed
Soha
Calcite | Level 5
Hi,

I am using ODS HTML along with PROC GCHART to get my results. I need to add the Print and Back buttons at the bottom of the results. I searched the forum and found that using PROC TEMPLATE we will be able to add Buttons to our ODS output but those outputs are tabular outputs ( like output from proc print which basically shows table) and the style statement used there ("Style table from output / ...") can be used only when my output is table. Is there a similar statement for Chart output? If not, how else could this be done? I know we can use "link" with footnote statement to go back and forth but how can we get the print functionality done?

Any help would be highly appreciated. Thanks!

Sohail
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
I'm just curious -- is something wrong with the PRINT and BACK buttons in the browser that will open the HTML file??

cynthia
Soha
Calcite | Level 5
Cynthia,

No, they work fine.

But I was curious to know if what we can do for tabular output can we do it for chart output too, and also for consistency purposes. We are showing the buttons for tabular results so would like to have such buttons for graphical results too ( the graphical results donot correspond to tabular results, they are results from two different analysis, but complement each other)

Thanks
Sohail
Cynthia_sas
SAS Super FREQ
Hi:
You can still use the style template techniques to put a PRINT and BACK button into the HTML file. For example instead of attaching the button to the TABLE style element you could attach the button to the BODY style element or the SystemTitle or SystemFooter style element. You can put the SAS TITLE and SAS FOOTNOTE outside of the graph area using the NOGTITLE, NOGFOOTNOTE options of ODS HTML. Then, with the TITLE or FOOTNOTE outside of the graph image, the style template would impact the title and/or footnote.

cynthia

[pre]
** SystemFooter is the style element that controls the FOOTNOTE statement text;
proc template;
define style styles.back_butn;
parent=styles.sasweb;
class SystemFooter /
posthtml='<div align="center"><input type="button" value="Open SAS"
onclick=javascript:window.open("http://www.sas.com")>
<input type="button" value="BACK"
onclick="history.back()"></div>' ;
end;
run;

ods listing close;
ods html path='c:\temp' (url=none)
gpath='c:\temp' (url=none)
file='use_back3.html' style=styles.back_butn
nogtitle nogfootnote;

** your code (with a footnote statement);
ods html close;
[/pre]

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 816 views
  • 0 likes
  • 2 in conversation