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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Labels - Removing Printer Specific Information

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
This question is for Labels in VFP 6.0. For years I have been clearing the Tag and Tag2 fields in the FRX for reports and clearing everything out of the EXPR except for the Orientation using an old prg named NukeFrx I picked up years ago. I haven't used labels in a while and was wondering if I can apply the same logic to the LBX. I guess I'm most concerned about the page size, etc in the EXPR. If I clear these out will it screw up the labels?

Auguy
Sylvania/Toledo Ohio
 
I can see it being a little bit of a problem with labels, which require either page height (for continuous form) or margin information (for laser labels). But it's the same theory. An LBX is nothing but an FRX in drag.

You may have to experiment a bit to figure out which bits need to stay behind.
 
I don't know anything about NukeFrx, but it is easy to manually Hack an FRX/LBX file.

Typically, if you don't need to save the orientation, it is nothing more than:
Code:
   USE MyRpt.FRX IN 0
   SELECT MyRpt
   REPLACE Expr WITH '',;
      TAG WITH '',;
      TAG2 WITH '';
      FOR RECNO() = 1
   USE

You can readily do this manually if it is a one-time thing.

If you want to save the orientation, like you suggest above, just open the Expr memo field and manually eliminate everything except the ORIENTATION=1 line.

If you are needing to do this programatically on a regular basis you can easily write your own program.

If might be something like:
Code:
   USE MyRpt.FRX IN 0
   SELECT MyRpt
   GO TOP
   lLandscape = .F.
   IF "ORIENTATION=1" $ Expr
      lLandscape = .T.
   ENDIF

   * --- Clear ALL Printer Environment Data ---
   REPLACE Expr WITH '',;
      TAG WITH '',;
      TAG2 WITH ''
   
   IF lLandscape
      * --- Restore Landscape Setting ---
      REPLACE Expr WITH "ORIENTATION=1"
   ENDIF
   USE

Good Luck,
JRB-Bldr
 
Thanks to both of you. NukeFrx essentially clears out Tag & Tag2 and clears everything in the Expr field except the orientation in FRX files. I know I tweaked it a little. It also does all of the reports in a folder at one time and has a couple of other functions that I rarely use. As Dan stated, I guess I'll have to experiment to see what I can remove. Then I'll change the NukeFrx program to include LBX files.

Auguy
Sylvania/Toledo Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top