request output

Josh Reader josh.reader at mercuryelectronics.com
Tue Feb 2 07:49:40 PST 2016


Hi Dave,



If you are talking about using selection processing and prompting for user
input via the input popup command it can be done using declare variables.
A declare global command is used in selection processing and then a declare
extern command is used @once in the report’s processing table.  Below is a
sample where the part # is field #1



Output processing that is called using –v

-----------------------------------------------------------------------------------------

Line 1

IF:           fl eq “”                  ‘ This will prompt for input only 1
time

Then:    fl(1,YESNO,g)=”Y”; gosub popbox

-----------------------------------------------------------------------------------------

Line 2

IF:           pn eq 1                 ‘ Part # matches typed part #

Then:    select                    ‘ select it

------------------------------------------------------------------------------------------

Line 3

IF:           ‘ Get next record

Then:    end

-----------------------------------------------------------------------------------------

Line 4

popbox  IF:

                 Then:   ‘ Subroutine to prompt for user input

------------------------------------------------------------------------------------------

Line 5

                IF:          ‘ Prompt user for part #

                Then:    input popup pn(20,ALLUP,g) “\r Enter Part # : \r “

-------------------------------------------------------------------------------------------

Line 6

                IF:           pn eq “”               ‘ No part # is entered
so exit

                Then:    exit

--------------------------------------------------------------------------------------------

Line 7

                IF:           ‘ Initialize the declare variable that will
pass info to report

                Then:    declare global part(20,ALLUP,g)

--------------------------------------------------------------------------------------------

Line 8

                IF:           ‘ Set the value typed to the declare variable

                Then:    part=pn

----------------------------------------------------------------------------------------------

Line 9    IF:           ‘ Return back to where gosub was called from

                Then:    return





Output processing on report

@once  IF:           ‘ Bring in declare variable from selection processing

                Then:    declare extern part

                IF:           ‘ Set text passed using declare variable to a
regular dummy variable

                Then:    pn(20,ALLUP,g)=part



The dummy variable pn could then be placed on the report header to show the
part # the user typed.  If you would want to have the words Part # in front
of it you could use a second dummy variable and then concatenate text with
the pn variable.   This would be continued in @once.  For instance:

                If:            ‘ Initialize title variable

                Then:    ta(30,ALLUP,g)

                If:            pn ne “”

                Then:    ta=”Part #:”<pn



Then ta would be the dummy variable placed in the header and would show the
text Part#:, one space, then the part # the user had typed.



Hope this helps!

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20160202/aebaf930/attachment.html>


More information about the Filepro-list mailing list