Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports verses Forms

Status
Not open for further replies.

Kido

Programmer
Dec 10, 2001
29
KE
Hi there any one with a solution?
I am trying to run a report in forms but seems like it's not working when I pass parameters in the form.
When I run the report in forms without passing the parameters, it is working well and of course it is opening the parameter form for me to input the parameters and when I input the parameters, it is working fine. BUT when I try to pass the parameters in the form, the report does not open and I do not get any error at all. WHAT COULD BE THE PROBLEM?
 
Hi there any one with a solution?
I am trying to run a report in forms but seems like it's not working when I pass parameters in the form.
When I run the report in forms without passing the parameters, it is working well and of course it is opening the parameter form for me to input the parameters and when I input the parameters, it is working fine. BUT when I try to pass the parameters in the form, the report does not open and I do not get any error at all. WHAT COULD BE THE PROBLEM?


Here's the code in the form:
PROCEDURE dispal_tenders_report IS

ls_title Varchar2(200);
ls_fuel_desc Varchar2(30);
ls_fuel_id Varchar2(30);
ls_stat_desc Varchar2(30);
ls_stat_id Varchar2(30);
pl_id paramList;
ls_tend_id Varchar2(30);

BEGIN

Select disp_desc
into ls_fuel_desc
from fms.c_application
where code = :db_dropdown.fuel_id;

Select disp_desc
into ls_stat_desc
from fms.c_application
where code = :db_dropdown.stat_id;

Select tend_id
into ls_tend_id
from fms.at_tender
where tend_id = :parameter.p_tend_id
and stat_id = :parameter.p_station;

ls_title := 'TENDER DETAILS FOR TENDER No. '||upper:)parameter.p_tend_id)||' ('||upper(ls_fuel_desc)||') IN '||upper(ls_stat_desc);


pl_id := get_parameter_list('report_params');
if not id_null(pl_id) then
Destroy_Parameter_List( pl_id );
end if;
pl_id := Create_Parameter_List('report_params');
set_application_property(plsql_date_format, 'DD-MON-YYYY');
Add_Parameter(pl_id, 'ORACLE_SHUTDOWN', text_parameter,'Yes');
Add_Parameter(pl_id, 'PARAMFORM', text_parameter,'No');

Add_Parameter(pl_id, 'p_stat_id', text_parameter, ''''||:parameter.p_stat_id||'''');
Add_Parameter(pl_id, 'p_fuel_id', text_parameter, ''''||:parameter.p_fuel_id||'''');
Add_Parameter(pl_id, 'p_tend_id', text_parameter, ''''||:parameter.p_tend_id||'''');


Add_Parameter(pl_id, 'p_title', text_parameter, ls_title);
Run_product(reports , 'e_tender_report.rep', asynchronous , runtime , filesystem, pl_id, null);
set_application_property(cursor_style, 'DEFAULT');
exception when others then
message(sqlerrm);
END;



 
Maybe you can try

1. to remove
Add_Parameter(pl_id, 'ORACLE_SHUTDOWN', text_parameter,'Yes');

2. and also put messages for checking values of parameters

Add_Parameter(pl_id, 'p_stat_id', text_parameter, ''''||:parameter.p_stat_id||'''');

message:)parameter.p_stat_id);
pause;

Add_Parameter(pl_id, 'p_fuel_id', text_parameter, ''''||:parameter.p_fuel_id||'''');

message:)parameter.p_fuel_id);
pause;

Add_Parameter(pl_id, 'p_tend_id', text_parameter, ''''||:parameter.p_tend_id||'''');

message:)parameter.p_tend_id);
pause;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top