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?
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.
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
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...
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.