CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 multi Select - am I miaaing something?

Print topic Send  topic

Author Message
hbycer

Posts: 24
Posted: 04/20/2004, 10:16 AM

I am trying to use a multiselect listbox in the search area of my form to construct the appropriate WHERE clause of the SELECT statement which is the datasource for the datagrid on the same form.

In following the MultiSelect Search example located in the example pack I have:
1) checked the MultiSelect option property of the Listbox
2) Changed the work 'LIKE' to 'IN' on the appropriate where condition
3) Set the Default Value to "0" in the SQL Parameters. FYI, my list box contains text values and is bound to text values
4) Modified the HTML by removing the options tag as described in the example pack - MultiSelect Example.

What confuses me the most is the following...I have added a TextArea on the form and have defined a BeforeShow Event for the TextArea. At this event, I retrieve the value of my s_Departments multiselect listbox. No matter how many departments I select from the list, only the first item selected is displayed in the TextArea. I would expect to see ALL of the departments selected from the multiselect listbox seperated by a comma.

Any thoughts?

Thanks Again,

Howard
View profile  Send private message
hbycer

Posts: 24
Posted: 04/20/2004, 12:31 PM

Update...I have rechecked my work and have fixed my IN/OR clause on the WHERE statement.per item 3 above. I feel all of my work is as described in the example Pack and am still having problems. The only difference is that now, both the DataGrid and TextArea displays the information regarding the last item I selected from the list box (as opposed to the first...see above). Again, I would expect to see all items selected seperated by a comma in the TextArea. Of course, I would expect to see all data items from Departments chosen from list box s_Departments.

Howard .
View profile  Send private message
peterr


Posts: 5971
Posted: 04/20/2004, 1:40 PM

Howard,
I am probably more confused than you are...:-/
What type of functionaluity are you implementing? Are you trying to display multiple results in the Grid as our example shows?
Or display something in TextArea, in which case I am not familiar with any such examples, but I don't understand why you would modify the SQL and use IN statement for this. I think that one approach is OK: either show multiple results in the Grid, or show multiple values in a TextBox, but logicaly I cannot grasp the idea of mixing the two.
It may be just me. But it could be better though if you described the functionality and purpose of the page.
On another hand, the exact SQL and code that you used could also reveal some details (though then should be posted to the appropriate language-specific forum).
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
hbycer

Posts: 24
Posted: 04/21/2004, 5:44 AM

Peter,

The functionality we are trying to implement is to display multiple results in the DataGrid as the Example Pack shows. After hours of frustration and checking our work, the results were the same. Only the items from the first item selected from the multiselect listbox were returned, The TextArea was setup for informational purposes only.

When utilizing BeforeShow/RetrieveValueForControl (TextArea/URL/s_Departments), only the first value selected from the multiselect listbox, s_Departments, is displayed in TextArea, no matter how many departments are selected. I would expect to see ALL of the departments selected from the multiselect listbox seperated by a comma to be displayed.

Even though the application does not call to display the value of the items selected from the s_Departments multiselect listbox, it was added in order to help resolve a problem. Question....Should the TextArea have displayed all of the items selected from the multiselect listbox seperated by a comma? . .

Thanks,

Howard
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.