Page 1 of 1

Combining Inventory Item Serial Numbers on Sales Order Line

PostPosted: Fri Mar 09, 2018 1:48 pm
by Iain
Hi,
The Jiwa Sales Order Crystal Report MNT30000 - Invoice.rpt prints serial numbers on separate lines. ie. If I sell ten of one item I get one line for the the sale and another ten lines for the serial numbers (see attachment).
How can I combine the serial numbers into one line that grows if necessary? Preferably this would be via a formula that concatenates SO_LineDetails.SerialNo records.
Cheers, Iain

Re: Combining Inventory Item Serial Numbers on Sales Order L  Topic is solved

PostPosted: Fri Mar 09, 2018 2:06 pm
by Scott.Pearce
Use a couple of formulae in Crystal. One to build the concatenated list of serial nos (UpdateSerialConcatenation), and another to print out the results (ShowConcatenatedSerials). UpdateSerialConcatenation needs to be placed in a details section, supressed, and perhaps modified to reset the string on change of InvoiceLineID.

UpdateSerialConcatenation
Code: Select all
WhilePrintingRecords;
StringVar ConcatenatedSerials;

If ConcatenatedSerials <> "" Then
    ConcatenatedSerials := ConcatenatedSerials + ", ";

ConcatenatedSerials := ConcatenatedSerials + {SO_LineDetails.SerialNo};



To print the output:

ShowConcatenatedSerials:
Code: Select all
WhilePrintingRecords;
StringVar ConcatenatedSerials;


Have a play around with the above approach and see what you can come up with. If using MNT30000 - Invoice.rpt, you may need to delete the existing SerialNumbers subreport, and link SO_Lines and SO_LineDetails into the main report for these formulae to work.