I am having trouble passing a value calculated in a report to a form elsewhere in the application.
I have a report, let's call it "General Ledger". It has both summary and
calculated field variables:
SUMMARY:
PAY1_TG defined as RECEIPTS->PAY1
CHG_TG defined as RECEIPTS->CHANGE
where "RECEIPTS" is a .DBF and "PAY1" AND "CHANGE" are fields in
the "RECEIPTS" record. Of course.
CALCULATED:
C_TOTAL defined as SUMMARY->PAY1_TG - SUMMARY->CHG_TG
and C_TOTAL is displayed on the report, and it is correct. OK.
Now I want to pass the value of C_TOTAL to a "form" elsewhere in the
application. In fact I already have a script variable, called %TOTAL.
The field that feeds the area in the form is called SCRIPTS->TOTAL.
I also have a TOTAL.VAR file in my SCP directory (assume the script
path is pointed correctly to it). By the way, if I don't have the set
statement described below, the value in TOTAL.VAR is the value that
shows up in the described form field.
There is a "script" file that runs the report called "LEDGER_P.SCP" and
I have appended a {SET %TOTAL, "3.14"} to the end of it, and can
correctly get that value to display on the form. But I can't figure out
if I can use SUMMARY-> or CALC-> values in a script in order to pass
a real value. If there is a way, I'm damned if I can figure out the syntax.
The Release 6 manual says that you can specify summary fields in a
form, but when I press F2 on the form, it has calculated fields, but
no summary fields.
I have a report, let's call it "General Ledger". It has both summary and
calculated field variables:
SUMMARY:
PAY1_TG defined as RECEIPTS->PAY1
CHG_TG defined as RECEIPTS->CHANGE
where "RECEIPTS" is a .DBF and "PAY1" AND "CHANGE" are fields in
the "RECEIPTS" record. Of course.
CALCULATED:
C_TOTAL defined as SUMMARY->PAY1_TG - SUMMARY->CHG_TG
and C_TOTAL is displayed on the report, and it is correct. OK.
Now I want to pass the value of C_TOTAL to a "form" elsewhere in the
application. In fact I already have a script variable, called %TOTAL.
The field that feeds the area in the form is called SCRIPTS->TOTAL.
I also have a TOTAL.VAR file in my SCP directory (assume the script
path is pointed correctly to it). By the way, if I don't have the set
statement described below, the value in TOTAL.VAR is the value that
shows up in the described form field.
There is a "script" file that runs the report called "LEDGER_P.SCP" and
I have appended a {SET %TOTAL, "3.14"} to the end of it, and can
correctly get that value to display on the form. But I can't figure out
if I can use SUMMARY-> or CALC-> values in a script in order to pass
a real value. If there is a way, I'm damned if I can figure out the syntax.
The Release 6 manual says that you can specify summary fields in a
form, but when I press F2 on the form, it has calculated fields, but
no summary fields.
Comment