I am modifying an existing report using crystal. The report is used as a packing list for products we sell. In the course of manufacture we "attach" documents to the product in our data base. Some of the document numbers must be printed on the packing list below the part number.
Currently for every document associated with a part number a new entry is printed on the packing list like this:
[tt]
item qty Part
1 3 Thing one
document 1
2 3 Thing two
document 2
2 3 Thing two
document 3
[/tt]
What we want is:
[tt]
item qty Part
1 3 Thing one
document 1
2 3 Thing two
document 2, document 3
[/tt]
I have tried the following code.
This will filter out documents which are not of the type "MTR" which is good. I do not know how to get the code to put all the records into one string. I know the code runs because it adds the comma to the end of each document number.
All help is appreciated.
Currently for every document associated with a part number a new entry is printed on the packing list like this:
[tt]
item qty Part
1 3 Thing one
document 1
2 3 Thing two
document 2
2 3 Thing two
document 3
[/tt]
What we want is:
[tt]
item qty Part
1 3 Thing one
document 1
2 3 Thing two
document 2, document 3
[/tt]
I have tried the following code.
Code:
dim MTRs as string
IF {OrderDet.ItemNo} = {OrderFiles.ItemNo} and {OrderFiles.DocType} = "MTR" then
MTRs = MTRs + {OrderFiles.DocNumber} + ", "
End if
formula = MTRs
This will filter out documents which are not of the type "MTR" which is good. I do not know how to get the code to put all the records into one string. I know the code runs because it adds the comma to the end of each document number.
All help is appreciated.