Hi All,
In my report I can get if the user select specific region or All Regions
so I guess in the existing SQL shown below if the Region is Null its also pulled but if the Region has spaces '' its not handling any appreciate any help . I've tried using following lines but doesn't work
OR SIT.CustomerDivision = CASE WHEN SIT.CustomerDivision =''then '1' ELSE SIT.CustomerDivision END
AND (@Region IS NULL
OR SIT.CustomerDivision IN (SELECT Data FROM dbo.Split(@Region,','))
)
The @Region values if the user selected using 'All RegionList' through form parameter its using folloiwng SQL
--DECLARE @ALLREGIONList varchar(max)
SELECT @ALLREGIONList = COALESCE(@ALLREGIONList + ', ', '') +
CAST(tlkpRegion.RegionName AS varchar(5))
FROM tlkpRegion
SELECT @ALLREGIONList as ALLREGIONList
appreciate your help
Else If ALLKAMSREGIONSRadioButton.Checked = True Then
Dim KAMDescString As String = ""
Dim KTitle As String = ""
Dim ik As Integer
KAMDescString = ALLKAMSListBox.SelectedItems(ik)
Report.SetParameterValue("KAMsByte", KAMDescString)
KTitle = "ALL KAMs: "
Report.SetParameterValue("KTitle", KTitle)
Dim RegionDescString As String = ""
Dim RTitle As String = ""
Dim ir As Integer
RegionDescString = ALLREGIONSListBox.SelectedItems(ir)
Report.SetParameterValue("Region", RegionDescString)
MsgBox(RegionDescString)
RTitle = "ALL REGIONs: "
Report.SetParameterValue("RTitle", RTitle)
end if[quote="imfarhan, post:1, topic:12191, full:true"]
appreciate your help