Home » Developer & Programmer » Forms » Problem in Calling Report
Problem in Calling Report [message #299700] Wed, 13 February 2008 00:01 Go to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Hello all,

I am converting from 6i to 10g. I have problem in One form which is calling a report.
First of all I used forms Migration assistant to upgrade the form. It mades some changes in form like(Run_Product to RR2RRO)
also one Pll files.
When I run this form it doesn't show any form.
Please Help me...


Re: Problem in Calling Report [message #299701 is a reply to message #299700] Wed, 13 February 2008 00:02 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do you get any error messages?

Search this forum for 'web.show_document' and change your report call to use this command.

David
Re: Problem in Calling Report [message #299711 is a reply to message #299701] Wed, 13 February 2008 00:21 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
i am using RP2RRO.RP2RRO_RUN_PRODUCT(REPORT,report_name,SYNCHRONOUS,RUNTIME,FILESYSTEM,Para_list,NULL). i got execption on this line.
Re: Problem in Calling Report [message #299712 is a reply to message #299711] Wed, 13 February 2008 00:22 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Is it is necessary to use run_report_object instead of RP2RRO.RP2RRO_run_product()
Re: Problem in Calling Report [message #299722 is a reply to message #299712] Wed, 13 February 2008 00:39 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
how to start report server and from where i can get my report server name.pleas help me.........
Re: Problem in Calling Report [message #299768 is a reply to message #299701] Wed, 13 February 2008 02:47 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
i had used migration assistant to convert calling form to 10g.
due to this "run_product" is replaced with "rr2rpo.rr2rpo_run_product". a pll rr2rpo.pll also get attached. when i compile this pll i get an error "rw_server_queue must be declared".

then i deceided to do my work withouy migration assistant.
i had added following code.
*******************************************
reportserver := :parameter.reportserver;
report_id := find_report_object('rpt_name');


SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESFORMAT, 'pdf');
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_SERVER, reportserver);


ReportServerJob := run_report_object(report_id, p_rpt_param_list);
v_jobID := substr(ReportServerJob,length(reportserver)+2,length(ReportServerJob));

IF ReportServerJob is NOT NULL THEN
rep_status := report_object_status(ReportServerJob);

WHILE rep_status in ('RUNNING', 'OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(ReportServerJob);
END LOOP;
IF rep_status != 'FINISHED' THEN
raise report_not_generated;
END IF;


v_url := '/reports/rwservlet/getjobid'||v_jobID||'?server='||reportserver;


v_url2 := 'javascript:window.open("'||v_url ||'", "", "fullscreen=no,
titlebar=no, location=no, toolbar=no, menubar=no, status=no, resizable=yes");

-- "self.close" shown below is continued from the line above, carriage return

self.close()';

Web.Show_Document(v_url2,'_blank');
ELSE
raise report_not_generated;
END IF;
*********************************
i got following error:
"report_not_generated must be declared" and
"self.close(); must be declared"

what to do.
which method should i follow?????????
Re: Problem in Calling Report [message #299795 is a reply to message #299701] Wed, 13 February 2008 04:07 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
i have solved the last mentioned problem.program unit is compiled.
but i am still not getting the report as "report_id" is returning NULL.help to solve it out.
Re: Problem in Calling Report [message #299951 is a reply to message #299795] Wed, 13 February 2008 18:46 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I repeat:
Search this forum for 'web.show_document' and change your report call to use this command.

Remember that if you use 'web.show_document' you DO NOT have to manually start the report server as it will be started AUTOMATICALLY.

David

Re: Problem in Calling Report [message #299975 is a reply to message #299951] Wed, 13 February 2008 22:18 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Hello sir,

well I had already used web.show_docment but still reports are not generated.
Is it necessary to change the parameters in the rwservlet.properties file such as reportserver & imageurl ?

Please reply..........
Re: Problem in Calling Report [message #299978 is a reply to message #299975] Wed, 13 February 2008 22:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please review the WORKING examples for 'web.show_document' that exist in this forum and compare to your code.

Also, when you have a problem with your code, post it so we can see it.

David
Re: Problem in Calling Report [message #300290 is a reply to message #299978] Thu, 14 February 2008 22:42 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Hello sir

I have create a one simpe report which runs from report builder on browser.
Now I attached that report to the forms in report attribute and call that report still its not displaying.

What should I do, please help me..........
Re: Problem in Calling Report [message #300558 is a reply to message #299978] Sat, 16 February 2008 00:43 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
now i am getting the job ids but at end the status is returned as TERMINATED_WITH_ERROR. please help me
Re: Problem in Calling Report [message #300591 is a reply to message #299978] Sat, 16 February 2008 05:57 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
i have successfully runthe report on browser.but still the query is not replaced and even parameters such as date are not visible.
please guide me how to pass data_parameter and text_parameter to reports in 10g.
Re: Problem in Calling Report [message #300703 is a reply to message #299978] Sun, 17 February 2008 22:09 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
i am using ADD_PARAMETER and .rep file for my report.reports are generated but they miss date_parameter and text_parameter.
i am using "ParaListID:=Create_parameter_list('paralist');"
but i am getting ParaListID as NULL.
what should i do??????????????

[Updated on: Sun, 17 February 2008 22:44]

Report message to a moderator

Re: Problem in Calling Report [message #300719 is a reply to message #300703] Sun, 17 February 2008 23:08 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
shekhar.salunkhe wrote on Sun, 17 February 2008 22:09

Hello David,
i am using ADD_PARAMETER and .rep file for my report.reports are generated but they miss data_parameter and text_parameter.
i am using "ParaListID:=Create_parameter_list('paralist');"
but i am not able to pass parameter to the report.
what should i do??????????????

[Updated on: Sun, 17 February 2008 23:38]

Report message to a moderator

Re: Problem in Calling Report [message #300735 is a reply to message #300719] Sun, 17 February 2008 23:47 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please list code.

David
Re: Problem in Calling Report [message #300755 is a reply to message #300735] Mon, 18 February 2008 00:50 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
here is the code to add parameter:

IF NOT Id_Null(ParaListID) then
Destroy_Parameter_List(ParaListID);
END IF;
ParaListID:= Create_Parameter_List ('ParaList);

reportserver := rep_hoserver;
report_id := find_report_object('Report87);

SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESFORMAT, 'pdf');
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_SERVER,reportserver );


Add_Parameter(ParaListID,'Repquery',DATA_PARAMETER,vRecGrpname);

Add_Parameter(ParaListID,'PupToDate',TEXT_PARAMETER,:Block.toDate);

ReportServerJob := run_report_object(report_id,ParaListID);
v_jobID := substr(ReportServerJob,length(reportserver)+2,length(ReportServerJob));

IF ReportServerJob is NOT NULL THEN
rep_status := report_object_status(ReportServerJob);

WHILE rep_status in ('RUNNING', 'OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(ReportServerJob);
END LOOP;
IF rep_status != 'FINISHED' THEN
raise report_not_generated;
END IF;

v_url := '/reports/rwservlet/getjobid'||v_jobID||'?server='||reportserver;

Web.Show_Document(v_url,'_blank');
ELSE
raise report_not_generated;
END IF;


Re: Problem in Calling Report [message #300787 is a reply to message #300755] Mon, 18 February 2008 02:29 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Hello Sir,

Actually I am getting problem with only following line:

Add_Parameter(ParaListID,'Repquery',DATA_PARAMETER,vRecGrpname);

Following line works fine:
Add_Parameter
(ParaListID,'Puptodate',TEXT_PARAMETER,:Block.todate);

I mean to say that Data parameter is giving problem not
text_parameter.

Please Help me..
Re: Problem in Calling Report [message #300955 is a reply to message #300787] Mon, 18 February 2008 17:58 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please look at http://www.orafaq.com/forum/mv/msg/97330/300757/67467/#msg_300757

When I ask for code to be posted, I want all the code, not just fragments. Also put it BETWEEN 'code' tags!!

What is 'vRecGrpname'? Where is it defined? Is its data type legal for this command?

David

[Updated on: Mon, 18 February 2008 17:58]

Report message to a moderator

Re: Problem in Calling Report [message #300991 is a reply to message #300955] Mon, 18 February 2008 22:50 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
sorry for inconvience.vRecGrpname is declared as varchar2 type variable which contain record group name.is there any to be done at report level.i have already used the name 'REPQUERY' which is used in form to pass data_parameter.

[Updated on: Mon, 18 February 2008 23:28]

Report message to a moderator

Re: Problem in Calling Report [message #300992 is a reply to message #300991] Mon, 18 February 2008 23:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please look at the sample code listed under 'add_parameter'. You have got the syntax of the statement wrong.

They should look like:
Add_Parameter(pl_id, 'number_of_copies', TEXT_PARAMETER, '19');
Add_Parameter(pl_id, 'dept_query', DATA_PARAMETER, 'dept_recordgroup');

David
Re: Problem in Calling Report [message #300998 is a reply to message #300992] Mon, 18 February 2008 23:31 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
whats wrong in it. i have passed the record group name in the variable vRecGroname which has data type varchar2.
Re: Problem in Calling Report [message #301003 is a reply to message #300998] Mon, 18 February 2008 23:55 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
How do I know! You haven't shown me the code that defines 'vRecGrpname' or told me its data type.

David
Previous Topic: How to view an image file in forms 10g
Next Topic: Date Function that return Next or Previous Year
Goto Forum:
  


Current Time: Fri Sep 27 10:33:18 CDT 2024