Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with web based parameters. 1

Status
Not open for further replies.

Legion13

Programmer
Aug 31, 2000
27
US
I have a report that I am running from an asp page. I am using input boxes to get text from the user that is passed to the report like so:

set session("ParamCollection") = Session("oRpt").Parameterfields
set Param01 = session("ParamCollection").Item(1)
ParamValue01 = Request.Form("Param01")
Call Param01.SetCurrentValue (CStr(ParamValue01), 12)

Basically I am just taking the parameters example from from the seagate software sample asp pages and modifying it. It works fine for single value parameters, but I need to be able to pass multiple values to a single parameter field that has been set to accept multiple values. Is this possible? Also, are there better examples on web based use of the activex viewer? If so, where can I find them? Thank you in advance!



 
You can access multi form values like this
Code:
Param01_1 = CStr(Request.Form("Param01")(1))
Param01_2 = CStr(Request.Form("Param01")(2))
Param01_3 = CStr(Request.Form("Param01")(3))

Just like
Code:
.SetCurrentValue
there is another method to add additional values to the same parameter... not sure what the name is off the top of my head.

Steven Fowler
info@fowlerconsulting.com
 
Thank you very much for your help! If you happen to recall what it is please let me know. In the mean time, thanks again for your help.
 
This took me two hours to code!
I hope you appreciate it...

Code:
'Pars the form values
aryValues = Split(Request.Form("Parameter"),",")
for intLoop = 0 to Request.Form("Parameter").Count -1
  session("oRPT").Parameterfields.AddCurrentValue cStr(trim(aryValues(intLoop)))
next
Steven Fowler, Principal
steve.fowler@fowlerconsulting.com
- Development, Training, and Consulting
wpe1.gif
 
You will need to reference you param in the report like this

session("oRPT").Parameterfields(1).AddCurrentValue
session("oRPT").Parameterfields(2).AddCurrentValue

etc...

Steven Fowler, Principal
steve.fowler@fowlerconsulting.com
- Development, Training, and Consulting
wpe1.gif
 
Wow. Thank you very much. I certainly do appreciate it! I would have been happy just to know about .addcurrentvalue, but that bit of code was definitely above and beyond. Thank you again, you have been very helpful, and I have voted you tipmaster for sure.

:)
 
Thanks...

Code:
aryValues = Split(Request.Form("Parameter"),",")


is a better way then this:
Code:
Param01_1 = CStr(Request.Form("Param01")(1))
Param01_2 = CStr(Request.Form("Param01")(2))
Param01_3 = CStr(Request.Form("Param01")(3))
Steven Fowler, Principal
steve.fowler@fowlerconsulting.com
- Development, Training, and Consulting
wpe1.gif
 
Yes the loop definitely fits better into what I am doing here, since I don't know exactly how many items they might choose to select. I appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top