INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Printers

How to hack FRX file to strip printer driver information by ramani
Posted: 22 Mar 01 (Edited 27 Feb 03)

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

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close