File i/o error using file number #1
Posted: Thu Feb 02, 2017 9:30 pm
I can not figure this out at all.
I am running a macro report offline and I am getting the error in the topic line.
The report works for some files and and not for others and it seems to also depend on the workstation being used?? Anyone have any ideas???
This is where I believe the error comes from, but I'm not sure how to fix it.
name report
tempfile$=_exepath$ + "Input.txt"
bunch of lines.....
! Print file (to Printer)
Open tempfile$ for input as #1
counter=43
i=0
While i < 2
Input #1, line$
counter = counter + 1
StrPrint "" + line$, 1, counter
If LEN(line$)= 0
i=i+1
Else
i=0
EndIf
If counter = 70 Then
EndPrint
StartPrint
StrPrint "Data file: " + _DataPath$ + _Datafile$, 1, 1
Counter = 3
EndIf
EndWhile
Close #1
EndPrint
Draw 2, R5
Delete _ExePath$ + "Input.txt", DontAsk
I am running a macro report offline and I am getting the error in the topic line.
The report works for some files and and not for others and it seems to also depend on the workstation being used?? Anyone have any ideas???
This is where I believe the error comes from, but I'm not sure how to fix it.
name report
tempfile$=_exepath$ + "Input.txt"
bunch of lines.....
! Print file (to Printer)
Open tempfile$ for input as #1
counter=43
i=0
While i < 2
Input #1, line$
counter = counter + 1
StrPrint "" + line$, 1, counter
If LEN(line$)= 0
i=i+1
Else
i=0
EndIf
If counter = 70 Then
EndPrint
StartPrint
StrPrint "Data file: " + _DataPath$ + _Datafile$, 1, 1
Counter = 3
EndIf
EndWhile
Close #1
EndPrint
Draw 2, R5
Delete _ExePath$ + "Input.txt", DontAsk