Dear Friends
I am using crystal reports 8.5 with MS Access database. I need to generate customer listing while accepting 6 paramerts from user (From/To Country, From/To Province, From/To City). Currently using following formula for selection:
if {?ContFr} = "ALL" then
if {?ProvFr} = "ALL" then
if {?CityFr} = "ALL" then
true
else
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
else
if {?CityFr} = "ALL" then
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo}
else
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo} and
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
else
if {?ProvFr} = "ALL" then
if {?CityFr} = "ALL" then
{QryCust.ContDesc} in {?ContFr} to {?ContTo}
else
{QryCust.ContDesc} in {?ContFr} to {?ContTo} and
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
else
if {?CityFr} = "ALL" then
{QryCust.ContDesc} in {?ContFr} to {?ContTo} and
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo}
else
{QryCust.ContDesc} in {?ContFr} to {?ContTo} and
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo} and
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
Just wanted to know if there is any better idea for the same? As I have to generate other reports where I would have to use 10 parameters (5 pairs of From and To) which could get very complicated.
Any advice would highly be appreciated )
Best Regards
ZEE
I am using crystal reports 8.5 with MS Access database. I need to generate customer listing while accepting 6 paramerts from user (From/To Country, From/To Province, From/To City). Currently using following formula for selection:
if {?ContFr} = "ALL" then
if {?ProvFr} = "ALL" then
if {?CityFr} = "ALL" then
true
else
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
else
if {?CityFr} = "ALL" then
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo}
else
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo} and
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
else
if {?ProvFr} = "ALL" then
if {?CityFr} = "ALL" then
{QryCust.ContDesc} in {?ContFr} to {?ContTo}
else
{QryCust.ContDesc} in {?ContFr} to {?ContTo} and
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
else
if {?CityFr} = "ALL" then
{QryCust.ContDesc} in {?ContFr} to {?ContTo} and
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo}
else
{QryCust.ContDesc} in {?ContFr} to {?ContTo} and
{QryCust.ProvDesc} in {?ProvFr} to {?ProvTo} and
{QryCust.CityDesc} in {?CityFr} to {?CityTo}
Just wanted to know if there is any better idea for the same? As I have to generate other reports where I would have to use 10 parameters (5 pairs of From and To) which could get very complicated.
Any advice would highly be appreciated )
Best Regards
ZEE