Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lily_wibisana
Starting Member
29 Posts |
Posted - 2008-11-11 : 11:16:06
|
Hi, I am having problem with my dataset.When I typed this dataset below it was right. ="SELECT e.SubB, s.CHSubName, p.PrincNo, p.PrincNameE, e.UPC, prd.ProdDescE, e.NewDate, e.ConfDate, e.ChgDate " &"FROM BElig AS e INNER JOIN BProduct AS prd ON e.UPC = prd.UPC INNER JOIN " &"BPrinc AS p ON prd.PrincNo = p.PrincNo INNER JOIN BCustHSub AS s ON e.SubB = s.CHSubCode " &IIF (ISNOTHING (Parameters!Banner.value), "Where e.ActionCode <> 'D'", "WHERE e.SubB = '" &Parameters!Banner.Value & "' AND e.ActionCode <> 'D'")But How do I change it to become multi parameters.I changed my dataset like this.="SELECT e.SubB, s.CHSubName, p.PrincNo, p.PrincNameE, e.UPC, prd.ProdDescE, e.NewDate, e.ConfDate, e.ChgDate " &"FROM BElig AS e INNER JOIN BProduct AS prd ON e.UPC = prd.UPC INNER JOIN " &"BPrinc AS p ON prd.PrincNo = p.PrincNo INNER JOIN BCustHSub AS s ON e.SubB = s.CHSubCode " &IIF (ISNOTHING (Parameters!Banner.value), "Where e.ActionCode <> 'D'", "WHERE e.SubB IN (' " &Parameters!Banner.Value & ") ' AND e.ActionCode <> 'D'")But when I ran the report I got error .Can't set a command text for dataset "MYDATA"Error during processing of command text expression of dataset "MYDATA"Please Help. Thanks. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-12 : 12:20:51
|
try like this="SELECT e.SubB, s.CHSubName, p.PrincNo, p.PrincNameE, e.UPC, prd.ProdDescE, e.NewDate, e.ConfDate, e.ChgDate " &"FROM BElig AS e INNER JOIN BProduct AS prd ON e.UPC = prd.UPC INNER JOIN " &"BPrinc AS p ON prd.PrincNo = p.PrincNo INNER JOIN BCustHSub AS s ON e.SubB = s.CHSubCode " &IIF (ISNOTHING (Parameters!Banner.value), "Where e.ActionCode <> 'D'", "WHERE ',' + " &Parameters!Banner.Value & " + ',' LIKE '%,'+ e.SubB + ',%' AND e.ActionCode <> 'D'") |
|
|
|
|
|
|
|