Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer Information
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01078150
Message ID:
01078181
Vues:
12
Create a project hook that runs this code whenever you build your EXE. That will take care of the problem and assure that the reports embedded in your EXE already have the printer information stripped out. The other benefit is that you don't have to remember to run it when you change a report .. it runs automatically every time you build your EXE.

Cathy



>Dear Experts
>
>Out side Exe, I use following procedure to delete printer information from reports.
>
>With Exe I do not distribute REPORTS Folder to clients.
>How is it possible to use following procedure in Exe, where there is not Reports Folder.
>
>Please Help
>
>LOCAL lnHand
>lcPath = "D:\GIN2006\REPORTS\" && modification is needed here in this line of lcPath
>lnFiles = Adir(laFiles,lcPath  + '*.frx',"A",1)
>
>lcMsg = ''
>FOR lnX = 1 To lnFiles
>	IF Used(laFiles(lnX,1))
>		SELECT (laFiles(lnX,1))
>		USE
>	ENDIF
>	USE (lcPath + laFiles(lnX,1))
>	WAIT Window 'Processing : ' + Alias() Nowait
>	GO Top
>	REPLACE Tag With '',tag2 With ''
>	lnLines = Alines(laLines,Expr,.T.)
>	lcMsg = ''
>*- create a file
>	lnHand=fcreate(addbs(sys(2023))+"expr.txt")
>	FOR lnY = 1 To lnLines
>		DO Case
>		CASE At('ORIENTATION=',laLines(lnY)) <> 0
>			=fputs(lnHand, laLines(lnY))
>		CASE At('COPIES=',laLines(lnY)) <> 0
>			=fputs(lnHand, laLines(lnY))
>		ENDCASE
>	NEXT
>*- close the file
>	=fclose(lnHand)
>*- append to the EXPR memo field
>	APPEND MEMO Expr FROM addbs(sys(2023))+"expr.txt" OVERWRITE
>NEXT
>MESSAGEBOX('Process completed.',64,'Printer Info')
>CLOSE Tables All
>
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform