Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cleaning up FRX file TAG2 fields
Message
From
20/02/2003 04:44:57
 
 
To
19/02/2003 11:38:38
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, United States
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00754983
Message ID:
00755379
Views:
12
Larry,

This is what we do to get landscape and portrait orientation in 2.6:

Portrait:
m.tag2 = STUFF(m.tag2,45,1,CHR(2))
Landscape:
m.tag2 = STUFF(m.tag2,45,1,CHR(1))
In order to get the appropriate tag and tag2 settings from the printer the user has selected, we create a dummy, temporary report from one of the tables that is always present and grab the values from the tag and tag2 fields. We do something like this:

1. User selects printer
2. Create a dummy report
3. Read the values from tag and tag2 fields to variables. Delete the dummy report
4. Copy the report the user has selected to the temp directory
5. Open the report as a table
6. Stuff the value of the tag2 variable
7. Replace value of field tag and tag2, close the report table
8. Run the report from the temp directory.
9. Delete the report files from the temp directory

We also keep all our reports in one app file and copy them from there. This way, we only need to distribute one file containing all the reports.


>First, a preface:
>
>I know that in VFP 6 you need to clear out the TAG and TAG2 fields of a FRX file to make sure the reports aren't linked to specific printers. I also know that in VFP 6 you need to leave any ORIENTATION lines (in EXPR I think) if the orientation is not portrait.
>
>Now, my question:
>
>I need to do something similar in FPW 2.5/2.6. I have a landscape report from which I want to remove printer-specific data. If I just clear out TAG and TAG2 the report reverts to portrait. From the research I've been able to do in the newsgroups it seems that byte 45 of the TAG2 field is related to orientation such that asc(substr(TAG2,45,1))=1 for portrait and 2 for landscape. If I clear out TAG and set TAG2 to SPACE(44)+chr(2) I still get a portrait report. Is there something else I need to do?
>
>Is there any writeup on the contents of these fields as they relate to the first record of the FRX file? The info in the FILESPEC folder in VFP6 doesn't really give any helpful info for my problem.
Previous
Reply
Map
View

Click here to load this message in the networking platform