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!

How to modify report .frx files programmatically

Status
Not open for further replies.

sumpun

MIS
Feb 20, 2002
21
HK
Can someone provide me a list of objtypes and objcodes ???

I understand that I can programmatically change attributes of a report by treating the (.frx) as a table, since I already do this for setting printer attributes.

However, what I am trying to do is adjust all values of vpos and hpos for printing on various dot matrix printers

That is, I want to move the entire report up or down the page to suit different printers for pre-print formats.

What objtype and objcode should I make changes to achieve this.

CHEERS !!!

Sum Pun
 
sumpun

This might be a very long process for you. You may consider creating a report that "suits" most printer configurations instead.
But if feel the need, here is how involved it might get.
1. Create a blank report (Report1.frx)
2. Use it like a table : use c:\report1.frx
3. Browse it and you will notice that there are six records already.

The first record (objtype 1, objCode 53) hold the printer information (In Expr, Tag and Tag2).
The second record (Pageheader - ObjType 9 - objCode 1) you can control the height and the width of the pageheader.
The third one is the detail band ( ObjType 9 ObjCode 4) same as above.
The fourth record is the PageFooter (ObjType 9 - ObjCode 7) same as above.
The fifth record I'm not sure.
The last record is the Dataenvironment of the report (ObjType 25).

Now if you decide to add a textbox in the detail band (ObjType 8, ObjCode 0) you can adjust the positions, the size, the height etc...

It just seems too much work to accomplish all of this. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
While much of the VFP file structers are defined in the help file, all the recent ones provide more detail in the FileSpecs directory.
In VFP 6.0 -> "C:\Program Files\Microsoft Visual Studio\Vfp98\Filespec\"
In VFP 7.0 -> "C:\Program Files\microsoft visual foxpro 7\Tools\Filespec\"
In VFP 8.0 -> "C:\Program Files\microsoft visual foxpro 8\Tools\Filespec\"
There are both tables that have the info AND reports that will print out the info for you.

e.g.
DO REPORT 60frx1.frx TO PRINTER NOCONSOLE
DO REPORT 60frx2.frx TO PRINTER NOCONSOLE

Rick

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top