Hi Kalpataru
Thanks for sending a sample but it didn't work , then again in the similar way created a test form , created a test.rdf report file with bankcode and bankname as fields to check .
When run from report builder its working but when tried calling from form , it didn't work it gives a error message as
FRM-41214 Unable to run report
Then I opened the report in report builder and run the report as - (run paper layout) , It worked fine but when I run the report (run web layout) it shows a error message
Rep-58100: an error occurred starting the internal Web server at port $$self.ohsp port$$, Error : java.lang.number formatexception : for input string . "self.ohs.port$$".
If same report I am running from Web Browser as below given URL its working fine .
http://sanjay:9002/reports/rwservlet?report=c:\erp\test.rdf&userid=erp/erp@erp&destype=cache&desformat=pdf& paramform=no
declare
xpath varchar2(45);
PARALIST paramlist;
rep_id report_object;
v_rep varchar2(100);
v_report_server varchar2(100);
v_servlet_url varchar2(500);
v_job_id varchar2(100);
rep_status varchar2(100);
P_FILE_NAME varchar2(100);
begin
P_FILE_NAME:='C:\erp\'||'bank.PDF';
xpath:='c:\erp\';
xpath:=xpath||'test.rdf';
PARALIST := Get_Parameter_List('param_list_main');
IF id_null(paralist) THEN
PARALIST := CREATE_PARAMETER_LIST('param_list_main');
ELSE
Destroy_Parameter_List(paralist);
PARALIST := CREATE_PARAMETER_LIST('param_list_main');
END IF;
ADD_PARAMETER(PARALIST,'bankcode',TEXT_PARAMETER,To_Char(:bankcode));
v_report_server := 'rep_wls_reports_sanjay';
v_servlet_url := 'sanjay:9002/reports/rwservlet';
rep_id:=find_report_object('Report5');
set_report_object_property(rep_id,REPORT_SERVER,v_report_server);
set_report_object_property(rep_id,REPORT_EXECUTION_MODE,BATCH);
set_report_object_property(rep_id,REPORT_COMM_MODE,SYNCHRONOUS);
set_report_object_property(rep_id,REPORT_DESTYPE,FILE);
set_report_object_property(rep_id,REPORT_DESFORMAT,'PDF');
set_report_object_property(rep_id,REPORT_FILENAME,xpath); --Your reports file name with path goes here like you have xpath:=xpath||'PrintTran.rep'
set_report_object_property(rep_id,REPORT_DESNAME,P_FILE_NAME); --Your generated file name give appropriate file name according to yours.
v_rep:=run_report_object(rep_id,PARALIST);
rep_status := REPORT_OBJECT_STATUS(v_rep);
V_JOB_ID := SUBSTR(V_REP,INSTR(V_REP,'_',-1)+1);
IF rep_status = 'FINISHED' THEN
web.show_document('http://'||v_servlet_url||'/getjobid'||V_JOB_ID,'_blank');
END IF;
exception when no_data_found then
null;
end;