Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » saving report in client's machine (Oracle,10.1.2.0.2,Win2003 Server Sp2)
saving report in client's machine [message #424660] Mon, 05 October 2009 03:59 Go to next message
sd_md_rizwan@yahoo.com
Messages: 37
Registered: September 2007
Location: Saudi Arabia
Member

Hi this is Rizwan,

I am using

Windows 2003 Server with service pack 2,
Oracle Database 10.1.2.0.2
Oracle Developer 10.1.2.0.2
Webutil_106

I have a form which is running on the web and calling PDF reports with buttons one is for opening the report and the other for saving reports, when I open my form in a client pc I am able to open the PDF report by clicking the open button but when I click the save button it is not saving the report in client pc, the need of that button is to save the multiple reports at same time in client's pc, In my form I am also creating the directory
in client's pc using client_host command and also I am able to open that directory
this is my code

DECLARE
V_REPORT VARCHAR2(100);
PL_ID PARAMLIST;
VPATH VARCHAR2(100);
BEGIN
RMDIR;
MKDIR;
FOR MN IN (SELECT DISTINCT BR_NUM,SEX_CODE FROM EMP_FILE_DETAILS
WHERE MNTH_CODE = :CONT_BLOCK.MNTH_CODE
AND AREA_CODE = :CONT_BLOCK.AREA_CODE AND BR_NUM IN (1,2,3,4)
ORDER BY BR_NUM,SEX_CODE)

LOOP
PL_ID := GET_PARAMETER_LIST('TEMPDATA');
IF NOT ID_NULL(PL_ID) THEN
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
SET_REPORT_OBJECT_PROPERTY('NEW_MN_REP',REPORT_DESNAME,'C:\QUALITY_REPORTS\REP_OF_'||:CONT_BLOCK.MNTH_CODE||'-'||MN.BR_NUM||'-'||MN.S EX_CODE||'.PDF');
ADD_PARAMETER(PL_ID,'PMNTH_CODE',TEXT_PARAMETER,:CONT_BLOCK.MNTH_CODE);
ADD_PARAMETER(PL_ID,'PBR_NUM',TEXT_PARAMETER,MN.BR_NUM);
ADD_PARAMETER(PL_ID,'PSEX_CODE',TEXT_PARAMETER,MN.SEX_CODE);
V_REPORT := RUN_REPORT_OBJECT('NEW_MN_REP',PL_ID);
:CONT_BLOCK.STATUS := ('MNTH_CODE = '||:CONT_BLOCK.MNTH_CODE||' -BR_NUM = '||MN.BR_NUM||' - SEX_CODE = '||MN.SEX_CODE);
SYNCHRONIZE;
END LOOP;
OPEN_DIR;
END;


I think I need to change something in this line

SET_REPORT_OBJECT_PROPERTY('NEW_MN_REP',REPORT_DESNAME,'C:\QUALITY_REPORTS\REP_OF_'||:CONT_BLOCK.MNTH_CODE||'-'||MN.BR_NUM||'-'||MN.S EX_CODE||'.PDF');

To get the client pc's path
Can anybody help me out of this as soon as possible

Thanks.
Re: saving report in client's machine [message #424726 is a reply to message #424660] Mon, 05 October 2009 10:39 Go to previous messageGo to next message
dlwixon
Messages: 92
Registered: September 2008
Member
You might want to try using web.show_document() instead of RUN_REPORT_OBJECT.

Re: saving report in client's machine [message #424733 is a reply to message #424726] Mon, 05 October 2009 12:56 Go to previous messageGo to next message
sd_md_rizwan@yahoo.com
Messages: 37
Registered: September 2007
Location: Saudi Arabia
Member

Dear Dlwixon,
Thanks for the reply,
can you please give a sample code which clearly shows all the required things to save a report in client's pc

Re: saving report in client's machine [message #424750 is a reply to message #424733] Mon, 05 October 2009 15:23 Go to previous messageGo to next message
joy_division
Messages: 4616
Registered: February 2005
Location: East Coast USA
Senior Member
Can you now just type web.show_document into google.com and do it yourself?
Re: saving report in client's machine [message #424785 is a reply to message #424750] Tue, 06 October 2009 00:42 Go to previous messageGo to next message
sd_md_rizwan@yahoo.com
Messages: 37
Registered: September 2007
Location: Saudi Arabia
Member

Dear Joy_division,
Thanks for reply, I checked in google for web.show_document
all I understand is it needs url and target to display the report
and I am already using it in my forms display report button,
my issue is I have a button from where I want to save multiple reports into the client root directory just in one click and for that I have written the code which I already posted, can you please help me in that
Re: saving report in client's machine [message #424942 is a reply to message #424785] Tue, 06 October 2009 11:32 Go to previous messageGo to next message
dlwixon
Messages: 92
Registered: September 2008
Member
I think you'd need to use webutil for that kind of functionality.
Re: saving report in client's machine [message #429997 is a reply to message #424660] Fri, 06 November 2009 14:26 Go to previous message
dlwixon
Messages: 92
Registered: September 2008
Member
1) Use web.show_document() to write the report to the app server

2) Use webutil_file_transfer.is_as_readable to make sure the report is readable

3) If the report is readable then use webutil_file_transfer.as_to_client to transfer the report from the app server to the client machine.

[Updated on: Fri, 06 November 2009 15:18]

Report message to a moderator

Previous Topic: AS Reports Server Configuration
Next Topic: passing parameter portal.wwctx_api.GET_user
Goto Forum:
  


Current Time: Mon Sep 26 14:36:48 CDT 2016

Total time taken to generate the page: 0.12587 seconds