Home » Developer & Programmer » Forms » Run Report with parameter (Developer 6I Database 10g Window XP)
Run Report with parameter [message #401517] Tue, 05 May 2009 06:09 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Att All


I create a simple report

select * from emp


i have a form and the 2 text box i need to run report from form where hiredate between text_box1 and text_box2


Some one give me this trigger

   Declare
      v_id paramlist ; 
   Begin
      commit_form ;
      v_id := Get_Parameter_List('mylist');
      If NOt Id_Null(v_id) Then
         Destroy_Parameter_List('mylist');
      End If ;
      v_id := Create_Parameter_List('mylist');
      Add_Parameter('mylist' , 'DATE1' , TEXT_PARAMETER , to_char(:dateclear.Date1,'ddmmyyyy'));
      Add_Parameter('mylist' , 'DATE2' , TEXT_PARAMETER , to_char(:dateclear.Date2,'ddmmyyyy'));
      Run_Product(REPORTS,'c:\temp\temp.rdf',ASYNCHRONOUS,RUNTIME,FILESYSTEM,'mylist');
         END ;


but what can i do with in report

its running report without the date which i am given in form


Regards


Shahzaib



Re: Run Report with parameter [message #401520 is a reply to message #401517] Tue, 05 May 2009 06:11 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
Have you added those two parameters to the report and changed the query to reference them?
Re: Run Report with parameter [message #401528 is a reply to message #401517] Tue, 05 May 2009 06:38 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks for your reply

Ya i add the two parameter in report i try this also

declare
	al_button number;	
	pl_id ParamList;

begin
	pl_id := Get_parameter_List('repPara'); --create a parameter list
	IF NOT Id_Null(pl_id) THEN 
		Destroy_parameter_List( pl_id ); 
	END IF; 
	
	pl_id := Create_parameter_List('repPara'); 
	Add_parameter(pl_id, 'PARAMFORM',TEXT_parameter, 'NO');
	Add_parameter(pl_id, 'datefrom',TEXT_parameter, :date1); --passing inv_no as parameter
	Add_parameter(pl_id, 'dateto',TEXT_parameter, :date2); --passing inv_date as parameter
	
	Run_Product(REPORTS, 'c:\temp\temp', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
end;



and give the reference in report

select * from emp where hiredate between :Datefrom and
:Dateto


but when i insert date in date1 and date2 text item its show all the report not the particular date record

i need particular date record


Regards shahzaib
Re: Run Report with parameter [message #401530 is a reply to message #401517] Tue, 05 May 2009 06:43 Go to previous message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Done it

Silly mistake


In report--->tool---->preference---->Runtime setting----> Check on Parameter Form


Any way


Thank you very much for your reply

Cookie Monster


Regards


Shahzaib Ismail

Previous Topic: Alternative for varchar2?
Next Topic: Sequences Numbers
Goto Forum:
  


Current Time: Thu Dec 08 02:13:16 CST 2016

Total time taken to generate the page: 0.18951 seconds