During design time, I do this:

In my CrystalReport1.rpt, I right click on the detail section, I select "Select Expert" then I choose New tab, then dropdown(left),I choose "equal to"(right), I type "Programmer"

I try this code to do it in Run time: (I don't know if I am right)

Dim rpt As CrystalDecisions.CrystalReports.Engine.ReportDocument
rpt = New CrystalReport1
rpt.DataDefinition.RecordSelectionFormula = "Select * employee where empposition='"& "Programmer" & "'"'


But this code doesnt work, Kindly correct this for me.