Calling a report from designer genareted form
i will appraciate if anyone can tell me how to create a form module that navigate to a report module in 9i designer.i tried action item but i receieved couple of different error messages.i have also tried to find information on this but i couldnt
thanks!
Okay, this is gonna be tricky to explain but lemme give it a shot:
I'm assuming that your Report is a Called Module inside your Form. This allowed you to create an Action Item that calls this Report upon pressing the provided button. Now, generate your Form and open the .FMB. Try to locate these two things:
1. The Report attached to your form, with the Designer-provided name "CG$OFG_REPORT", and
2. A Program Unit named "CGNV$AI_(name of action item)" (e.g., I named my action item "FAX" so the prog. unit is named "CGNV$AI_FAX").
If you dig into the Program Unit's code, you will find that it makes use of a procedure named "CGNV$INVOKE_REPORT" which resides in the standard, provided PL/SQL Library "OFGNAVL.PLL" . I looked for my Ofgnavl file and opened it up to inspect the CGNV$INVOKE_REPORT procedure. I found that it has been hard-coded to call the report "CGNV$OFG_REPORT", and not "CG$OFG_REPORT" !!! That's probably why your action item is failing.
Inspect the procedure a little further. There are about seven lines, one after another, that all invoke the SET_REPORT_OBJECT_PROPERTY built-in procedure, and then the RUN_REPORT_OBJECT immediately after. What I did was to copy this code, go all the way back to Designer (Design Editor), and build myself a procedure under my module's Application Logic, Named Routines which calls the correct report (I even varied this slightly by specifying the report by it's filename). I even added some code to put out some feedback (i.e., Message) to tell the user when the report has finished successfully.
To make a long story short, I wrote a procedure to invoke my report, and then I just created a button that calls the procedure when a user presses it.
Hope this helps. Feel free to email me if you need further guidance.
Carlos
Similar Messages
-
Calling a report from an existing form
hi all,
i am new to this forms and reports. i have created a report which gives information about an employee. and name it as activity report. i am using reports Report Builder 10.1.2.0.2. i have also created a form. my purpose is " i will enter the employee id, a starting and ending dates as input to the form. these values r to be passed to the query of the reports and the report has to extract the records of that employee between the start and end dates." how can i achieve this. i am entirely new to this reports and forms. please give me a clear reply so that i can call my report and pass that dates and id to my report. and also please explain me how to call a report from a form and make it to run. please make me clear where to write the code whether in forms or rports.
thank you.Hi,
Check this sample Code..
DECLARE
pl_id ParamList;
pl_name VARCHAR2(10) := 'repdata';
BEGIN
pl_id := Get_Parameter_List(pl_name);
IF Id_Null(pl_id) THEN
pl_id := Create_Parameter_List(pl_name);
Add_Parameter(pl_id, 'P_STARTDATE', TEXT_PARAMETER,:BLK_CTRL.P_TODATE);
Add_Parameter(pl_id, 'P_ENDDATE', TEXT_PARAMETER, :BLK_CTRL.P_CURRENCY);
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
ELSE
Destroy_Parameter_List( pl_id );
END IF
RUN_PRODUCT(REPORTS, 'D:\MMRROLDL.RDF' ,SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id ,NULL);
END; -
Calling a report from a web form & specifying PDF format
Has anyone been able to call a report from Oracle Forms (6i or 9i) in a web browser (i.e. by pressing a button or any other link)? We are having problems generating the report in PDF format when we web deployed our forms. In client server mode it works fine with the report deferring to PDF. But in the web browser it reverts to a messy HTML format with the columns being distorted. Running a standalone report from the web is no problem but when it is linked with a form it goes back to HTML. In the old forms (5.0) we used a function like run_product but I am not sure what the problem is in the new environment.
T.J.Hello,
According to the way the reports is launched, the format of the reports output depends on the
variables : FORMS60_REPFORMAT (for Forms 6.0 and 6i)
Two others variables are used : FORMS60_OUTPUT and FORMS60_MAPPING.
Can you check the variable FORMS60_REPFORMAT ?
regards Dennis:
Thanks for the info. Your suggestion of changing the windows registry setting FORMS60_REPFORMAT to 'PDF' worked! I did not have to make any other changes to the form. I left the run_product format as is in the form and it worked like a charm. When we eventually migrate to Oracle Reports/Forms 9i we will look into using run_report_object. But for now we will stick with Oracle Forms6i. There was no need to alter the other registry settings FORMS60_MAPPING and FORMS60_OUTPUT since I followed the instructions of setting the virtual directories (symbolic links) when I installed the forms and reports services.
Thanks again for your help!
T.J. -
Calling a Report from a Web Form
Hi,
I am calling a Report developed in report 6i from a Web form 6i
Button. I am unable to launch the Report if Report is using a
Customized Template. The report is able to launch if it has no
template or using the templates given in report wizard. Is there
any setting required in the Report Server for reading the
template file???Hello,
According to the way the reports is launched, the format of the reports output depends on the
variables : FORMS60_REPFORMAT (for Forms 6.0 and 6i)
Two others variables are used : FORMS60_OUTPUT and FORMS60_MAPPING.
Can you check the variable FORMS60_REPFORMAT ?
regards Dennis:
Thanks for the info. Your suggestion of changing the windows registry setting FORMS60_REPFORMAT to 'PDF' worked! I did not have to make any other changes to the form. I left the run_product format as is in the form and it worked like a charm. When we eventually migrate to Oracle Reports/Forms 9i we will look into using run_report_object. But for now we will stick with Oracle Forms6i. There was no need to alter the other registry settings FORMS60_MAPPING and FORMS60_OUTPUT since I followed the instructions of setting the virtual directories (symbolic links) when I installed the forms and reports services.
Thanks again for your help!
T.J. -
Call 10g report from 4.5 form
Hi everyone,
Can anyone please tell me, how can i call a 10g report from a 4.5 form? Which are the implications on both sides?
thanks in advance,
MC
Please, can anyone help me?All of these suggestions are limited because of the forms engine and plsql engine within forms. You will have to try them. And none of these configurations are supported by oracle.
Use the old run_product. You will have to install reports runtime on every client
RUN_PRODUCT(product, document, commmode, execmode, location,
list, display);Try to make a call to a package in the database that calls utl_http, which makes a call to your reports server via a url.
Maybe an OLE or VBX call out to IE?
All of these are stabs in the dark.
Try upgrading forms!!! -
CALL A REPORT FROM ORACLE 10G FORMS
HI,
I HAVE STARTED TO WORK WITH ORACLE DATABASE 11G AND DEVELOPER SUIT 10G.
I HAVE A REPORT THAT IT WORKS CORRECTLY WHEN I RUN IT FROM REPORT DEVELOPER.
BUT WHEN I WANT TO CALL IT FROM A FORM, IT DOESN'T WORK.
IN ORACLE DEVELOPER 6I, I USE "RUN_PRODUCT" COMMAND AND IT WORKS WELL ,BUT IN
DEVELOPER SUIT 10G I HAVE TO USE "RUN_REPORT_OBJECT" AND I DON'T KNOW HOW.
WHEN I COMPILE MY CODES THERE IS NO ERROR ,BUT WHEN I RUN IT, IT SHOWS ME SOME ERRORS .
THIS IS MY CODES FROM ORACLE HELP :
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('D:\TESTPROJ\REPORT1.JSP');
v_rep := RUN_REPORT_OBJECT(repid);
END;
IT SHOWS ME THIS ERROR : FRM-41219 .CANNOT FIND REPORT. INVALID ID.
AND THEN : FRM-40738. ARGUMENT 1 TO BUILTIN RUN_REPORT_OBJECT CANNOT BE NULL;
PLEASE HELP ME TO SOLVE THIS PROBLEM
THANKFUL
MAHSAManu,
I added my report to Form-Navigator and I changed it's name to REP1.
I added all you codes to When-Button-Press event like this :
DECLARE
RO_Report_ID REPORT_OBJECT;
Str_Report_Server_Job VARCHAR2(100);
Str_Job_ID VARCHAR2(100);
Str_URL VARCHAR2(100);
PL_ID PARAMLIST ;
BEGIN
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');
RO_Report_ID := FIND_REPORT_OBJECT('REP1'); -- This is my report's name in Form-Navigator. Is it correct to put it here ?
ADD_PARAMETER(PL_ID, 'P_SELECT_CITY', TEXT_PARAMETER, :CITY); --These are my parameter in REPORT and it's Value in my FORM*
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'D:\projects\PROJECT_OF_1388\TestOraDev10g\TEST_REP1');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'Rep_faraji'); -- as you said, I put my computer name after REP_ here
Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH('Rep_faraji') + 2, LENGTH(Str_Report_Server_Job)); -- as you said, I put my computer name after REP_ here
Str_URL := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=Rep_faraji'; -- as you said, I put my computer name after REP_ here
WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
DESTROY_PARAMETER_LIST(PL_ID);
END;
But it doesn't work again, And shows this error :
FRM-41213. unable to connect to the report server Rep_faraji
Edited by: user508902 on Mar 2, 2010 2:18 AM
Edited by: user508902 on Mar 2, 2010 2:20 AM -
Call Oracle Reports from Forms ver 9i or 10g
Hi,
Can somebody guide me, how to call Oracle Reports from the Oracle form 9i,
Run_product is no more available into 9i & 10g, Run_report_object is not working with out put type "Screen" or "preview".
What is the best way to call the reports from the form ??? pls help...
Thanks in avdance.
Jitesh ([email protected])You can use RUN_REPORT_OBJECT with CACHE type, and WEB.SHOW_DOCUMENT to view the document on the screen.
In the Forms help you should find examples.
If you have access to Metalink, have a look at Note:207396.1. -
How can we call a report from a form.
how can we call a report from an existing form.
Have you searched the Forms help system? It shows you how to use RUN_REPORT_OBJECT
-
HOW TO HIDE USERID PARAMETER, WHEN CALL REPORT FROM MENU USING FORM 10G
good morning colegas
i'm from panama
when i call a report from a oracle forms menu, its send a user, pass and bd in the url, i need to hide this parameter userid,
cuando llamo un reporte desde forms, se envia el usuario, pass y bd en el url nesesito ocultar estos parametros del url, le agradeceria si alguno tiene algun eejmplo q me de, de como ocultar estos parametros
i'm using oracle forms y report 10g
this is my msn [email protected]
slds desde panamathis document show us, only when i call a report from a forms, but not from a menu!
but to hide these parameters, i need to create a bean in a block a way and the menus do not allow me to create these objects
you done this before?
you have a example?
slds desde panama -
Hi Expert,
I want to call a report from a form.My problem scenario like, a user is login to his account and there is a option called ADMIT CARD(Push Button).Now when he pressed the button a report will generate.I want that when he pressed the button the user id of the user will passed to the report and the report will generate corresponding to his details which was stored in the database.This scenario is like any online admit card.
Suppose I want a details report of employee whose employee_id=100.How could I pass this value(employee id) to report which will generate a report details.
Thanks,
TAPAN
Message was edited by:
user630863Thanks for replying.
Actually I am a beginner.I think that I have to use RUN_REPORT_OBJECT built-in.But I cannot understand the parameterlist.Can u plz give me any example or code then I am very thankful.
Suppose I want a details report of employee whose employee_id=100.How could I pass this value(employee id) to report which will generate a report details.
Thanks,
TAPAN -
Calling a report from a form based on procedure
I created a form based on a procedure.
It is a entry form where the user is selecting or enters data then on submit I must display the report based on selected data.
I know I can simply create a report with all bind variable and do the job.
My question is what is the syntax to call the report from the procedure for the selected parameters values.
Thanks
LawrenceIf you want to display other HTML page after successful submission, you need to use
either go or call method.
I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
the deptno. Here is my on successfull submission code:
declare
l_dept number;
l_url varchar2(2000);
begin
l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='| |l_dept;
go(l_url);
end;
null -
Calling Report from Menu (Oracle Forms 10g)
We have the applications in Forms6i & Reports 6i (Client Server) and migrating to Forms 10g and Reports 10g. We have the menu, from that menu we are calling all the forms and Reports. For especially Reports earlier we user RUN_PRODUCT but now 10g it is not working. How can call the report using RUN_REPORT_OBJECT
Important things we have some dynamic parameters (input) to the each report. That means when i called the report from the menu i need to get first parameter form to take the parameters and then can be run the report.Here is the code to call report from menu in 10g
DECLARE
pl_id ParamList;
repid REPORT_OBJECT;
v_rep varchar2(100);
v_server VARCHAR2(100);
rep_status varchar2(100);
v_host VARCHAR2(100);
BEGIN
select rep_server into v_server from reports_data;
select machine into v_host from reports_data;
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,'P_C_CODE',TEXT_PARAMETER,:GLOBAL.COMPANY);
Add_Parameter(pl_id,'P_B_CODE',TEXT_PARAMETER,:GLOBAL.BRANCH);
repid := find_report_object('REPORTOBJ');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,getpath||'E_VOUCHER_ENTRY.RDF');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
v_rep := RUN_REPORT_OBJECT(repid, 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);
message('Running');
END LOOP;
IF rep_status = 'FINISHED' or rep_status is NULL THEN
--Display report in the browser
WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_blank');
ELSE
null;
END IF;
END; -
Hi,
I want to call a report from Form 6i at run time. And I write the following code in When Buttton Press trigger . when I press the button it will gives no response.
declare
x report_object;
y varchar2(100);
begin
x:=find_report_object('billform');
y:=run_report_object(x);
end;
for more information , path of my report is: C:\REP\billform.rdf
please send me the solution of this problem
E_mail: [email protected]
Shahzadhi,
now i am using the following code in when button press trigger. if u give me ur e_mail address i will send u FMB and RDF files used for Scott/tiger EMP table for the sample.
declare
repo_Para ParamList;
BEGIN
repo_Para:=Get_Parameter_List('Report_para');
IF not Id_null(repo_Para) THEN
destroy_parameter_list(repo_para);
end if;
repo_Para:=Create_Parameter_List('Report_para');
Add_Parameter(Repo_para,'PARAMFORM',TEXT_PARAMETER,'No');
Add_Parameter(Repo_para,'MAXIMIZE',TEXT_PARAMETER,'Yes');
Add_Parameter(Repo_para,'BDATE',TEXT_PARAMETER,:BLOCK3.a_dptno);
Add_Parameter(Repo_para,'EDATE',TEXT_PARAMETER,:BLOCK3.b_dptno);
RUN_PRODUCT(REPORTS,'c:\apu\DDATE.rep', SYNCHRONOUS,
runtime, FILESYSTEM,Repo_para,NULL);
end;
BDATE & EDATE are two user parameters created in report.
when i press the button in form pass parameters the report will be called but no data will be display but when i directly run reprot from report buider and pass same values of BDATE & EDATE it will show data.
please give me ur e mail address or help me for this problem
best regards,
shahzad -
I have uploaded my form to the app server and compiled to Linux. I have copied my RDF file to the reports_path/demo directory. I can run the report via a link from our portal using the URL as follows:
/reports/rwservlet?report=IndRpt.rdf&desformat=pdf&destype=cache&userid=' target="_blank"
That opens the report in a separate window, which is what we want. So far, so good.
I can run the form via a link from our portal as well using the URL as follows:
/forms/frmservlet?config=bsc_ind
The config section hides all the form parameters very nicely.
In the portal, I created a Report Server Access portlet, REP_OMHAST2_MIDTIER, and use the following set_report_object calls in my form:
repid := find_report_object('IndRep');
SET_REPORT_OBJECT_PROPERTYrepid,REPORT_EXECUTION_MODE,BATCH);
SET_REPORT_OBJECT_PROPERTYrepid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
SET_REPORT_OBJECT_PROPERTYrepid,REPORT_SERVER,'rep_omhast2_midtier');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,ls_param);
v_rep := RUN_REPORT_OBJECT(repid);
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
/*Display report in the browser*/
WEB.SHOW_DOCUMENT('http://omhast2.omh.state.ny.us:7777/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep_omhast2_midtier ','_blank');
All that comes right out of the white paper.
Now here's the weird part, I have never seen this before. When I click my "Show Report" button in my form, the report seems to be running, but then I get a very strange dark grey, square icon superimposed over my mouse pointer. The icon has a small yellow "starburst" pattern with a tiny red exclamation point inside. The report does not appear on screen.
Incidentally, all of this works correctly when I run the same scenario on my workstation using the call to rwserver as: rwserver server=rep_omhast2_midtier. But when we port it to the app server, it does not run. I think it has to be in the way the form calls the report because the report will run as a stand-alone object.
Anything apparent to anyone out there?Well, it looks like I stumped the band. And with good reason. Sorry for the error. The problem was that the user running the form and the report had a pop-up blocker that was blocking the report. The form and the report ran from another machine. I allowed pop-ups from the report's URL and that enabled the report to appear.
So, here we have another example of how to call a report from a form. Again, I am sorry for any angst this may have caused. -
CALLING A REPORT FROM FORMS (PROBLEM)
MY PROBLEM IS THE NEXT:
I CREATED A MASTER-DETAIL REPORT CALLING 'ASUNTOS'WITH THE NEXT QUERY:
SELECT ABOGADOS.APELLIDO_P,ABOGADOS.APELLIDO_M,ABOGADOS.NOMBRES,
ASUNTOS.EXP_INT,ASUNTOS.MATERIA,ASUNTOS.GERENCIA,
ASUNTOS.EMPRESA,ASUNTOS.RECLAMA,ASUNTOS.PESOS,
ASUNTOS.DOLARES
FROM ABOGADOS,ASUNTOS
WHERE ABOGADOS.FICHA = ASUNTOS.F_ABOG
AND ASUNTOS.F_ABOG = :ABOGADO ;
-- ABOGADO = PARAMETER.
THIS REPORT WORKS FINE THE PROBLEM IS WHEN I TRY CALL THIS REPORT FROM FORM I'VE USE A BUTTON(WHEN_BUTTON_PRESSED) WITH THE NEXT CODE:
DECLARE
LISTA PARAMLIST := GET_PARAMETER_LIST('ABOG');
BEGIN
IF ID_NULL(LISTA) THEN
LISTA := CREATE_PARAMETER_LIST('ABOG');
ADD_PARAMETER(LISTA,'DESTYPE',TEXT_PARAMETER,'PRINTER');
ADD_PARAMETER(LISTA,'DESNAME',TEXT_PARAMETER,'LPT2');
ADD_PARAMETER(LISTA,'ABOGADO',TEXT_PARAMETER,TO_CHAR(:ASUNTOS.F_ABOG));
-- ADD_PARAMETER(LISTA,'PARAMFORM',TEXT_PARAMETER,'YES');
END IF;
RUN_PRODUCT(REPORTS,'ASUNTOS',SYNCHRONOUS,RUNTIME,FILESYSTEM,LISTA,NULL);
END;
BUT THE REPORT NOTHING DISPLAY.
THERE ARE SOMETHING WRONG WITH THE CODE IN THE BUTTONRoberto,
Does your report work when it is not called from Forms?
try the following:
[TOOLS_HOME]\BIN\RWRUN60 module=ASUNTOS destype=screen userid=<username>/<password>@<tns> ABOGADO=<some_valid_code>
where TOOLS_HOME is the directory where Reports is installed.
I can see nothing wrong with your code.
Maybe some error in the query?
Also, I would check for the existence of multiple ASUNTOS report definitions. Maybe Forms is calling an older one.
Hope this helps,
Pedro das Neves
([email protected])
Maybe you are looking for
-
Product allocation not working even after complete setup at sales order lvl
Hi All, I have setup product allocation as detailed in forum earlier links, still I am not gettin sales order to use ATP with product allocation. I have tried with S140 and S700 with no success. Already went thru all the steps starting with OVZ* tcod
-
It was s crathed in 3 days by being in my pocket like Stevie did in his keynote. Now I am s ad. J
-
Delivery Date Monitor Against Purchase Order Delivery Date.
Hi All Forgive me if I've posted this in the wrong forum area but I'm fairly new to this and have spent some time looking for a correct area but still not sure??? Anyway........ ....I'm wanting to know if there's a standard SAP Report or anything tha
-
How to zoom in model to add and subtract layer after a degree
How to zoom in model to add and subtract layer after a degree
-
Components getting displayed only when frame size is changed
import java.awt.*; import javax.swing.*; public class BorderLayout_another extends JFrame{ public BorderLayout_another() setLayout(new FlowLayout()); setSize(500,400); setVisible(true); add(new JButton("o