I have a very strange thing occurring on my report. I have a parameter formula that is supposed to allow you to choose what you want to sort by:
if {?Sort}='N' then
{udDriverDatabase.FullName}
else
if {?Sort}='D' then
{udDriverDatabase.DriverStatus}
else
if {?Sort}='L' then
ToText({udDriverDatabase.LicExpDate},"yyyy-MM-dd")
else
if {?Sort}='P' then
ToText({HRRM.PhysExpireDate},"yyyy-MM-dd")
else
if {?Sort}='R' then
ToText({udDriverDatabase.HRRef},"######")
else
if {?Sort}='J' then
{%Job}
else
''
Here is my select statement:
(if {?Job}<> ' ' then {HRRM.udJobLocation} = {?Job} else 1=1) and
(if {?Include Inactive} = "N" then
{HRRM.ActiveYN} = "Y"
Else 1=1) and
(IF {?Company} <> '' then
(if ","+Totext({HRRM.HRCo},0,'')+"," in ","+{?Company}+","
then 1=1 else 0=1)
Else
1=1) and
(if {?Department}<> ' ' then {HRRM.udGLDepartment1} = {?Department} else 1=1)
When I run the report by some of the sort groups it narrows down my results versus sorting the data. For example if I sort by "D" for Driver Status I get 4 records when I sort by "N" for full name I get 44 pages of results. Why is my sort formula filtering down my report results?
if {?Sort}='N' then
{udDriverDatabase.FullName}
else
if {?Sort}='D' then
{udDriverDatabase.DriverStatus}
else
if {?Sort}='L' then
ToText({udDriverDatabase.LicExpDate},"yyyy-MM-dd")
else
if {?Sort}='P' then
ToText({HRRM.PhysExpireDate},"yyyy-MM-dd")
else
if {?Sort}='R' then
ToText({udDriverDatabase.HRRef},"######")
else
if {?Sort}='J' then
{%Job}
else
''
Here is my select statement:
(if {?Job}<> ' ' then {HRRM.udJobLocation} = {?Job} else 1=1) and
(if {?Include Inactive} = "N" then
{HRRM.ActiveYN} = "Y"
Else 1=1) and
(IF {?Company} <> '' then
(if ","+Totext({HRRM.HRCo},0,'')+"," in ","+{?Company}+","
then 1=1 else 0=1)
Else
1=1) and
(if {?Department}<> ' ' then {HRRM.udGLDepartment1} = {?Department} else 1=1)
When I run the report by some of the sort groups it narrows down my results versus sorting the data. For example if I sort by "D" for Driver Status I get 4 records when I sort by "N" for full name I get 44 pages of results. Why is my sort formula filtering down my report results?