Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
hi iam using crytal report if not select employee id show all record...

i will write this code

SQL
cryRpt.ParameterFields("@pStartDateTime").CurrentValues.AddValue(DateFrom.Value())
            cryRpt.ParameterFields("@pEndDateTime").CurrentValues.AddValue(DateTo.Value())
            cryRpt.ParameterFields("@pUserID").CurrentValues.AddValue(EmployeeID.SelectedItem.ToString())



how to write null value of EmployeeID
Posted
Comments
akhil.krish 2-Jun-14 4:48am    
DamithSL Thanks for reply and solution....

1 solution

VB
If EmployeeID.SelectedItem IsNot Nothing Then
    cryRpt.ParameterFields("@pUserID").CurrentValues.AddValue(EmployeeID.SelectedItem.ToString())
Else
    cryRpt.ParameterFields("@pUserID").CurrentValues.AddValue(Nothing)
End If
 
Share this answer
 
v2
Comments
akhil.krish 2-Jun-14 5:14am    
damith sl
checkbox also same code?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900