how can i print "-" in place of zero in below field, so whenever value will be zero it will print dash, currently it is printing 0% if value is nil but i want to print - Code: [Field: POS RateofDuty] Use : Number Field Set As : $TVATSTKIVatRate:StockItem:$StockItemName Format : "Zero,Percentage" Width : 20% Page
Set As : If $$IsEmpty:$TVATSTKIVatRate:StockItem:$StockItemName then $$String:"-" Else $TVATSTKIVatRate:StockItem:$StockItemName
Sir, thanks for the reply, the condition provided by you looks perfect but it's not working please see image - in first image using old code Tax% is coming but in 2nd part of image after using below code Tax % is coming only 0%, please help Code: [Field: POS RateofDuty] Use : Number Field Set As : if $$IsEmpty:$TVATSTKIVatRate:StockItem:$StockItemName then $$String:"-" Else $TVATSTKIVatRate:StockItem:$StockItemName Width : 20% Page Format : "Zero,Percentage" Align : Center
If it is coming as `0' then it has nothing to do with the above formula......... it would have come as `-'. Check your UDF again for any spell mistake or anything. Also instead of $StockItemName .......... try #FieldName (the Field where your StockItem name is displayed)
Sir I tried, i don't know why its not working, can i do something separately to change 0% of this field in to -, please help
Thanks for the reply, after removing Use : Number Field, it is working and showing "-" but it's not showing percentage sign (please see image) this is after using below code Code: [Field: POS RateofDuty] Set As : If $$IsEmpty: $TVATSTKIVatRate:StockItem:$StockItemName then $$String:"-" Else $TVATSTKIVatRate:StockItem:$StockItemName Width : 20% Page Format : "No Zero, Percentage" Align : Center
[Field: POS RateofDuty] Set As : If $$IsEmpty: $TVATSTKIVatRate:StockItem:$StockItemName then "-" Else $TVATSTKIVatRate:StockItem:$StockItemName + "%" Width : 20% Page Align : Center
Dear sir, thanks for the reply after using this, - sign is coming if field and % sign is also coming but 0% is coming every time even if there is 5%
One more option can be add another field with string in nature and use it for printing and make the actual calculation fields invisible