With limited programming experience I am trying to create a report in Progress. The purpose of the report is to gather RMA data with some optional filtering such as entering a date range and/or item number.
I am not sure how to proceed with the following code if the date range and/or item number fields are left blank. If the variables are blank how is the variable overlooked in gathering the data? I am sure this is an easy task for you more experienced programmers.
Here is what I have so far without adding the date range and item variables in the procedure:
def var whs as char format "x(5)".
def var sdate as date.
def var edate as date.
def var s-item as char format "x(10)".
{lib/rpt-def.i &name=RMAOPENRPT}
assign
menu-id = "STD-RPT".
ifappend = true.
{lib/rpt-opt.i
&named-const1="symtext.sys-text.txt[1 for 3] format 'x(78)' no-label view-as text"
&opt2=whs &type2=ch &at2="colon 30 label 'Enter Warehouse'"
&opt4=sdate &type4=ch &at4="colon 30 label 'Enter Start Date'"
&opt6=edate &type6=ch &at6="colon 30 label 'Enter End Date'"
&opt8=s-item &type8=ch &at8="colon 30 label 'Enter Item #'"
&dest10="colon 30"
}
PROCEDURE do-PROCESS:
def input parameter p-text as character no-undo.
DO ON ERROR UNDO, RETURN:
RUN validate-destination.
END.
{lib/rpt-open.i}
DISPLAY
symtext.sys-text.txt[4]
symtext.sys-text.txt[5]
WITH WIDTH-CHARS 132 PAGE-TOP NO-LABELS NO-BOX FRAME f-label132
STREAM-IO.
For each rmaitem where rmaitem.datefld = ?, each rma where rma.whse = input frame f-in whs and rma.rma-num = rmaitem.rma-num,
each custaddr where custaddr.cust-num = rma.cust-num and custaddr.cust-seq =
rma.cust-seq:
Thanks for any and all help!
I am not sure how to proceed with the following code if the date range and/or item number fields are left blank. If the variables are blank how is the variable overlooked in gathering the data? I am sure this is an easy task for you more experienced programmers.
Here is what I have so far without adding the date range and item variables in the procedure:
def var whs as char format "x(5)".
def var sdate as date.
def var edate as date.
def var s-item as char format "x(10)".
{lib/rpt-def.i &name=RMAOPENRPT}
assign
menu-id = "STD-RPT".
ifappend = true.
{lib/rpt-opt.i
&named-const1="symtext.sys-text.txt[1 for 3] format 'x(78)' no-label view-as text"
&opt2=whs &type2=ch &at2="colon 30 label 'Enter Warehouse'"
&opt4=sdate &type4=ch &at4="colon 30 label 'Enter Start Date'"
&opt6=edate &type6=ch &at6="colon 30 label 'Enter End Date'"
&opt8=s-item &type8=ch &at8="colon 30 label 'Enter Item #'"
&dest10="colon 30"
}
PROCEDURE do-PROCESS:
def input parameter p-text as character no-undo.
DO ON ERROR UNDO, RETURN:
RUN validate-destination.
END.
{lib/rpt-open.i}
DISPLAY
symtext.sys-text.txt[4]
symtext.sys-text.txt[5]
WITH WIDTH-CHARS 132 PAGE-TOP NO-LABELS NO-BOX FRAME f-label132
STREAM-IO.
For each rmaitem where rmaitem.datefld = ?, each rma where rma.whse = input frame f-in whs and rma.rma-num = rmaitem.rma-num,
each custaddr where custaddr.cust-num = rma.cust-num and custaddr.cust-seq =
rma.cust-seq:
Thanks for any and all help!