Page 1 of 1

Print IN_Creditors.SpareString1 field in PO Report

PostPosted: Tue Nov 17, 2015 10:53 am
by sgupta
Client needs to print IN_Creditors.SpareString1 field in the PO report. If the SpareString1 field is blank, then PO_Lines.Description needs to be printed, otherwise print SpareString1 field.

But this formula (@Part_Description) is not working correctly. The formula SQL statement is as below:

if {IN_Creditor.SpareString1} <> ''
then
{IN_Creditor.SpareString1}
else
{PO_Lines.Description}

The issue is, in some PO print outs, Part Description prints correctly if SpareString1 field is blank, but in other PO print outs, no Part Description is printed and the field space is left blank. I have tested this report in Jiwa Demo database by adding information under SpareString1 under Supply tab in Inventory Maintenance and I am getting the same result.

I have tried to insert a sub report with the required information or create a view and attach it to the existing tables, but none of these methods have worked.

Any assistance in resolving this issue would be greatly appreciated.

Re: Print IN_Creditors.SpareString1 field in PO Report  Topic is solved

PostPosted: Tue Nov 17, 2015 11:17 am
by Scott.Pearce
You may have to deal with NULLs. Try:

Code: Select all
If ISNULL({IN_Creditor.SpareString1}) Or LEN({IN_Creditor.SpareString1}) = 0 Then
    {PO_Lines.Description}
Else
    {IN_Creditor.SpareString1}

Re: Print IN_Creditors.SpareString1 field in PO Report

PostPosted: Wed Nov 18, 2015 1:25 pm
by sgupta
Hi Scott,
It is working okay now.
Thank you for the assistance.
Shalabh