Home » Developer & Programmer » Forms » Problem when closing the report in Oracle (10g Oracle Developer Suite, Windows XP)
Problem when closing the report in Oracle [message #360696] |
Sat, 22 November 2008 11:08  |
fran_azofeifa
Messages: 5 Registered: November 2008 Location: Costa Rica
|
Junior Member |
|
|
Hello.
First of all, sorry if I make some mistakes in my English but I am just learning it. I will try to be as clear as possible.
Recently I implemented reports to be called from Oracle Forms. My code is similar to this:
declare
report_id Report_Object;
ReportServerJob VARCHAR2(100);
v_rep VARCHAR2(100);
rep_status VARCHAR2(100);
pl_id ParamList;
hidden_action VARCHAR2(200);
v_formato varchar2(4);
vnOpcion number;
BEGIN
pl_id:=get_parameter_list('Lista');
if not id_null(pl_id) then
destroy_parameter_list(pl_id);
end if;
pl_id := Create_Parameter_List('Lista');
hidden_action := get_application_property(username)||'/'||get_application_property(password)||'@'||get_application_property(connect_string);
Add_Parameter(pl_id,'ORACLE_SHUTDOWN',text_parameter,'yes');
Add_Parameter(pl_id, 'pvpaycode', TEXT_PARAMETER, :BLK_DATOSCONSULTAS.TXT_PAGADOR);
Add_Parameter(pl_id, 'pvcompanyid', TEXT_PARAMETER, :GLOBAL.gvCodigoEmpresa);
Add_Parameter(pl_id, 'pdstartdate', TEXT_PARAMETER,to_char(:BLK_DATOSCONSULTAS.TXT_INITIALDATE,'dd/mm/yyyy'));
Add_Parameter(pl_id, 'pdenddate', TEXT_PARAMETER,to_char(:BLK_DATOSCONSULTAS.TXT_FINALDATE,'dd/mm/yyyy'));
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'userid', TEXT_PARAMETER, hidden_action);
report_id:= find_report_object('repdocumentosdescontadosxcte');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,:GLOBAL.gvReportPath || 'myreport.rdf');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,'rwbuilder');
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE, RUNTIME);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE, ASYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESFORMAT,:BLK_BASE.RDG_FORMATO);
v_rep:=run_report_object(report_id,pl_id);
rep_status := report_object_status(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
rep_status := report_object_status(v_rep);
END LOOP;
if rep_status = 'FINISHED' then
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1),'_blank');
Else
message('error executing query');
end if;
destroy_parameter_list(pl_id);
END;
This code works fine. The problem I have is that when I close the report (clicking the 'cross' of the browser, in order to close it), it seems that Oracle Forms frezzes; it lasts some seconds to recover and then, all returns ok. So, I would like to know, if that could happend because there is a special link to Reports from Forms, that may cause this.
Any comments would be appreciatted...
Francisco Azofeifa.
|
|
|
|
Re: Problem when closing the report in Oracle [message #360933 is a reply to message #360779] |
Mon, 24 November 2008 07:04   |
fran_azofeifa
Messages: 5 Registered: November 2008 Location: Costa Rica
|
Junior Member |
|
|
Hello, David. Thank you for your answer.
If I delete the 'run_report_object', I would need to show the parameters at the URL and that is what we do not want to.
I am going to investigate at Internet if I could hide the parameters in another way, but if you have another idea, it would be very appreciatted.
Thank you!
|
|
|
Re: Problem when closing the report in Oracle [message #360978 is a reply to message #360779] |
Mon, 24 November 2008 09:08   |
fran_azofeifa
Messages: 5 Registered: November 2008 Location: Costa Rica
|
Junior Member |
|
|
Sr David.
I found you suggested to eliminate "run_report_object" line from codes, in older forum posts.
Also, I found you suggested to check some other entries, so, I am going to check them and if there is something I do not understand, I will contact you.
By the moment, and in order not to generate some questions you have already answered to other people, do not answer until I will contact you again...;
Thank you!.
|
|
|
|
Re: Problem when closing the report in Oracle [message #361252 is a reply to message #360696] |
Tue, 25 November 2008 09:40   |
fran_azofeifa
Messages: 5 Registered: November 2008 Location: Costa Rica
|
Junior Member |
|
|
O.K. So, here I am going again...jejeje.
I reviewed the links you have suggestted to me but I think that maybe, that kind of solution does not apply for me. I will write why.
I am not sure that using hide_OBR_PARAMS would be a good solution in my case, because this command offers an almost impossible chance to the user to modify that parameter at the registry. You would think: "but, an ordinary user, would never be able to modify that information"; I know, that perhaps, using that comand and setting it to false, would solve the problem about hiding the parameters, but I do not want to play any chance. The information that appears at the URL, definitly can not be displayed. I am not talking simply about hidding user and password; I need to hide other parameters. I found also, that if I write into a .dat file at the configuration (I forgot the name of the file), the user and password, the problem about hidding parameters would be solved too. But, that's not a good solution for me neither.
So, about my original question: yesterday I noticed something. If I have opened another web page, and I run Oracle Forms and run the report from it, I can close the report without any problems. But, if I close all the opened browsers, and I run Oracle Forms to call the report, and then I close the browser that is when the delay appears. Also, I am using Firefox.
"Last new:". Today, I have configurated Firefox that when an URL is going to be opened, to do it in a new window. And the problem seems to be solved.
I have another question. You have suggested at other pages not to use 'run_report_object', although it is a valid Oracle command, and at other forums or posts, people recommends to use it. But I have not found any reason about why not. Personally, I think it is great command, because it let us (the developers) to work with parameters, using 'Create_Parameter_list' line, ataching the parameters to the report using 'Add_Parameter' and to avoid that those parameters appear at the URL without modifying the registry or to write some parameters information in a .dat file.
But, of course, I can not ignore at all your suggestion, and in fact, I am very pleasured you have take a few minutes to read my posts and to answered them. I am very interested why do you suggest not to use that command; if it is for a personal experience, or performance or anything else. I do not have any technical reason that I could find at Internet about some disadvantages about using it.
So, when you have a chance, tell me. I would like to know what kind of experience have you had with 'run_report_object'.
Regards,
Francisco Azofeifa.
|
|
|
|
|
Re: Problem when closing the report in Oracle [message #361534 is a reply to message #360696] |
Wed, 26 November 2008 16:43   |
fran_azofeifa
Messages: 5 Registered: November 2008 Location: Costa Rica
|
Junior Member |
|
|
Hello.
Well. In order to finish this thread, and to begin another one with a topic I will comment you at the end at this message (you seem to be the owner, because your posts are in almost all the questions), I can conclude the following:
1. I am going to try to implement web.showdocument line instead of all that code I wrote to. You convinced me that it is better solution than using mine's, since I had not analyzed the part of the loop, and the overhead in processing. You have good reasons to recommend that code.
2. When I implement that code on my program, I am going to post that solution to this forum, in order to post another resource for people who may have similar questions.
As you may have noticed, I am a newbie with Oracle. What I did, was to find a solution to run reports in Oracle, I found that code, I depured it and I implemented it. I did not analyzed performance topics.
You definetly gave me an important lesson, as a programmer, and is to try to analize the program's behavior.
So, that is what I am going to do. I am going to try to implement it, in order to get a better perfomance. If I have some new questions about that implementation, I will post them here, in this thread.
And, If you agree, or if there is not a thread about that, I would like to create a new one to discuss how could I implement the code you told me when you wrote that some companies prefer not to implement "web.showdocument" and "run_report_object". So, my main question in that case is: Is there another way to implement reports, without using 'run_report_object', and 'web.showdocument'?. Because what I am interested in, is not to implement the fastest way, or the easiest one. I would like to implement the best solution. So, if using a table, or using another command, is the best way, I am going to learn, and implement it, although I very new with Oracle.
The way that I would do it is to make a proposition of the solution, of course, with investment and searching or googling, and then, to write the solution here, and if you want to participate, and to help me, I would appreciate very much.
I like that you ask people to search, to investigate. "Follow the links...". That way or replying, I like it.
By the moment, I won't create that thread, until get your opinion.
Thank you...
Francisco Azofeifa.
|
|
|
Re: Problem when closing the report in Oracle [message #361560 is a reply to message #361534] |
Thu, 27 November 2008 00:20  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
The post I am looking for describes how to hide the 'address' bar on the browser. I think the post also describes how to hide all the menu bars and make it impossible for the user to do anything except use the Adobe print and save and close the window.
Concerning the idea of 'implement the best solution'. It is truly subjective as to what is 'best'. For me, if I am building a prototype then the faster way to write the code is 'best'. If the organisation has a 'standard method', then that approach is 'best'. If the report runs in a 'short time', then the method is 'good enough'
David
|
|
|
Goto Forum:
Current Time: Wed Mar 12 19:46:19 CDT 2025
|