Tiger Singh

Tiger Singh

  • NA
  • 61
  • 11.1k

Export into excel with multiple list boxes filter !!

Sep 13 2017 2:52 PM
Hi There,
 
Hope you are doing good !!
 
i am working on one request where i have multiple of listboxes over the form where we can select multiple of values out of each list box. once select the values then click on button and save the output.
 
when i am selecting only single value in single list box then the form is working but when i am selecting mutliple of listboxes with multi values not working.
 
i am doubting in below code. could you pls suggest me what to write for taking multiple filters along with multiple listboxes. i.e. i am expecting "in" condition. i attahced all the docs.
--
string dbQuery = "select * from TBL_ERP_DAILY_INV_BATCH_REPORT Where ";
if (ListValue1 != "" )
{
dbQuery = dbQuery + "type = '"+ ListValue1 +"'";
}
if (ListValue2 != "" )
{
dbQuery = dbQuery + "[SUPPLIER NUM] = '" + ListValue2 + "'";
--- 
 
 

Attachment: Code.zip

Answers (7)