Time and again we keep creating numerous reports. The default printer driver information is stored by the VFP report generator in the .frx file. We need to hack and remove the information and recompile the files so that the distribution works smoothly in choosing the users printers.
Newbies ask how to do that.. or .. just get into a forum..reporting my REPORT file doesnt do this or that..etc.
So I felt the need for a general routine to have all the report files in a given directory hacked very easily - result is the following procedure.
**********************************************************
** PROCEDURE TO REMOVE PRINTER DRIVER INFO FROM FRX FILES.
**********************************************************
** by Subramanian.G (ramani)
** FoxAcc Software
** ramani_g@yahoo.com
** Last modified : 11 October, 2002
** modified : 27 February, 2003
** ORIENATION preserved in Reports
** provided as freeware
**********************************************************
** How to use ....
** 1. Copy the setfrx routine as given below
** 2. Open up your project in your project manager
** 3. Run the programme by DO setfrx from the command window
** OR in the command window enter =SETFRX()
** 4. All the open projects Report Files are involved.
**********************************************************
** PROCEDURE setfrx
LOCAL cRptFile, i, p
FOR p = 1 TO application.Projects.Count
FOR i = 1 TO application.Projects(p).Files.Count
cRptFile = application.Projects(p).Files(i).NAME
IF UPPER(JUSTEXT(cRptFile)) = "FRX"
WAIT WINDOW cRptFile && add NOWAIT if desired
USE (cRptFile)
LOCATE
** REPLACE Expr WITH "", Tag WITH "", Tag2 WITH ""
** Above line releases and following inserted
** to preserve the Report ORIENTATION
REPLACE Expr WITH ;
MLINE(Expr,ATLINE("ORIENTATION",Expr)), ;
Tag WITH "", Tag2 WITH ""
USE
ENDIF
ENDFOR
ENDFOR
RETURN
**********************************************************
** Ramani (Subramanian.G), FoxAcc, ramani_g@yahoo.com
** EOF
**********************************************************
Evaluate this to make others know how useful is this
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.