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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

static or report wide variables?

Status
Not open for further replies.

jparrott

Programmer
May 1, 2003
14
US
I have a format trigger that looks like this:

Code:
function R_G_sample_idFormatTrigger return boolean is
begin
  if (owa_pattern.match(:sample_id, '^\D'))
  then
    srw.set_foreground_border_color('black');
    srw.set_border_pattern('solid');
  else
  	srw.set_foreground_border_color('white');
  end if;

  return (TRUE);
end;

I need to add to the if condition something that says "if I've already do this, don't do it again", so something like this:

Code:
function R_G_sample_idFormatTrigger return boolean is
begin
  if (owa_pattern.match(:sample_id, '^\D') and flag = 0)
  then
    srw.set_foreground_border_color('black');
    srw.set_border_pattern('solid');
    flag := 1;
  else
  	srw.set_foreground_border_color('white');
  end if;

  return (TRUE);
end;

The easiest way I can think to do this would be with a static variable, but I haven't been able to find any documentation on static variables in PL/SQL. Another way would I thought to do this would be to create a report wide variable that would act the same way.

Thanks,
Justin
 
You may use parameter or package variable.

Regards, Dima
 
Thanks for your response. How do I create a package variable in Reports?
Justin
 
Just add some package spec to Program Units and declare some variable in it.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top