ok..here's what i need to be doing...
if {@Ext}="" then
if {@CallType}="ALL" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo})
else if {@CallType}="IDD" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and {dps.desttype}="IDD"
else if {@CallType}="STD" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo})and {dps.desttype}="STD"
else if {@CallType}="LOC" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and {dps.desttype}="LOC"
else if {@CallType}="IDDLOC" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and ({dps.desttype}="IDD" or {dps.desttype}="LOC"

else if {@CallType}="IDDSTD" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and ({dps.desttype}="IDD" or {dps.desttype}="STD"

else
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and ({dps.desttype}="LOC" or {dps.desttype}="STD"
else
if {@CallType}="ALL" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and {dps.Extension}={@Div}
else if {@CallType}="IDD" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and {dps.desttype}="IDD" and {dps.Extension}={@Div}
else if {@CallType}="STD" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo})and {dps.desttype}="STD" and {dps.Extension}={@ext}
else if {@CallType}="LOC" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and {dps.desttype}="LOC" and {dps.divid}={@ext}
else if {@CallType}="IDDLOC" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and ({dps.desttype}="IDD" or {dps.desttype}="LOC"

and {dps.Extension}={@ext}
else if {@CallType}="IDDSTD" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and ({dps.desttype}="IDD" or {dps.desttype}="STD"

and {dps.Extension}={@xt}
else if {@CallType}="STDLOC" then
{dps.calldate}>=cdate({@DateFrom}) and {dps.calldate}<=cdate({@DateTo}) and ({dps.desttype}="LOC" or {dps.desttype}="STD"

and {dps.Extension}={@ext}
this code works ok..but only thing is reads all the records as i said earlier.
in response to -k , i am only using this piece of code
if {?Ext}="ALL" then
{dps.calldate}>={?datefrom} and {dps.calldate}<={? dateto}
else if {?Ext}<>"ALL" then
{dps.calldate}>={?datefrom} and {dps.calldate}<={?dateto}
so that to make sure that it's not my actual selection formula that's causing it to read all the records.so if both formulas are the same it should return and read the same set of records right..! besides i am having a problem of performance here..not the actual results.
ok..now here's the weird part...without using the VB App ..i previewed the report in design time..
i entered ALL for the {?Ext} parameter and a suitable date range , it ended up reading all the records.
then what i did was i deleted the else if part ...then it only read the records it had to. now ...i think u can say that it's not something to do with incorrect paramater values or passing it from an APP.
well is there any other method i can use.