You can create a report that call your dataport twice, passing a parameter with the value of 1 the first time and 2 the second, so you can do whatever you need depending on this value.
Be sure to set the UseReqForm property to No in the dataport.
The report could be as simple as this one
Where the function CallID is the function in your dataport to get the call value.
Answers
You can create a report that call your dataport twice, passing a parameter with the value of 1 the first time and 2 the second, so you can do whatever you need depending on this value.
Be sure to set the UseReqForm property to No in the dataport.
The report could be as simple as this one
Where the function CallID is the function in your dataport to get the call value.
Like this:
Where globalID is a global integer variable.
Regards
Great name by the way !
Sure want to read twice?
A trick I use to read the header lines on a dataport but you could use to read all the dataport lines...
OnPreDataItem=VAR
DosInFile@100000006 : File;
StreamIn@100000005 : InStream;
OffSetLength@100000004 : Integer;
NextStep@100000003 : Integer;
ReadStep@100000002 : Integer;
LineFeed@100000001 : Integer;
ReadLine@100000000 : Text[1024];
BEGIN
IF CurrDataport.IMPORT THEN BEGIN
DosInFile.OPEN (FileName);
DosInFile.CREATEINSTREAM (StreamIn);
LineFeed := 0;
REPEAT
OffSetLength := StreamIn.READTEXT (ReadLine, 1024);
LineFeed += 1;
UNTIL OffSetLength <> 0;
IF LineFeed > 1 THEN
OffSetLength := OffSetLength + 2;
REPEAT
NextStep := StreamIn.READTEXT (ReadLine, 1024);
OffSetLength := OffSetLength + NextStep + 4;
UNTIL NextStep <> 0;
DosInFile.CLOSE;
CurrFile.SEEK (OffSetLength);
END;
But I would say a better solution is to read all the records and place in a temporary record and on
Dataport - OnPostDataport()
Read back the temporary records and process the data from there.
Hope this helps!