Your SAS programs, embedded in web apps and elsewhere

Stored Process that Checks the MS App that it was initiated from

Reply
N/A
Posts: 0

Stored Process that Checks the MS App that it was initiated from

I'd like to extend a stored process that does some tables and graphs...it is currently being called through the SAS Portal or EG. I would like to use the AMO to lauch it from within Word, Excel, or PowerPoint and return output tailored to that app (i.e. different ODS statements, templates,drivers, etc.).

So in the stored process I want to test what app intiated the stored process ?

TIA

- Matthew
SAS Super FREQ
Posts: 8,862

Re: Stored Process that Checks the MS App that it was initiated from

Posted in reply to deleted_user
Hi:
Currently, in the list of available reserved macro variables, there is NO way to test the client app that is requesting a SP to execute.
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html

Workarounds I have used are to have the user select a specific destination or app choice as one of their parameters...and then test that parameter and change _ODSDEST accordingly.

The issue with changing _ODSDEST however, is that, no matter what you do, PowerPoint will ONLY accept/receive/render SASReport XML output -- so a lot of your ODS syntax will NOT work for PowerPoint. And, if you changed _ODSDEST to HTML for PowerPoint, the results are changed to SASReport anyway -- or you will get an error message if you use HTML ODS options for SASReport in PowerPoint.

For Word or Excel, you can also instruct the user to use Options to set the kind of stored process results they want. And, if you use the ACTXIMG driver for all the client apps, you might be able to eliminate making a graph driver choice.

Also, if you are returning results to Word or Excel, the only ODS destinations that those 2 have in common are SASReport XML and HTML-based. Word also accepts RTF output and Excel also accepts CSV -- but for the most common report output that can be affected by STYLE templates in Word and Excel, your best bet is sticking with ODS HTML3 or ODS MSOFFICE2K as the destination.

Depending on the different customizations you want to do for the different client apps, you may want to consider contacting SAS Technical Support for more help on this topic.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 168 views
  • 0 likes
  • 2 in conversation