Here is the situation…
Let’s say I’ve built a report for our bike distributor, crazybikes.com, for users to learn how much specific customers have spent on each product class (Bicycles, Accessories, Athletic Wear, etc) at this point in the month.
My selection of records is based on the Customer Number, the Month-to-Date (MTD) Sales Dollars, and the Product Class. At runtime, I want the user to input the Customer Number and an amount for MTD Sales Dollars. But for the Product Class, I want it to be hard-coded in the selection criteria as either 100 (bicycles) or 200 (accessories).
In order to get the correct information in the report I’ll need to repeat the selection for the Customer Number and Month to Date Sales for each Product Class I want. So, the logic of my selection criteria would be the following:
…which would result in the following the report prompt page:
As you can see, the user will then be forced to enter the selections for Customer Number and MTD Sales Dollars multiple times, even though the values will be the same. This might be tedious to the user and it may also confuse them. So, I suggest making a few minor changes in the HTML of the report prompt page (Rxxxxxs.html) to avoid this problem. Where I’ll hide the duplicate prompts, but also pass the values entered from the previous prompts for Customer Number and MTD Sales Dollars to them.
</head> tag, which is towards the top of the HTML page.
Change the below line to include onSubmit=”getvalue();”
<form action="DATADICTIONARY.R12050s" method="post" name="FORM_R12050">
<form onsubmit="getvalue();" action="DATADICTIONARY.R12050s" method="post" name="FORM_R12050">
In this step, you need to hide the duplicate selection prompts from the page but still make them available to accept the values being passed. This can be easily done through the WYSIWYG m-Painter by right clicking on the appropriate rows to hide and select “Hide Row”.
And that’s it! When you run your report the prompt page will look like this: