SAS Technical Support has a wonderful how-to guide for using one set of prompt values across multiple sections of a Web Report Studio report. This works great in 4.2, however there is one additional item that I discovered in a 4.3/9.3 install. With the addition of PROC STP and SAS Information Maps using this new proc when calling the stored process, the prompt values in a stored process are not forwarded automatically to the information map or any other mechanism using PROC STP without the use of the OUTPUTPARM option. Since Information Map Studio creates the PROC STP code automatically using the metadata available for the stored process, you must define the output parameter in the prompt/parameter definition area.
For the SetDate parameter definition (step 7), you also need to select the 'New' button in the Output Parameters area at the bottom of the Parameters screen. Then create two output parameters for Year and Month.
- In Step 7 of the original instructions, note that at the bottom of the Parameter page is the button for creating a New Output Parameter.
- Select the New button twice and create two output parameters, one for Month and one for Year.
- The end result is that the bottom of the Parameter page looks like this:
For the GetDate stored process the original instructions said you can skip step 7, but in version 4.3 you will need to define the output parameters just as you did above so that these two values are passed.
You can see the result in the "Prdsale with Year Month Prompt" information map if you select Test, pick the Month Year Filter and choose 'View SQL'. You will then see the following code:
PROC STP program='/Reports/SetDate(StoredProcess)'; outputParam month year; run; |
More detail on how PROC STP works is provided in my 2nd book The 50 Keys to Learning SAS Stored Processes.