Hi,
Im new to Progress Programming, and I have a problem paging this report.
Kindly advice.
define variable site as char format "X(10)".
define variable site1 as char format "X(8)".
define variable loc as char format "X(10)".
define variable loc1 as char format "X(10)".
define variable date like ld_date initial ?.
define variable date1 like ld_date initial ?.
define variable itemno as char format "x(14)".
define variable itemno1 as char format "x(14)".
DEFINE TEMP-TABLE tmp_lot
FIELD tmp_lotser Like tr_hist.tr_serial
FIELD tmp_date like tr_hist.tr_date
FIELD tmp_part like tr_hist.tr_part
FIELD tmp_desc like pt_desc1
FIELD tmp_freq like pt_desc2
FIELD tmp_ac_loc like tr_loc
FIELD tmp_qty like ld_qty_oh .
{mfdtitle.i}
FORM
site COLON 20 LABEL "Site"
site1 COLON 45 LABEL "To" skip
loc COLON 20 LABEL "Location"
loc1 COLON 45 LABEL "To" skip
date COLON 20 LABEL "From Issue"
date1 COLON 45 LABEL "To Issue"
WITH FRAME newa SIDE-LABELS WIDTH 80 ATTR-SPACE TITLE
" Viewing Frame ".
setFrameLabels(frame newa:handle).
REPEAT:
bcdparm = "".
{mfquoter.i site }
{mfquoter.i site1 }
{mfquoter.i loc }
{mfquoter.i loc1 }
{mfquoter.i date }
{mfquoter.i date1 }
{mfquoter.i itemno }
{mfquoter.i itemno1 }
UPDATE
site
site1
loc
loc1
date
date1 WITH FRAME newa.
IF site = "" THEN DO:
MESSAGE "Site Cannot Be Empty!".
UNDO, RETRY.
END.
IF site1 = "" THEN DO:
MESSAGE "Site1 Cannot Be Empty!".
UNDO, RETRY.
END.
IF loc = "" THEN DO:
MESSAGE "Location Cannot Be Empty!".
UNDO, RETRY.
END.
IF loc1 = "" THEN DO:
MESSAGE "Location1 Cannot Be Empty!".
UNDO, RETRY.
END.
IF date = ? THEN DO:
MESSAGE "Date From Cannot Be Empty!".
UNDO, RETRY.
END.
IF date1 = ? THEN DO:
MESSAGE "Date To Cannot Be Empty!".
UNDO, RETRY.
END.
{mfselbpr.i "printer" 123}
RUN report.
END.
PROCEDURE report:
/* Procedure 1*/
FOR EACH tr_hist no-lock where tr_site = site
and tr_loc = loc
and tr_date <= date1
and tr_date >= date
and (tr_type = "ISS-SO" or tr_type = "ISS-WO" or tr_type = "ISS-TR"
or tr_type = "ISS-UNP" or tr_type = "ISS-FAS" or tr_type = "RCT-WO"
or tr_type = "RCT-CHL").
FIND LAST pt_mstr no-lock where pt_part = tr_part.
FIND LAST wl_mstr no-lock where wl_lotser = tr_serial.
itemno1 = tr_part.
END.
/* Procedure 2*/
FOR EACH ld_det no-lock where ld_site = site1
and ld_loc = loc1
and ld_date <= date1
and ld_date >= date.
FIND LAST pt_mstr no-lock where pt_part = ld_part.
FIND LAST wl_mstr no-lock where wl_lotser = ld_lot.
itemno = ld_part.
CREATE tmp_lot.
if available tr_hist then do:
assign tmp_lotser = tr_serial
tmp_part = tr_part
tmp_date = wl_mod_date
tmp_desc = pt_desc1
tmp_freq = pt_desc2
tmp_ac_loc = tr_loc
tmp_qty = tr_qty_req.
end.
if available ld_det and ld_lot <> tmp_lotser then do:
assign tmp_lotser = ld_lot
tmp_part = ld_part
tmp_date = wl_mod_date
tmp_desc = pt_desc1
tmp_freq = pt_desc2
tmp_ac_loc = ld_loc
tmp_qty = ld_qty_oh.
END.
{mfreset.i}
(This frame displays during the first screen which is not what I want.
)
display
tmp_lotser LABEL 'Lot No.'
tmp_part LABEL 'Part No.'
tmp_date LABEL 'Last Issue Date.'
tmp_desc LABEL 'Description 1'
tmp_freq LABEL 'Description 2'
tmp_ac_loc LABEL 'Location'
tmp_qty LABEL 'Quantity'
WITH frame NewA.
END.
end procedure.
Im new to Progress Programming, and I have a problem paging this report.
define variable site as char format "X(10)".
define variable site1 as char format "X(8)".
define variable loc as char format "X(10)".
define variable loc1 as char format "X(10)".
define variable date like ld_date initial ?.
define variable date1 like ld_date initial ?.
define variable itemno as char format "x(14)".
define variable itemno1 as char format "x(14)".
DEFINE TEMP-TABLE tmp_lot
FIELD tmp_lotser Like tr_hist.tr_serial
FIELD tmp_date like tr_hist.tr_date
FIELD tmp_part like tr_hist.tr_part
FIELD tmp_desc like pt_desc1
FIELD tmp_freq like pt_desc2
FIELD tmp_ac_loc like tr_loc
FIELD tmp_qty like ld_qty_oh .
{mfdtitle.i}
FORM
site COLON 20 LABEL "Site"
site1 COLON 45 LABEL "To" skip
loc COLON 20 LABEL "Location"
loc1 COLON 45 LABEL "To" skip
date COLON 20 LABEL "From Issue"
date1 COLON 45 LABEL "To Issue"
WITH FRAME newa SIDE-LABELS WIDTH 80 ATTR-SPACE TITLE
" Viewing Frame ".
setFrameLabels(frame newa:handle).
REPEAT:
bcdparm = "".
{mfquoter.i site }
{mfquoter.i site1 }
{mfquoter.i loc }
{mfquoter.i loc1 }
{mfquoter.i date }
{mfquoter.i date1 }
{mfquoter.i itemno }
{mfquoter.i itemno1 }
UPDATE
site
site1
loc
loc1
date
date1 WITH FRAME newa.
IF site = "" THEN DO:
MESSAGE "Site Cannot Be Empty!".
UNDO, RETRY.
END.
IF site1 = "" THEN DO:
MESSAGE "Site1 Cannot Be Empty!".
UNDO, RETRY.
END.
IF loc = "" THEN DO:
MESSAGE "Location Cannot Be Empty!".
UNDO, RETRY.
END.
IF loc1 = "" THEN DO:
MESSAGE "Location1 Cannot Be Empty!".
UNDO, RETRY.
END.
IF date = ? THEN DO:
MESSAGE "Date From Cannot Be Empty!".
UNDO, RETRY.
END.
IF date1 = ? THEN DO:
MESSAGE "Date To Cannot Be Empty!".
UNDO, RETRY.
END.
{mfselbpr.i "printer" 123}
RUN report.
END.
PROCEDURE report:
/* Procedure 1*/
FOR EACH tr_hist no-lock where tr_site = site
and tr_loc = loc
and tr_date <= date1
and tr_date >= date
and (tr_type = "ISS-SO" or tr_type = "ISS-WO" or tr_type = "ISS-TR"
or tr_type = "ISS-UNP" or tr_type = "ISS-FAS" or tr_type = "RCT-WO"
or tr_type = "RCT-CHL").
FIND LAST pt_mstr no-lock where pt_part = tr_part.
FIND LAST wl_mstr no-lock where wl_lotser = tr_serial.
itemno1 = tr_part.
END.
/* Procedure 2*/
FOR EACH ld_det no-lock where ld_site = site1
and ld_loc = loc1
and ld_date <= date1
and ld_date >= date.
FIND LAST pt_mstr no-lock where pt_part = ld_part.
FIND LAST wl_mstr no-lock where wl_lotser = ld_lot.
itemno = ld_part.
CREATE tmp_lot.
if available tr_hist then do:
assign tmp_lotser = tr_serial
tmp_part = tr_part
tmp_date = wl_mod_date
tmp_desc = pt_desc1
tmp_freq = pt_desc2
tmp_ac_loc = tr_loc
tmp_qty = tr_qty_req.
end.
if available ld_det and ld_lot <> tmp_lotser then do:
assign tmp_lotser = ld_lot
tmp_part = ld_part
tmp_date = wl_mod_date
tmp_desc = pt_desc1
tmp_freq = pt_desc2
tmp_ac_loc = ld_loc
tmp_qty = ld_qty_oh.
END.
{mfreset.i}
(This frame displays during the first screen which is not what I want.
display
tmp_lotser LABEL 'Lot No.'
tmp_part LABEL 'Part No.'
tmp_date LABEL 'Last Issue Date.'
tmp_desc LABEL 'Description 1'
tmp_freq LABEL 'Description 2'
tmp_ac_loc LABEL 'Location'
tmp_qty LABEL 'Quantity'
WITH frame NewA.
END.
end procedure.