Groups | Blog | Home
all groups > sql server reporting services > august 2005 >

sql server reporting services : Ability to Manually Enter a Parameter in a Queried Parameter


BillD
8/22/2005 8:49:09 PM
I have a queried parameter getting it's parameters from its own dataset.
Works great. Now they want to have the ability to enter their own if they
know what value they want rather than scrolling through the list.

Any ideas on how to go about this?

Thanks
BillD
8/23/2005 5:31:04 PM
Anybody?

[quoted text, click to view]
Chris Baldwin
8/24/2005 6:31:36 AM
[quoted text, click to view]

Hello BillD,

I'm not sure there's a way to do this when rendering through Report Manager.
If there is I'd love to hear about it. But, I know you could easily create
a custom webform that accomplishes this goal.

For example, you can use JavaScript to determine whether the text box has
been typed into and adjust the form action that requests the report accordingly.
Here's a snippet that I used in one of my apps that might help:

<script>
function process()
{
var actionBase = "http://localhost/reportserver/myreport?rs:Command=Render&ParamVal=";
var theForm = document.getElementById("myForm");
var txtBox = document.getElementById("myBox");
var selectBox = document.getElementById("mySelect");

// If the textbox is empty, use the select box value
if(txtBox.value == "")
theForm.action = actionBase + selectBox.value;
else
// otherwise, use the text box value
theForm.action = actionBase + txtBox.value;

theForm.submit();
}
</script>

<form method="get" id="myForm">
<select id="mySelect">
<!-- would be populated from database -->
<option>Val1</option>
<option>Val2</option>
<option>Val3</option>
</select>
<input id="myBox" type="textbox">
<input type="button" value="Submit" onClick="process();">
</form>

-chris

BillD
8/24/2005 8:26:02 AM
Chris,

Thank You for taking the time to reply. Looks like I'll be getting into some
ASP as I also like to have a calendar for date parameters....

[quoted text, click to view]
AddThis Social Bookmark Button