Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Stored process in Visual analytics

Accepted Solution Solved
Reply
Contributor
Posts: 20
Accepted Solution

Stored process in Visual analytics

Hello,

 

I am trying to create a report with 3 tabs,each having 3 different stored process and their prompt. But when i am opening the report,all the SP runs on its own showing output and no choice to select prompt again. if i am making report prompt compulasry, all the three report's prompt pops up while opening the report, together, creating chaos.Is there any way so that prompt for relative SP opens only when i switch to the respective tab of report?

 

Thanks in advance.

 


Accepted Solutions
Solution
‎08-24-2016 02:09 AM
SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

Hi @gauravp1993,

 

VA will always execute the stored process when the report opens, is refreshed, or after you change its prompt values. If you want to see a blank page by default, you must design you stored process to return an html output with no content by default.

 

Best,

Renato

View solution in original post


All Replies
SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

Hi @gauravp1993,

 

Are you viewing the report in the Flash-based Viewer (mode=classic)? This viewer mode allows for changing Stored Process prompts by clicking on the question mark icon that shows up when the stored process object border is selected.

STP Prompt

Best,

Renato

Contributor
Posts: 20

Re: Stored process in Visual analytics

thank you @Renato_sas 

 

I am not pretty much sure about which mode it is in, but i do see this question mark which helps me to reselect prompt for SP.

 

But when i try to open my report in VA, it automatically shows popup to select prompt for SP, while i want it to be initially blank and then when i click question mark,popup must come.

 

Is there any way to do so?

SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

If you see the question mark icon, you must be running in the classic mode.

 

If your stored process has parameters that are flagged as required, you must provide those default parameter values in the stored process object Properties tab. This is what guarantees the stored process has the parameters it needs to execute, otherwise the stored process will throw an error. I have never seen a stored process in VA that prompts for its paramters by poping up its prompt interface automatically. Maybe I'm misundertanding what you are saying.

 

Is is possible to send some screenshots?

 

Thanks,

Renato

Contributor
Posts: 20

Re: Stored process in Visual analytics

 


Renato_sas wrote:

If you see the question mark icon, you must be running in the classic mode.

 

If your stored process has parameters that are flagged as required, you must provide those default parameter values in the stored process object Properties tab. This is what guarantees the stored process has the parameters it needs to execute, otherwise the stored process will throw an error. I have never seen a stored process in VA that prompts for its paramters by poping up its prompt interface automatically. Maybe I'm misundertanding what you are saying.

 

Is is possible to send some screenshots?

 

Thanks,

Renato

 


Yes, i have made one of my prompt for select as compulsary, but along with this i haven't set any default value for that compulsary selection. thus instead of throwing error,it automatically prompt me for selection to be done when VA reoprt is opened in viewer mode and data to be provided so that SP works and give the required output.

 

Thanks,

Gaurav

SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

Just to clarify, does it mean that if you provide a default value for your stored process parameters in VA it solves the problem?

 

Thanks,

Renato

Contributor
Posts: 20

Re: Stored process in Visual analytics

No,then it autoexecutes SP and give output, while i want blank page after opening report.after this blank page i need to click question mark to select prompt.
Solution
‎08-24-2016 02:09 AM
SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

Hi @gauravp1993,

 

VA will always execute the stored process when the report opens, is refreshed, or after you change its prompt values. If you want to see a blank page by default, you must design you stored process to return an html output with no content by default.

 

Best,

Renato

Contributor
Posts: 20

Re: Stored process in Visual analytics


Renato_sas wrote:

Hi @gauravp1993,

 

Are you viewing the report in the Flash-based Viewer (mode=classic)? This viewer mode allows for changing Stored Process prompts by clicking on the question mark icon that shows up when the stored process object border is selected.

STP Prompt

Best,

Renato


Hello,

I am getting this for refreshing prompts. is it possible to make it permanently available as it gets hidden while switching reports tab.

SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

Hi @gauravp1993,

 

This is the default prompt interface behavior. If you want, you can implement your own prompt interface (as a HTML form for example) that is part of your stored process output. In other words, your stored process would have to programatically create the HTML form with the prompts needed and stream it back to the calling application as part of the stored process logic. Streaming is accomplished by writing to _WEBOUT. It would be something like this:

 

%global param_1;
%global param_N;
      
ods listing close;
ods html body=_webout;

* code that streams HTML form here;

* code that creates visual output based on parameters here (SAS procs, etc.);

ods html close;

 

Here is an example of what the code that streams HTML form could be. Observe that is contains a submit button that re-executes the stored process with the selected parameter:

data _null_;
  format infile $char512.;
  input;
  infile = resolve(_infile_);
  file _webout;
  put infile;
cards4;
<FORM ACTION="&_URL" METHOD="post">
<INPUT TYPE="HIDDEN" NAME="_program" VALUE="&_PROGRAM" /> 

<b>Select a region:</b>  <SELECT NAME="param_1">
<OPTION VALUE="Africa">Africa
<OPTION VALUE="Asia">Asia
<OPTION VALUE="Central America/Caribbean">Central America/Caribbean
<OPTION VALUE="Eastern Europe">Eastern Europe
<OPTION VALUE="Middle East">Middle East
<OPTION VALUE="Pacific">Pacific
<OPTION VALUE="South America">South America
<OPTION VALUE="United States">United States
<OPTION VALUE="Western Europe">Western Europe
</SELECT>

<HR>
<INPUT TYPE="SUBMIT" VALUE="Execute">

</FORM> 
;;;;
run;

 

The values displayed in the select tag above could have been dinamically defined, based on your data (you are running a datastep).

 

You can (or maybe should) add logic to make sure the default prompt values displayed in your HTML form are set according to the stored process parameter values (macro variables &param_1, etc. in the example above).

 

I hope it helps.

 

Best,

Renato

New Contributor
Posts: 4

Re: Stored process in Visual analytics

Interesting article. I'm doing something similar like creating custom calendars using stored process webout. Once its used as a prompt in VA can i set interactions with custom calendar and list / crosstab

SAS Super FREQ
Posts: 70

Re: Stored process in Visual analytics

Hi,

 

Because stored processes are based on custom code and could do a multitude of different things, without necessarily producing any visual content, they cannot be used in interactions in VA reports.

 

Best,

Renato

Post a Question
Discussion Stats
  • 11 replies
  • 1203 views
  • 2 likes
  • 3 in conversation