Home » Developer & Programmer » Forms » How to pass parameters from form to report? (oracle 9i, form6i)
How to pass parameters from form to report? [message #335863] Thu, 24 July 2008 00:54 Go to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Hi
I want to pass parameters from form to reports.


Kanish

Re: How to pass parameters from form to report? [message #335906 is a reply to message #335863] Thu, 24 July 2008 02:38 Go to previous messageGo to next message
gurupatham
Messages: 66
Registered: March 2008
Location: Chennai
Member
we Can pass parameters value through paramlist.
I given sample code to pass parameter value to reports
where P_Code1 and p_code2 are parameters.
In reports, just create a user parameters with the name of p_code1 and p_code2 and use it as :P_code1 and :P_code2.

declare
	pl_id paramlist;
	pl_name varchar2(10) := 'Test';
begin
	pl_id :=  Get_parameter_list(pl_name);
	
	IF not id_null(pl_id) then
		destroy_parameter_List(pl_id);
	end if;
	
	pl_id := create_parameter_list(pl_name);
	
	Add_parameter(pl_id , 'DESFORMAT' , TEXT_PARAMETER , 'PDF');
	Add_parameter(pl_id , 'PARAMFORM' , text_parameter , 'NO');
	Add_parameter(pl_id , 'P_CODE1', TEXT_PARAMETER , 'INDIA');
	Add_parameter(pl_id , 'P_CODE2', TEXT_PARAMETER , 'CHINA');
	
	Run_Product(REPORTS,'RPT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
	
	end;
Re: How to pass parameters from form to report? [message #335934 is a reply to message #335863] Thu, 24 July 2008 03:31 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

hi

Thanks guru

kanish
Re: How to pass parameters from form to report? [message #336336 is a reply to message #335863] Fri, 25 July 2008 14:26 Go to previous messageGo to next message
amdabd
Messages: 91
Registered: November 2007
Location: My Computer
Member
hi,
how could I use this method in Oracle10g

I try to merge your code
declare
   pl_id paramlist;
   pl_name varchar2(10) := 'Test';
begin
   pl_id :=  Get_parameter_list(pl_name);
   IF not id_null(pl_id) then
   destroy_parameter_List(pl_id);
   end if;
   pl_id := create_parameter_list(pl_name);
   Add_parameter(pl_id , 'DESFORMAT' , TEXT_PARAMETER , 'PDF');
   Add_parameter(pl_id , 'PARAMFORM' , text_parameter , 'NO');
   Add_parameter(pl_id , 'P_CODE1', TEXT_PARAMETER , 'INDIA');
   Add_parameter(pl_id , 'P_CODE2', TEXT_PARAMETER , 'CHINA');
   Run_Product(REPORTS,'RPT_NAME', ASYNCHRONOUS,
   RUNTIME, FILESYSTEM, pl_id, NULL);
end;

with the code I use to call report (follow the link please) http://www.orafaq.com/forum/t/122318/0/,
but give FRM-41214: Unable to run report
could you help me , please?
Re: How to pass parameters from form to report? [message #336512 is a reply to message #336336] Sun, 27 July 2008 23:53 Go to previous messageGo to next message
gurupatham
Messages: 66
Registered: March 2008
Location: Chennai
Member
Check the report server whether it is running or not.
Re: How to pass parameters from form to report? [message #339241 is a reply to message #336336] Thu, 07 August 2008 02:28 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use 'web.show_document'.

David
Previous Topic: Stop End User to enter '?' character in text item
Next Topic: FRM-40403 DATABASE APPLY COMPLETE: 2 RECORDS APPLIED"
Goto Forum:
  


Current Time: Sun Feb 09 07:12:45 CST 2025