Hi,
I am using the following Java Script to make the dynamic default selection in Value Prompt, when i run the report a warning message in Internet Explorer pop us saying 'ONE OR MORE OF THE REQUIRED VALUES IS MISSING. REQUIRED VALUES ARE NEEDED TO PRODUCE THE REPORT' with the option OK, once OK button is clicked, the default selection is made as expected.
Is there any way to get rid of the warning pop up message? All your replies are appreciated. Thanks
1. Add an HTML item to the left and right of the value prompt in the Report Studio
2. For the first HTML item (left) add '<span id = "A1">'
3. For the second HTML item (right) add '</span>'
4. Add an HTML item at the bottom of the prompt page next to "Run" button
5. Add the following script for the third HTML item:
<script type="text/javascript">
var theSpan = document.getElementById("A1");
var theSelect = theSpan.getElementsByTagName("select");
theSelect[0].options[2].selected=true; //This will make default value in prompt to be the first item after line, change the value '2' for other item
canSubmitPrompt();
</script>
6. The value "A1" can be anything you like. Run the Report.
remove canSubmitPrompt(); from your script
Thanks a lot, Gopinath! It works :) cheers
Alternatively, if all your prompts have default choices and/or are not required prompts, then if you set them to not required then too the error message should go away even if you keep the cansubmitprompt control