Run Report with parameter [message #401517] |
Tue, 05 May 2009 06:09 |
shahzaib_4vip@hotmail.com
Messages: 410 Registered: December 2008 Location: karachi
|
Senior Member |
|
|
Att All
I create a simple report
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 #401528 is a reply to message #401517] |
Tue, 05 May 2009 06:38 |
shahzaib_4vip@hotmail.com
Messages: 410 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
|
|
|
|