![]() | ![]() | ![]() |
General prefilters in information maps can be used to prescreen and subset relational data before any other filters are applied. General prefilters also cannot be removed from the information map by the report author. By design, a general prefilter cannot be a prompted filter. However, sometimes you might want to allow users to pick their own value to use for the required subsetting. For example, you might want to allow users to subset based on a date.
This sample explains how to assign a prompted filter as a general prefilter. Specifically, it explains how to create an information map based on the SASHELP.CLASS table, and then create a prompted filter for Name that will be assigned as a general prefilter.
This sample was written using SAS Information Map Studio with the third maintenance release for SAS® 9.2 (TS2M3).
To follow along, you must register the SASHELP.CLASS table in metadata. For information about registering SAS libraries and tables, see Establishing Connectivity to a Library of SAS Data Sets.

Figure 1. Initial settings for the Name filter.
Note: You must create the prompt from the New Filter dialog box. You cannot use the Manage Prompts interface to create the prompt.

Figure 2. Remember the name of the prompt. You will use it later.
Note: If you create a dynamic prompt, then you must select the option to Specify a data source.

Figure 3. Prompts populated by a dynamic list cannot use the current information map to provide the values.
Before the filter can be added as a general prefilter, it must be modified to temporarily remove the prompt.

Figure 4. The prompt has temporarily been replaced by a simple string expression.
Select Edit ► Properties ► Information Map . Click the General Prefilters tab, and move the Name Filter to the Class table in the Selected filters box. Click OK.
<<root.Name Prompt>> as shown in Figure 5, and then click OK. A warning message appears. Click OK to close it. 
Figure 5. The expression now references the prompt that you created previously.
Select Tools ► Run a Test Query. Select all of the data items for the test, but do not select the Name Filter. Click Run Test. The prompt should display even though you did not select it. This means that the prompted filter has been successfully assigned as a general prefilter. You can now use the information map in applications such as SAS® Web Report Studio.
For more information about SAS Information Map Studio, see the SAS Information Map Studio documentation page.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
| Type: | Sample |
| Date Modified: | 2011-12-09 14:32:24 |
| Date Created: | 2011-12-08 14:32:08 |
| Product Family | Product | Host | Product Release | SAS Release | ||
| Starting | Ending | Starting | Ending | |||
| SAS System | SAS Information Map Studio | Microsoft® Windows® for 64-Bit Itanium-based Systems | 4.2_M2 | 9.2 TS2M3 | ||
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows XP 64-bit Edition | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2003 Datacenter Edition | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2003 Enterprise Edition | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2003 Standard Edition | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2003 for x64 | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2008 | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows Server 2008 for x64 | 4.2_M2 | 9.2 TS2M3 | ||||
| Microsoft Windows XP Professional | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Enterprise 32 bit | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Enterprise x64 | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Home Premium 32 bit | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Home Premium x64 | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Professional 32 bit | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Professional x64 | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Ultimate 32 bit | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows 7 Ultimate x64 | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows Vista | 4.2_M2 | 9.2 TS2M3 | ||||
| Windows Vista for x64 | 4.2_M2 | 9.2 TS2M3 | ||||




