Crystal 10, Vantage 8.0. Duplicating records deliberately

Hope this isn't counted as spamming or double-posting but I sorted out my problem.

This is what I did (just in case anyone else was interested):

Create repeater table in a text file (one column of numbers going from 1 to 100 named
NumOfRefs) then add database to report.
For the line I wanted to duplicate, I inserted the NumOfRefs field, then did a select on
{NumRef_txt.NumOfRefs} <= {JobMtl.QtyPer}.

To extract the circuit reference from the list separated by commas in {JobMtl.Character01}
I used the following code in a Crystal formula field:-

whileprintingrecords;
numbervar i:=0;
numbervar positionCount:=count(split({JobMtl.Character01},",")); //Number of iterations
for populating string
shared stringvar Array CircuitRef;
while positionCount > i do
(
i:=i + 1;
redim preserve CircuitRef[i];
CircuitRef [i] := split({JobMtl.Character01},",")[i] //Fill up CircuitRef array
);
CircuitRef[{NumRef_txt.NumOfRefs}] //Display relevant CircuitRef

So for example, a part which is used in 3 places in the assy is only entered once into the
BoM but has the circuit ref field {EcoMtl.Character01} filled in with "R1,R2,R3". This is
mapped to {JobMtl.Character01}.

When the Job Traveler is printed, in the 'raw materials' section it generates a line of
partnum / description/ qty per information for each individual circuit reference. This
makes it easier for production to see what part goes where, whilst also reducing the
amount of data entry, overcoming the bubblenum field size limitation and not messing up
availability reports on individual materials.
Some other tweaking is necessary to deal with strange circumstances, but so far I'm loving
this new version of Vantage and Crystal. (Come from Vantage 4 =>8, Crystal 7 =>10)

Jonny


--- In vantage@yahoogroups.com, "jonnyfatman666" <jonathan.waines@...> wrote:
>
> Hi All,
>
> Here is some code I'm using on a Job Traveler to separate out a field
> which contains data in the format 'R1,R2,R3,R4'(circuit references
> for a PCB) to individual values in an array.
>
> whileprintingrecords;
> numbervar i;
> numbervar positionCount:=count(split({JobMtl.Character01},","));
> shared stringvar Array CircuitRef;
> while positionCount > i do
> (
> i:=i + 1;
> redim preserve CircuitRef[i];
> CircuitRef [i] := split({JobMtl.Character01},",")[i]
> );
>
>
> I want to use this so that for each material seq number, the record
> is duplicated for each individual circuit reference. I know I could
> enter each line separately in the bom, but it's time consuming, and
> messes up availability reports.
>
> So... any ideas?
> Cheers
> Jonny
>
Hi All,

Here is some code I'm using on a Job Traveler to separate out a field
which contains data in the format 'R1,R2,R3,R4'(circuit references
for a PCB) to individual values in an array.

whileprintingrecords;
numbervar i;
numbervar positionCount:=count(split({JobMtl.Character01},","));
shared stringvar Array CircuitRef;
while positionCount > i do
(
i:=i + 1;
redim preserve CircuitRef[i];
CircuitRef [i] := split({JobMtl.Character01},",")[i]
);


I want to use this so that for each material seq number, the record
is duplicated for each individual circuit reference. I know I could
enter each line separately in the bom, but it's time consuming, and
messes up availability reports.

So... any ideas?
Cheers
Jonny