Hi:
This technique to add a button to ODS HTML output is a technique that generally works in SAS/ODS outside the context of the Enterprise Intelligence Platform.
Whether it will work -inside- the Enterprise Intelligence Platform as part of stored process results depends on 1) what client application you are using to execute or request the stored process application to run; 2) whether the client application knows what to do with the JavaScript button and the onclick, etc and 3) (related to 2) whether the client application can even handle HTML results, including an HTML <input> tag. For example, Microsoft PowerPoint does not receive HTML results from a stored process. The only kind of output that PowerPoint can receive is SASReport XML format. Microsoft Word can receive HTML results, but I do not know whether Word would handle JavaScript or a button.
This technique might work if you were going to use the SAS Information Delivery Portal or the Stored Process Web Application or a custom front end to deliver HTML results from a stored process. However, in addition to needing answers to the above questions, someone needs to actually see the place in your code where the error message is getting issued.
The people best suited to help you with this error message and with the development of this stored process are the people in SAS Tech Support.
Hi:
I expected this to work using the Stored Process Web Application. But, when I tried your stored process using the Stored Process Web Application, I got this error message in the log:
[pre]
14 + style table from output / WARNING: Truncated record.
[/pre]
which indicates to me that your posthtml string is too long. And your style template never got put into the WORK location because of the error.
One trick I frequently use with long text strings is to let the macro processor assemble them (even if I can't send the whole long string to the compiler in open code, the macro processor can pass quite long "assembled" strings to the SAS compiler):
[pre]
This stored process worked for me using the Stored Process Web Application. Note how I changed all the double quotes in the strings to single quotes. Most versions of HTML will accept single quotes for tag attributes, even though the W3C recommends double quotes. This simplifies the code for me and means that I don't have to use macro quoting functions to protect the double quotes in the POSTHTML attribute. Note also that I did NOT put the proc template inside the %STPBEGIN/%STPEND "sandwich" -- since the proc template is not producing any streaming results, it can be before %STPBEGIN.
If you need more help with your JavaScript or with using (or NOT using) cascading style sheets, you should contact Tech Support.
cynthia
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.