Home » Developer & Programmer » Reports & Discoverer » formatting triggers
formatting triggers [message #90029] Mon, 04 October 2004 19:36 Go to next message
shish mate
Messages: 49
Registered: February 2004
Member
can any one give me step by step procedure of creating formatting tiggers in report 3 and o/s win98. i tryed it with this code
---first i right click on empno the field where i want to do formatting then i press on pl/sql editor and this is the code i writtn there

function F_EMPNOFormatTrigger return boolean is
begin
if (:empno > 100)
then
SRW.ATTR.MASK := SRW.WEIGHT_ATTR + SRW.FACE_ATTR +SRW.BORDERWIDTH_ATTR + SRW.FBCOLOR_ATTR +SRW.BORDPATT_ATTR;
SRW.ATTR.WEIGHT := SRW.BOLD_WEIGHT;
SRW.ATTR.FACE := 'helvetica';
SRW.ATTR.BORDERWIDTH := 150;
SRW.ATTR.FBCOLOR := 'BLACK';
SRW.ATTR.BORDPATT := 'SOLID';
--SRW.SET_ATTR (0,SRW.ATTR); (if i set this field on it gives me error )
end if;

return (TRUE);
end;

it's not giving any compilation errors but no color no border on report .

what can be the problem

help me
thanks in advance
ashish
Re: formatting triggers [message #90169 is a reply to message #90029] Wed, 24 November 2004 03:34 Go to previous message
arun
Messages: 67
Registered: January 2000
Member
hi this code i tried in my report it's working fine

if it's not working fine may be problem of ur report

function F_empnoFormatTrigger return boolean is
begin
if :empno is not null then
srw.attr.mask := SRW.TEXT_ATTR +
SRW.FACE_ATTR +
SRW.SZ_ATTR +
SRW.WEIGHT_ATTR +
SRW.GCOLOR_ATTR +
SRW.FBCOLOR_ATTR +
SRW.FFCOLOR_ATTR +
SRW.BFCOLOR_ATTR +
SRW.HJUST_ATTR;

srw.attr.text := SRW.BOLD_TEXTA;
srw.attr.face := 'times';
srw.attr.sz := 20;
srw.attr.weight := SRW.BOLD_WEIGHT;
srw.attr.gcolor := 'blue';
srw.attr.fbcolor := 'red';
srw.attr.ffcolor := 'red';
srw.attr.bfcolor := 'pink';
srw.attr.hjust := SRW.CENTER_HJUST;
srw.set_attr (0, srw.attr);
end if;
return (TRUE);
end;
Previous Topic: order in whihc report trigger works
Next Topic: Create list of values based on previous field selection in Parameter Forms
Goto Forum:
  


Current Time: Wed May 01 21:37:19 CDT 2024