Re: Problem with web reports !

From: tom <tomdh_at_company.be>
Date: 27 Mar 2002 02:06:18 -0800
Message-ID: <a9a9ac7e.0203270206.52644b95_at_posting.google.com>


I found the solutions myself now.
Now i use this to let it work.

DECLARE

	uif VARCHAR(80);
	report_id REPORT_OBJECT;
	v_rep  VARCHAR2(100);
	v_instr number;
	v_last_query varchar2(2000);

BEGIN
	uif:=Get_Application_property(USER_INTERFACE);
	v_last_query := get_block_property('JOBS',last_query);
	v_instr := instr(v_last_query,'WHERE')+6;
	if v_instr = 6 then
		v_last_query := '1=1';
	else 
		v_last_query := substr(v_last_query,v_instr);
	end if;
 if uif = 'WEB' then
		Host('rwrun60 userid=tom/tom_educ_at_educ batch=yes report=Job_History.rep'
		     || ' destype=file desname=/tmp/HETBESTAND.html desformat=html paramform=no'
		     || ' errfile=/tmp/rwrun60.$$.erf'
		     || ' p_query="' || v_last_query || '"'
		     || ' >/tmp/rwrun60.$$.out 2>/tmp/rwrun60.$$.err'
		    );
    Web.Show_Document('/dev60temp/HETBESTAND.html','_blank');
	else
		report_id := FIND_REPORT_OBJECT ('Job_History');
		v_rep := RUN_REPORT_OBJECT(report_id);
	end if;

END; tomdh_at_company.be (tom) wrote in message news:<a9a9ac7e.0203190146.235fc388_at_posting.google.com>...
> I have oracle 9i installed on a linux server and i'm working with
> forms builder 6i.
> I'm running my forms as a web based form.
> Now i want to run a report when i click on a button and use the data
> from the form. In windows, without using web based forms it works.
> But it doesn't work as web based. It gives 4 errors about not finding
> my id.
> This is the code i use:
>
> DECLARE
> uif VARCHAR(80);
> repid REPORT_OBJECT;
> v_rep VARCHAR2(100);
> pl_id Paramlist;
> report_id Report_Object;
> report_job_id VARCHAR2(200);
>
> BEGIN
> uif:=Get_Application_property(USER_INTERFACE);
> if uif = 'WEB' then
> report_id:= FIND_REPORT_OBJECT('JOB_REPORT');
> SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE,'batch');
> SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,'file');
> SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESNAME,'c:\temp\HETBESTAND.html');
> SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,'html');
> Web.Show_Document('http://oracy:7777/dev60temp/HETBESTAND.html','_blank');
> else
> repid := find_report_object('JOB_HISTORY');
> v_rep := RUN_REPORT_OBJECT(repid);
> end if;
> END;
>
> It seems from the errors i get he can't find my report_id.
> I hope someone can help me with this
>
> Thx
Received on Wed Mar 27 2002 - 11:06:18 CET

Original text of this message