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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Text of a dropdownlist item

Status
Not open for further replies.

nareshreporter

Programmer
Mar 3, 2005
13
0
0
US
Hi,
I am new to Crystal Enterprise and ASP and i am trying to debug a .csp code. Crystal enterprise version is 10. How can i display the "text" of a dropdownlist item instead of the "value"
this is my dropdownlist
<select class=' test'size='1' name="d2">
<option value="1" selected >One<option value="2">Two<option value="3">Three</select>

So in acutal code, it is displaying 1 in the listbox instead of One.

and the code segment that adds the value to listbox is below

Set cValue = reportInterface.ReportParameters.CurrentValues
Response.Write("<option name='cp' value='1'>");
var dStr = cValue.Item(1).MakeDisplayString();
Response.Write(Server.HTMLEncode(dStr));
------------------------------------------

the variable dStr contains value of the DDL item.

is there anything like cValue.Item(1).Text for displaying the text.
I appreciate if anyone can help me out.
Thanks in advance


 
So in acutal code, it is displaying 1 in the listbox instead of One.
When I create this in html, the list box displays "One", "Two", and "Three".

I would try cValue.Item(1).Name. If that doesn't work, look through rptschedule.csp and see how the Crystal folk handled this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top