Reports 2.5 dynaic param-list.

From: Wernberg-Tougaard <Christian.H.wernberg-Tougaard_at_uvm.dk*NO_SPAM*>
Date: 4 Nov 1998 10:54:14 GMT
Message-ID: <01be07e1$a46570a0$100514ac_at_chwer1.uvm.dk>



In a REPORT 2.5 report I want a param-list to be contingent upon the choice of an other parameter. Any suggestions?

My idear is to use a intertemporal table that stores the possible parameters that are contingent upon the first parameter choice. Eg. first you pick the name of the institution (ins_nr) then a validate trigger using a cursor fills the temp table (AREAL_TEMPREP) with the contingent numbers.

But the problem is that the ins_nr validation trigger dosn't fire until
"RUN REPORT" and hence the true contingent parameters aren't presented in
the dropdown list.

Well, here's the trigger:

function INS_NRValidTrigger return boolean is cursor c is
 select bd_løbenr from ejendomsoplysninger_s where institutionsnummer = :ins_nr;
nr number(8);
begin
  open c;
  srw.do_sql('DELETE AREAL_TEMPREP');
  loop
   fetch c into nr;
   if C%NOTFOUND then exit; end if;
   srw.do_sql('INSERT INTO AREAL_TEMPREP (stud) VALUES ('||to_char(nr)||')');
  end loop;
  srw.do_sql('COMMIT');
  return(true);
end;

-- 
Christian Wernberg-Tougaard
Political Economist
Danish Ministry of Research and Information Technology, Building Society
Please remove *NO_SPAM* if e-mailing me.

"The views expressed are the author's and do not necessarily reflect the
official position of the Danish Ministry of Research and Information Technology"
Received on Wed Nov 04 1998 - 11:54:14 CET

Original text of this message