Not able to pull Report from Forms on Web
Hi All,
I am trying to run a Report from a Form on the Web for the first time & it does not work giving an error that the parameter value I passed is invalid i.e.
REP-0091: Invalid value for parameter 'SORT_DIR'
I guess the problem is with the URL i am passing to the web.show_document function. The Reports work fine if use a report without any parameter form in the web.show_document function. I am using Forms/Reports 6i on 9iAS on IE5.5.
The code is as below:
PROCEDURE PRINT_log_by_entry_dt IS
pl_id ParamList;
V_user varchar2(30);
V_password varchar2(30);
V_database varchar2(30);
V_pl_id varchar2(2000);
BEGIN
pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'Claim_serial_Number',TEXT_PARAMETER,
to_char(:CLM.CLM_SER_NUM));
Add_Parameter(pl_id,'INCURRED_DIVISION',TEXT_PARAMETER,:CLM.INCRD_DIV);
Add_Parameter(pl_id,'EMPLOYEE_CODE',TEXT_PARAMETER,NVL(:CLM.W_CLM_EMP_CD,'%'));
Add_Parameter(pl_id,'DATE_START',TEXT_PARAMETER,
NVL(TO_CHAR(:CLM.W_DT_START, 'MM/DD/YYYY'), '01/01/1930'));
Add_Parameter(pl_id,'DATE_END',TEXT_PARAMETER,
NVL(TO_CHAR(:CLM.W_DT_END, 'MM/DD/YYYY'), '01/01/2099'));
Add_Parameter(pl_id,'TOPIC',TEXT_PARAMETER,NVL(:CLM.W_CHRNL_REC_CD,'%'));
Add_Parameter(pl_id,'SORT_DIR',TEXT_PARAMETER,NVL(:CLM.W_SORT_ORDER,'ASC'));
V_user := Get_application_property (USERNAME);
V_password := Get_application_property (PASSWORD);
V_database := Get_application_property (CONNECT_STRING);
V_pl_id :='Claim_serial_Number='||to_char(:CLM.CLM_SER_NUM)||
'&INCURRED_DIVISION='||:CLM.INCRD_DIV||'&EMPLOYEE_CODE='||:CLM.W_CLM_EMP_CD
||'&DATE_START='||NVL(TO_CHAR(:CLM.W_DT_START, 'MM/DD/YYYY'), '01/01/1930')
||'&DATE_END='||NVL(TO_CHAR(:CLM.W_DT_END, 'MM/DD/YYYY'), '01/01/2099')
||'&TOPIC='||:CLM.W_CHRNL_REC_CD||'&SORT_DIR='||NVL(:CLM.W_SORT_ORDER,'ASC');
IF Get_Application_Property (USER_INTERFACE) = 'WEB' THEN
Web.Show_Document(http://web.testserver.com/dev60cgi/RWCGI60.EXE?
report='rclug005.rdf ||'&'||V_pl_id||'& '||userid='||V_user||'/'||V_password
||'@'||v_database||+ destype=cache + desformat=html,'_blank');
ELSE
Run_Product(REPORTS,'rclug005',SYNCHRONOUS,RUNTIME,FILESYSTEM, pl_id, NULL);
END IF;
End;
The URL comes out like this
http://web.testserver.com/dev60cgi/RWCGI60.EXE?report=rclug005.rdf&Claim_serial_Number=2007451&INCURRED_DIVISION=11&EMPLOYEE_CODE=&DATE_START=01/01/1930&DATE_END=01/01/2099&TOPIC=&SORT_DIR=ASC+userid=scott/tiger@test+desformat=html+destype=cache
Any help would be appreciated. Thanks