BookmarkSubscribeRSS Feed
DanieleTiles
Calcite | Level 5
Hi to all,
I've got this problem: I've got a proc template which renders an XHTML page, and through a proc tabulate I get the correspondent XHTML page.
However, I should be able to add before the table (in an header I've made within the proc template) an URL to a web page, depending on the SAS code I'm generating (luckily, this isn't generated into the proc tabulate).
I've no idea how to do it...any idea?
Thanks!

Daniele
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
Looking at some of these Tech Support notes might give you an idea.

I'm a bit confused by what TYPE of template you're using with PROC TABULATE. I assume you mean a STYLE template or a TAGSET template because PROC TABULATE does not have a TABLE template.

If you are trying to build your link in a STYLE template, then I do not believe you can build a dynamic link. If you are trying to build your link in a TAGSET template, then you probably can build a dynamic link by saving variable values to temporary variables when you're processing a variable's event and then when you get to the header, you can build the link. Just remember, however, that generally, the header is built before the rows for the variable values, so you may have to do something special to get the values you want into your headers.

At any rate, here are the links to the notes:
http://support.sas.com/kb/23/328.html
http://support.sas.com/kb/23/328.html
http://support.sas.com/kb/23/398.html (look at the trigger hyperlink event in this tagset example)

If you find that you need help with a TAGSET template, then you might consider contacting Tech Support, as they have the most experience generating TAGSET templates.

cynthia
DanieleTiles
Calcite | Level 5
Hi Cynthia,
thank you for your kind answer. Actually, I'm using an ods markup (yes, in the proc template I'm defining the tagsets for the xhtml). The proc template is a variant of the one proposed on the SAS site for XHTML (as we had already discussed about table and ids) and for rendering the pages with some standard static elements for my client.

I'll read your notes, and see if I'll find how to get this task done 🙂
Thanks again

Daniele
DanieleTiles
Calcite | Level 5
Hi Cynthia,
unfortunately the examples aren't so clear to me...especially I don't understand how to define the variables that should contain the values.
Let me explain: I should be able to make a page with:
-- at first 2 links, to different locations, which should be based on the code I run with sas...so I should be able to say the url and the text of the link
-- under that, the table obtained from the proc tabulate.
How can I differentiate between the two links? Should I make two triggers different?
And how do I pass the values (i was hoping to just make a data _null_ with the correct put, or maybe using a macro variable...)
In the second example, I haven't got clear the difference of what happens when I de-comment the commented code...
Thanks!

Daniele
DanieleTiles
Calcite | Level 5
Hi,
I've found a solution that suites perfectly my needs :).
The idea is to use some macro variables in order to pass the data.
In the PROC TEMPLATE, I define in the event where I should generate the links a couple of mvars (one for the url, one for the text), and in the sas code which calls the ods markup, just before that, I define the values for the macro variables.
What has been a bit hard to understand is that the PROC TEMPLATE uses mvar instead of %let, and at first I thought it wasn't possible to define it everywhere.
Anyway, solved! 🙂 😄

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 886 views
  • 0 likes
  • 2 in conversation