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

Printing out Table Fields only 1

Status
Not open for further replies.
Aug 1, 2003
39
US
Is there a way to print just the fields from a Table and none of the information in the Table? What would be the code that would be used? Thanks
 
BUGGYNET

Do you mean the field names? If so have a look at faq184-3774.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
you can use display or list structure

DISP STRU TO PRINT NOCONSOLE

LIST STRU TO PRINT NOCONSOLE

Jim Osieczonek
Delta Business Group, LLC
 
Opps, I realized that probably puts the extra information you're trying to get rid of.


Also, if you use these command - sometimes you have to set the printer font to a small font so they appear on one page.

Example:
SET PRINTER FONT 'Courier', 10

Then use the DISPLAY or LIST command

Jim Osieczonek
Delta Business Group, LLC
 
Use Jim's example, and set the device to printer and it should work.

lcDevice = SET('device')
SET DEVICE TO printer
FOR i = 1 TO FCOUNT()
?FIELD(i)
ENDFOR

EJECT && clear printer buffer and force last page out

SET DEVICE TO &lcDevice

* I am not sure if the "EJECT" command is required. That may depend on the way you are setup.

Jim Osieczonek
Delta Business Group, LLC
 
The afields() functions puts all field information from the desired table into an array.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top