I am trying to built a report that uses multiple IF statements to determine which NL function to run. The IF statements are first determining what type of document it is, then telling the NL function what table to go to and what data to retrieve. I am using the NL Rows function because I need each Product Line Code that is on the particular document to be listed. However, it is only returning the first record, not all of the rows.
I really need this to work. I've looked at other threads and have read about the conditional replication, but I've only been able to get it to work using one IF statement and NL function.
Thanks in advance for any suggestions or help!
Here is my formula:
=IF(LEFT(I4,3)="NSO",NL("Rows","Sales Shipment Line","PRODLINE","Company=",H4,"Order No.",I4),IF(LEFT(I4,3)="NPO",NL("Rows","Purchase Line Archive","Shortcut Dimension 2 Code","Company=",H4,"Document No.",I4,"Quantity",JET!$A$3),IF(LEFT(I4,3)="CPO",NL("Rows","Purchase Line Archive","Shortcut Dimension 2 Code","Company=",H4,"Document No.",I4,"Quantity",JET!$A$3),IF(LEFT(I4,2)="TO",NL("Rows","Transfer Shipment Line","PRODLINE","Company=",H4,"Transfer Order No.",I4,"Quantity",JET!$A$3),IF(LEFT(I4,2)="SO",NL("Rows","Sales Shipment Line","PRODLINE","Company=",H4,"Order No.",RIGHT(I4,5),""))))))
