Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hack FRX file to strip printer driver information

Printers

How to hack FRX file to strip printer driver information

by  ramani  Posted    (Edited  )
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
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top