Olaf Doschke
Programmer
I had an idea of a report printing records multiple times depending on a field iCount in the report driving cursor.
Main ingredient is, the detail band has the on exit expression:
nCount here is a report variable initialised with iCount when the report group changes, which is set to every record, ie the report groups by RECNO().
nRepeat is another report variable set to 0 at each group start and counting.
The main drawback is, this does not work out for RECNO()=1, because SKIP -1 does not skip before the first record, so next processed record always is RECNO()=2, no matter what iCount is in RECNO()=1.
A simple solution would be keeping an empty first record, but I wonder, if anyone has another idea.
I would otherwise revert to a much simpler concept of processing a report cursor into another one with repeated records, so each record is printed once as usual, but users of a certain library can insert rows with a count anyway and that count simply determines the number of record copies made into the real report driving cursor.
Bye, Olaf.
Main ingredient is, the detail band has the on exit expression:
Code:
execscript("Skip iif(nRepeat<nCount,-1,0)")
nCount here is a report variable initialised with iCount when the report group changes, which is set to every record, ie the report groups by RECNO().
nRepeat is another report variable set to 0 at each group start and counting.
The main drawback is, this does not work out for RECNO()=1, because SKIP -1 does not skip before the first record, so next processed record always is RECNO()=2, no matter what iCount is in RECNO()=1.
A simple solution would be keeping an empty first record, but I wonder, if anyone has another idea.
I would otherwise revert to a much simpler concept of processing a report cursor into another one with repeated records, so each record is printed once as usual, but users of a certain library can insert rows with a count anyway and that count simply determines the number of record copies made into the real report driving cursor.
Bye, Olaf.