BookmarkSubscribeRSS Feed
Thao
Calcite | Level 5
Does anyone know anyway I can insert a dynamic summary text box into html output file which include several tables (from proc print)?

I am using ODS Html to export the output at the moment.

Thanks in advance.
5 REPLIES 5
JuanS_OCS
Azurite | Level 17

You have several options ( a very simple one is to use an iframe that will contain your html file created by ODS).

Or best options as ActiveX, javascript, AJAX, etc can make of it a very beautiful product of yours. Also a bit more complex, but not too much.

 

This is a question really related to Web developing, therefore:

If you have any kind of web developer at your place, I would strongly recommend you to contact them, they can make the life really easy to you, as you won't need to invent the wheel again 😉

JuanS_OCS
Azurite | Level 17

In any case, I would recommend you to move this topic to the ODS group of topics. Probably you will reach the most suitable public for your question

Ksharp
Super User

I am not sure I understand totally your requirement.

 

ods graphics/height=1cm width=2cm;
proc sgplot data=sashelp.class noborder;
scatter x=weight y=height/ markerattrs=(size=0);
inset ("sum"="32" "n"="200") / noborder textattrs=(weight=bold size=20 );
xaxis display=none;
yaxis display=none;
run;
proc print data=sashelp.class;run;

x.png

Thao
Calcite | Level 5

Thank you for your answer.

 

It is quite close to what I want.

 

In your example, instead of hard-code "32" and "200", I want it to be calculated automatically by using the table.

Example:

Max Age is ... from person name ....

I want "..." conducted by codes because I am making a macro and the user will input detail.

 

I think macro variable would help, however these macro variables  are created in file while I need them as global ones in order to put it in to summary text box.

Ksharp
Super User

Yes. you need generate macro variable for these. But that is another question.

 

For the golbal macro variable, you can assign  local macro variable value to golbal  Like:

 

 

%global x ;

 

%yourmacro;

%local y;

.........

%let x=&y;

%mend;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1566 views
  • 0 likes
  • 3 in conversation