Tuesday, March 9, 2010

Optional Prompt Pages

Based on a query I have received in my previous post from Dave on how to create optional prompt pages I have provided the solution below:

Requirement: To display Product Line / Product Type in report. User would be prompted to select either Product Lie Prompt / Product Type prompt in a prompt page. Based on the selection made, the next prompt page gets displayed showing either Product Line or Product Type prompts. This is a simple but not practical example just to demonstrate optional prompt pages option.

Step 1: Create 3 prompt pages. In Prompt Page 1 include a drop down prompt (with parameter name as, say Prompt Type) with static choices for selecting Product Line / Product Type. Remove the Finish, Back prompt buttons.

Step 2: In Prompt Page 2 include Product Line prompt. Remove Next prompt button.

Step 3: In Prompt Page 3 include Product Type prompt. Remove Next prompt button.

Step 4: Create a conditional string variable with the expression - case when ParamDisplayValue('Prompt Type') = '1' then '1' else '2' end.

Step 5: In Prompt Page 2 apply the conditional variable for the render variable property and set the page to render for 1.

Step 6: Likewise in Prompt Page 3 apply the conditional variable for the render variable property and set the page to render for 2.

Run the report, you will be prompted for prompt type choice. When a prompt type is selected, the corresponding prompt page is displayed.


Anonymous said...

Thanks Zephyr; it was really helpful.

However, it is not working properly for my second prompt. For example, after I select '1' the next prompt is displayed; but when '2' is selected the next page is displayed but with no 'prompt' on it. Can ypou please advise?

Also, I have a 3rd Static Choice which if selected should auto-submit and does not display any prompts.

Thanks in advance.

Cheers, Vaneet

Zephyr said...

Hi Vaneet,

Its difficult to guess the issue without screenshots.

Can you please post this on a forum?