Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Consolidate Formula

Status
Not open for further replies.

byrne1

Programmer
Aug 7, 2001
415
US
Is there a way that I can consolidate the following short formula? I'm running CR 7.0


if {?VendorName}='' then
if {?BridalItem}='N' then
{ITMDESCR.Description1} like '*'+{?Pattern}+'*'
else
{ITMDESCR.Description1} like '*'+{?Pattern}+'*' and
({ITEM.WebItemFlag}='Y' or {ITEM.WebItemFlag}='Y')
else
if {?BridalItem}='N' then
{ITMDESCR.Description1} like '*'+{?Pattern}+'*' and
{VENDOR.Name} like '*'+{?Pattern}+'*'
else
{ITMDESCR.Description1} like '*'+{?Pattern}+'*' and
{VENDOR.Name} like '*'+{?Pattern}+'*' and
({ITEM.WebIte
 
What do you mean by 'consolidate'? Also the last line of your code does not appear to be complete.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
I just mean is there a way to make this formula more concise than it is.

BTW, the correct formula is:

if {?VendorName}='' then
if {?BridalItem}='N' then
{ITMDESCR.Description1} like '*'+{?Pattern}+'*'
else
{ITMDESCR.Description1} like '*'+{?Pattern}+'*' and
({ITEM.WebItemFlag}='Y' or {ITEM.WebItemFlag}='Y')
else
if {?BridalItem}='N' then
{ITMDESCR.Description1} like '*'+{?Pattern}+'*' and
{VENDOR.Name} like '*'+{?Pattern}+'*'
else
{ITMDESCR.Description1} like '*'+{?Pattern}+'*' and
{VENDOR.Name} like '*'+{?Pattern}+'*' and
({ITEM.WebItemFlag}='Y' or {ITEM.WebItemFlag}='Y')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top