output format

Steven Waters steven at abiederman.com
Tue Jun 7 13:01:16 PDT 2005


Thanks Rodney,
By the way I forgot to say I am on SCO UNIX / FP 5.0.14


Steve,

If you have an @keyF in your processing, it will take precedence over
the standard "F-Print Form" key. This will allow you to programmatically
take control over what forms show and print.

Something I have done in the past is to create a filepro file called
"forms" which has these fields:

1- File Name (32,*)
2- Output Name (32,*)
3- Description (32,allup)
4- Display (1,yesno)

Some sample data in this file includes:

File       Output Format        Desc                      Display
-----------------------------------------------------------------
ordentry   hardcopy             Prints screen 1           Y
ordentry   hardcopy_lpt2        Prints to LPT2            Y
ordentry   jobsheet             Job Data Form             Y
ordentry   manhours
ordentry   notes.dtl
ordentry   notes.ftr
ordentry   notes.hdr
ordentry   process
ordentry   region
ordentry   repeat
ordentry   sales_label_lpt1     Sales Folder Label       Y
ordentry   sales_label_lpt2     Sales Folder Label       Y
ordentry   sales_label_new      Revised Sales Label      Y
ordentry   salesrep

Then in the input processing table, I have this:

167  -------
@keyF  ? If:
        Then: call "library/keyF"
168  -------
        ? If:
        Then: end
169  -------

Then in my "library" file, I have a prc table "keyF" that contains this:

   1  -------
        ? If: '*** @keyF processing for forms
        Then: '*** modified 12/16/2004
   2  -------
        ? If:
        Then: declare fName, frmName
   3  -------
        ? If:
        Then: fName = @fi
   4  -------
        ? If:
        Then: lookup frm=forms k=[fName] i=A -nxms b="(brw=12 prc=cullit
              fill=asc,top)[Form Name                        Description]*2?
   5  -------
        ? If:
        Then:                                *3"
   6  -------
        ? If: not frm
        Then: clearb; end
   7  -------
        ? If:
        Then: frmName = frm(2) { ""
   8  -------
        ? If:
        Then: form frmName
   9  -------
        ? If:
        Then: clearb; end
  10  -------
        ? If: '
        Then: '
  11  -------
cullit ? If: frm(4) ne "Y"
        Then: drop
  12  -------
        ? If:
        Then: end

Of course, you'll need an index in the "forms" file containing the file
name (index A here).

Hope this helps.

Rodney

_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list