BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gauravp1993
Obsidian | Level 7

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Renato_sas
SAS Employee

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

11 REPLIES 11
Renato_sas
SAS Employee

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

gauravp1993
Obsidian | Level 7

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?

Renato_sas
SAS Employee

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

gauravp1993
Obsidian | Level 7

 


@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

Renato_sas
SAS Employee

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

gauravp1993
Obsidian | Level 7
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.
Renato_sas
SAS Employee

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

gauravp1993
Obsidian | Level 7

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

Renato_sas
SAS Employee

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

Sac2001
Calcite | Level 5

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

Renato_sas
SAS Employee

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 4288 views
  • 2 likes
  • 3 in conversation