Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 3.0 REPORT TO FILE ASCII
Message
From
27/03/1998 00:01:46
 
 
To
26/03/1998 11:01:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00087239
Message ID:
00087553
Views:
37
>>I'm using Roman 10cpi font for my report. On printing the data to the printer the report prints out fine, however on reporting to file it is observed that some the lines overlap. I'm not being able to figure thsi out and any suggestions would be helpfull.
>>
>>Thanks
>>
>>Sonali
>If you mean some extra CR you may try following code (It's an old code for FP 2x and might need revision).
>
function rep2file
>parameters orgfile
>moldsel=alias()
>create cursor tempcurs (fle m(10))
>insert into tempcurs values (" ")
>append memo fle from (ORGFILE)
>replace fle with ;
>	STRTRAN(CHRTRAN(STRTRAN(strtran(;
>		fle,chr(12),"%%");
>		,CHR(13)+CHR(10),"%%");
>		,CHR(13),"þ");
>		,"%%",CHR(13)+CHR(10))
>
>mtempfile="F"+substr(sys(3),2)+".txt"
>copy memo fle to (mtempfile)
>use
>select (moldsel)
>handle=fopen(mtempfile)
>ifp_size=fseek(handle,0,2)
>=fseek(handle,0,0)
>HANDLE1=FCREATE(orgfile)
>DO WHILE !FEOF(HANDLE)
>	=FPUTS(HANDLE1,SMOOTH(FGETS(HANDLE,ifp_size)),ifp_size)
>ENDDO
>=fclose(handle)	
>=fclose(handle1)	
>erase (mtempfile)
>WAIT CLEAR
>
>FUNCTION SMOOTH
>PARAMETERS LINE
>IF OCCURS("þ",LINE)=0
>	RETURN LINE
>ENDIF
>DIMENSION LINES[OCCURS("þ",LINE)+1]
>MXLEN=0
>FOR OCCHAR=1 TO OCCURS("þ",LINE)
>	LINES[OCCHAR]=SUBSTR(LINE,1,AT("þ",LINE)-1)
>	LINE=SUBSTR(LINE,AT("þ",LINE)+1)
>	MXLEN=MAX(MXLEN,LEN(LINES[OCCHAR]))
>ENDFOR	
>LINES[ALEN(LINES,1)]=LINE
>MXLEN=MAX(MXLEN,LEN(LINE))
>if mxlen=0
>	return ""
>endif	
>for maxline=1 to ALEN(LINES,1)
>	lines[maxline]=padr(lines[maxline],mxlen+1," ")
>endfor	
>for linenum=1 to ALEN(LINES,1)-1
>	for chrpos=1 to len(lines[ALEN(LINES,1)-linenum+1])
>		if substr(lines[ALEN(LINES,1)-linenum+1],chrpos)=" "
>			loop
>		endif
>		lines[ALEN(LINES,1)-linenum]=;
>			stuff(lines[ALEN(LINES,1)-linenum],chrpos,1,;
>				substr(lines[ALEN(LINES,1)-linenum+1],chrpos,1))
>	endfor
>endfor
>return lines[1]
>
>cetin

No I don't mean extra CR's. I'm printing out Details regarding Companies, the Name,Address of the Company ( Group Band ) followed by details of the Band ( Detail Band ). What is observed is that randomly the Name is overwritten by the Address when I Report to FILE ASCI. On sending the report to a printer everything is fine. Could it be a VFP 3.0 bug?

Thanks

Sonali
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform