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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visble only when a product code = 1

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
969
0
16
GB
Hi

I am trying to add a field into a report that as a filed that I only want to appear when it meets a certain criteria.

Currently the code looks like this

"Pack: " + {DinoOrderLineOption.PackRef} + " " + {@shippingcode} + " (" + (totext({DinoOrderLineOption.PackNoOfPieces},0) & "pc") + " " + (totext({DinoOrderLineOption.Packlength},1) & "m") + " " + (totext({DinoOrderLineOption.packvolume},3) & "m3)")


I want the @shippingcode to disappear if the productgroup code in the product table does not equal 2000. if it does = 2000 then to show.

I made the shippingcode as a formula field as I assume I need to make the code there. How the code should look is baffling me, I assume it is an IF THEN CLAUSE.

Could someone help me with the code thanks
 
Easiest way is to do it in the @shippingcode formula:

IF {table.productgroupcode} = 2000
THEN <whatever you're currently doing>
ELSE "
 
HI

Sorry just realised it did not work as expected.

It is now taking out all Pack Information where he code is not in group 2000. It should only not display shippingref not the rest of the information. Also I believe in these rows there is no shippingref anyway to display, so how od I code for this. It may be equal to 2000 but then have no shippingref code there. Any ideas please.


Capture_lnkivo.jpg


"Pack: " + {DinoOrderLineOption.PackRef} + " " + {@shippingcode} + "
(" + (totext({DinoOrderLineOption.PackNoOfPieces},0) & "pc") + " " + (totext({DinoOrderLineOption.Packlength},1) & "m")
+ " " + (totext({DinoOrderLineOption.packvolume},3) & "m3)")


and the statement for the @shippingcode is
IF {ProductGroup.ParentID} = 2000
THEN {ProductPack.ShippingRef}
ELSE " "


I have also played with using the code in one formula, I get the same results but still the same problem, not showing if ProductPack.ShippingRef as nothing in. Please help

IF
{ProductGroup.ParentID} = 2000
THEN
"Pack: " + {DinoOrderLineOption.PackRef} + " " + {ProductPack.ShippingRef} + " (" + (totext({DinoOrderLineOption.PackNoOfPieces},0) & "pc") + " " + (totext({DinoOrderLineOption.Packlength},1) & "m")
+ " " + (totext({DinoOrderLineOption.packvolume},3) & "m3)")
ELSE
"Pack: " + {DinoOrderLineOption.PackRef} + " (" + (totext({DinoOrderLineOption.PackNoOfPieces},0) & "pc") + " " + (totext({DinoOrderLineOption.Packlength},1) & "m") + " " + (totext({DinoOrderLineOption.packvolume},3) & "m3)")


Thanks
 
Yes possible could be to be honest, getting a little confused where I am , I will close the other one down.
 
Woops as I said confused, I will close this one down
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top