please help me

i need to change All the subreport selection formula , same as the main report. I Try this code but doesn't works.


'sel is string which the selection formula
Cr.SubreportToChange = ""
Cr.SelectionFormula = Sel
iSub = Cr.GetNSubreports
If iSub > 0 Then
For iCtr = 0 To iSub - 1
StrSub = Cr.GetNthSubreportName(iCtr)
Cr.SubreportToChange = StrSub
Cr.SelectionFormula = Sel
Next iCtr
End If

that code is working only if there is only one table in a main or subreport. that doesn't work in more table !

please help me , how to do this ?

thanks very much