Ive had problems with this before and have found partial solutions but havent totally solved my problem... Im using Crystal Reports 8.5 std. not exactly sure how to word this but let me try.. I want to print Items in a table and to print those items it needs to be compared with another field depending if the paramater = Yes or NO EX below
IF Yes
ITEM Date QTY SPLCHG
1001/p2 4/4/04 5
F 4/4/04 5 F
IF No
ITEM Date QTY SPLCHG
1001/p2 4/4/04 5
Im not the best formula writer in the world but this is how i have it currently but the problem im trying to avoid is having to update the selection formula everything we add a special charge code...
IF {?Include Special Charges}="NO"then
not ({LOT.ILT_ITEM} in ["F"]) and
{LOT.ILT_CUST#} = {?Customer} and
{@Begin Date} = {?Date Begin} or
{LOT.ILT_CUST#} = {?Customer} and
{@End Date} = {?Date End}
else
IF {?Include Special Charges}= "YES" then
{LOT.ILT_CUST#} = {LOT.ILT_CUST#} and
{LOT.ILT_CUST#}= {?Customer} and
{@Begin Date} = {?Date Begin} or
{LOT.ILT_CUST#} = {?Customer} and
{@End Date} = {?Date End}
The special charges field in the database is LOT.ILT_SPLCHG and its a string value and ive tried a few different ways but cant seem to get it to work properly it ususally ends up not displaying any items if we select NO... The code i had above it what we have now and we can insert the special codes into the Not IN section but everytime we add or subtract the code we have to go back in and edit the selection formula... As you can see we also are selecting by customer number and dates as well... Any help is greatly appreciated if you are unsure what im trying to get at please let me know and i will try to explain more... Thank you
IF Yes
ITEM Date QTY SPLCHG
1001/p2 4/4/04 5
F 4/4/04 5 F
IF No
ITEM Date QTY SPLCHG
1001/p2 4/4/04 5
Im not the best formula writer in the world but this is how i have it currently but the problem im trying to avoid is having to update the selection formula everything we add a special charge code...
IF {?Include Special Charges}="NO"then
not ({LOT.ILT_ITEM} in ["F"]) and
{LOT.ILT_CUST#} = {?Customer} and
{@Begin Date} = {?Date Begin} or
{LOT.ILT_CUST#} = {?Customer} and
{@End Date} = {?Date End}
else
IF {?Include Special Charges}= "YES" then
{LOT.ILT_CUST#} = {LOT.ILT_CUST#} and
{LOT.ILT_CUST#}= {?Customer} and
{@Begin Date} = {?Date Begin} or
{LOT.ILT_CUST#} = {?Customer} and
{@End Date} = {?Date End}
The special charges field in the database is LOT.ILT_SPLCHG and its a string value and ive tried a few different ways but cant seem to get it to work properly it ususally ends up not displaying any items if we select NO... The code i had above it what we have now and we can insert the special codes into the Not IN section but everytime we add or subtract the code we have to go back in and edit the selection formula... As you can see we also are selecting by customer number and dates as well... Any help is greatly appreciated if you are unsure what im trying to get at please let me know and i will try to explain more... Thank you