Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to print package variable 1

Status
Not open for further replies.

AnNguyen

Programmer
Jul 18, 2002
33
US
Hi all
i have a package contain one variable as following

PACKAGE Package_1 IS
v number(10,2);
END;

the variable will be assign different value on each detail line and need to be printed on the next detail line.

suppose i have this record set

name amount1 amount2
---- ------- -------
ABC 1000 900
DEF 500 800
GHK 1000 9000
....

and in the repeating frame i have the formattrigger as

function R_2FormatTrigger return boolean is
if package_1.v_commencing_ifo is not null then
if package_1.v <> 0 then
if package_1.v >= :amount2 then
package_1.v := package_1.v - :amount2;
else
package_1.v := 0;
end if;
else
if :amount1 >= :amount2 then
package_1.v := :amount1 - :amount2;
else
package_1.v_commencing_ifo := 0;
end if;
else -- this only for the first time.
if :amount1 >= :amount2 then
package_1.v := amount1 - :amount2;
else
package_1.v := 0;
end if;
end if;
return true;
end

You see i have v calculate on each of the detail but printed on the next line is this posible?
 
Put a Number field in the repeating frame and make it Source to be COPIES. In the format trigger of this field before the return statement put the following line:
srw.set_field(0, package_1.v);
 
Thank you nagornyi, your solution is very helpfull and i appreciate a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top