Og-00637 call graphic module from forms
Hi, I'm trying to dinamically change chart type of a graphic module from forms, pretty much in the same way of Developer Demos. How ever, I'm getting og-00637 ... Invalid field template....!.
Have tried to use og_set_ftemp without results. More information:
1.- General
Version: Developer 6. Forms 60502
RDBMS: 734
2.- Forms Procedure:
PROCEDURE plot_graphs (p_recordgrp IN RECORDGROUP
,p_change_chart_type IN BOOLEAN) IS
-- Crea la lista de parametros e invoca a Oracle Graphics para construir grafico
pl_id ParamList;
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');
-- Define el Record Group creado para graficar los datos del record group
Add_Parameter(pl_id,'relacion_analisis',DATA_PARAMETER,'relacion_analisis');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
--og.open ('smart_graph1','chart_area1',FALSE,TRUE);
og.open ('smart_graph1.ogd','chart_area1',TRUE,TRUE);
run_product(GRAPHICS,
'smart_graph1',
SYNCHRONOUS,
BATCH,
FILESYSTEM,
pl_id,
'chart_area1');
if p_change_chart_type then
OG.Interpret('smart_graph1.ogd', 'chart_area1',':cntrl.chart_type',TRUE,pl_id);
OG.Interpret end if;
OG.CLOSE('smart_graph1.ogd','chart_area1');
destroy_parameter_list(pl_id);
END;
Graphics Procedure:
PROCEDURE bar IS
mch og_object;
BEGIN
mch := og_get_object('Productos');
og_set_template (mch, og_get_template('bar_tmp'));
og_update_chart(mch, og_all_chupda);
END;
-- this was original procedure copied from demos. after getting invalid field template I modified it like this:
PROCEDURE chart_type (p_graph IN VARCHAR2) IS
mch og_object;
ftemp og_ftemp;
name varchar2(20):= 'Valor';
BEGIN
IF p_graph = 'B' THEN
mch := og_get_object('Productos');
og_set_template (mch, og_get_template('bar_tmp'));
ftemp := og_get_ftemp(og_get_template(og_get_object('Productos')),0);
og_set_ftemp_name(ftemp, 'valor');
ELSIF p_graph = 'P' THEN
mch := og_get_object('Productos');
og_set_template (mch, og_get_template('pie_tmp'));
ftemp := og_get_ftemp(og_get_template(og_get_object('Productos')),0);
og_set_ftemp_name(ftemp, 'valor');
ELSIF p_graph = 'C' THEN
mch := og_get_object('Productos');
og_set_template (mch, og_get_template('column_tmp'));
ftemp := og_get_ftemp(og_get_template(og_get_object('Productos')),0);
og_set_ftemp_name(ftemp, 'valor');
ELSE
mch := og_get_object('Productos');
og_set_template (mch, og_get_template('line_tmp'));
ftemp := og_get_ftemp(og_get_template(og_get_object('Productos')),0);
og_set_ftemp_name(ftemp, 'valor');
END IF;
og_update_chart(mch, og_all_chupda);
END;
Now I'm getting a GPF.
Help will be greatly appreciated...!
First of all, stop shouting. Writing everything in uppercase is regarded as shouting.
Second, you didn't mention any version number, so please tell us your forms-version.
Depending on your version, you have to set the environment variable FORMS45_PATH, FORMS60_PATH, FORMS90_PATH or FORMS_PATH either in the registry or in your env-file.
Similar Messages
-
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]) -
Calling another module from designer
Please help,
When i call a module from another module through designer, I get frm-40010 - can't not read from the "module name". It can't find the form because the directory path is not generated in the calling form. I know this, because if i put the path on the generated form using "Form builder" it works.
How do I make designer find called form(modules)
thanks<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by floresr:
Please help,
When i call a module from another module through designer, I get frm-40010 - can't not read from the "module name". It can't find the form because the directory path is not generated in the calling form. I know this, because if i put the path on the generated form using "Form builder" it works.
How do I make designer find called form(modules)
thanks <HR></BLOCKQUOTE>
resolution
Go to the registry
hkey_local_machine
software
oracle
forms60_path and add the directory where designer is putting the forms
null -
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 -
Calling a report from forms with a paramter form
Hello,
How do you call a report from forms and get it to display the parameter form. Where you can then call the report using this parameter form. I have been using paramform=yes. but it simply runs the form.
I saw on a a thread ages ago that this was a sample of this available for download. Is this true?
thanksHere is my code sorry about posting twice. Please note that the parameter list has been created as described.
report_id := find_report_object('MENU_REPORT_NODE');
Tool_Env.Getvar('ReportsServer', reports_server);
Tool_Env.Getvar('ReportsFolder', reports_folder);
dest_file := reports_folder || :global.username || '\' || rep_name || '.pdf';
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_FILENAME, rep_name);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_SERVER, reports_server);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE, SYNCHRONOUS); -- wait for the report to finish
-- SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESNAME, dest_file);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESTYPE, cache);
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_OTHER, 'paramform=yes' || ' ' || 'mode=bitmap');
report_job := run_report_object(report_id); -
Calling SQL*Loader from Forms
Hi,
I was wondering if anyone has called SQL*Loader from Forms?
What I am wanting to do is use Oracle Forms as the interface where you can specify a file that you can import into the database and it will use a set control file. Push the import button and SQL*Loader does the rest.
Is using Java code to call SQL*Loader from Forms a viable option, or is there an easier way to achieve the desired outcome.
Any ideas or guidance will be much appreciated.
Thanks,
Scott.Scott,
In forms, there's a HOST built-in command which is supposed to execute any o/s commands.
What you have to do is :
1. Bult up the string exacltly in the fashion which you will run in o/s
2. Call the HOST Built-in and pass in the string
Here's a example :
Declare
lOsCmd Varchar2(1000) := Null;
Begin
lOsCmd := 'sqlldr user-id=userid/passwd@connectStr '
|| ' control=c:\temp\abc.ctl log=c:\temp\abc.log '
|| ' bad = c:\temp\abc.log';
Host (lOsCmd, No_Screen);
End;
-- Shailender Mehta -- -
HOW TO CALL FUNCTION MODULE FROM ABAP4 EDITOR
HI !
friends
I want to call function module from abap 4 editor.
is there any shortcut key from edit menu through which if give a function module name then it calls the function automatically?
points will be awarded.
Cheers
troycommand will be like this
<b> call function 'YW2_GET_MNW_PERIOD'
exporting
w_budat = v_datum
importing
w_period = i_date-period
w_period_desc = i_date-p_desc.</b>
Regards
prabhu -
How to call a URL from forms ?
Dear All,
I would like to invoke / call a URL from forms. I know we can make a call Using Web.show_document. But this will execute in a browser.
What i need to do is, i have to send a request to by calling an URL, that should not visible to any body.
This is my requirement, please help if you know.
Thanks
Balajihi,
here is a quick example : (data from url returns as a clob. you need to write it at db. and call from forms.)
FUNCTION Get_DataFromUrl(pUrl IN VARCHAR2,pProxy IN VARCHAR2,pData IN OUT CLOB) RETURN NUMBER IS
vRcv UTL_HTTP.HTML_PIECES;
vData CLOB;
eNoDataReceived EXCEPTION;
BEGIN
UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(TRUE);
-- Get data pieces from Url
vRcv := UTL_HTTP.REQUEST_PIECES(pUrl,Proxy => pProxy);
IF vRcv.COUNT < 1 THEN
RAISE eNoDataReceived;
ELSE
-- Append varchar2 table data into clob variable
DBMS_LOB.CreateTemporary(vData,FALSE,DBMS_LOB.CALL);
FOR i IN 1..vRcv.COUNT LOOP
DBMS_LOB.WriteAppend(vData,LENGTH(vRcv(i)),vRcv(i));
END LOOP;
-- Copy local data into return variable
DBMS_LOB.Copy(pData,vData,DBMS_LOB.GetLength(vData));
DBMS_LOB.FreeTemporary(vData);
END IF;
RETURN SUCCESS;
EXCEPTION
WHEN eNoDataReceived THEN
RETURN FAILURE;
WHEN UTL_HTTP.INIT_FAILED THEN
RETURN FAILURE;
WHEN UTL_HTTP.Request_Failed THEN
RETURN FAILURE;
WHEN OTHERS THEN
RETURN FAILURE;
END Get_DataFromUrl;
hope this helps.
Engin. -
Calling graphical mapping from XSLT mapping Prog
hi guys;
can anyone tell me that weather we can call graphical mapping from XSLT mapping prog.If this is possible then can anyone guide me through the stepsMudit
Can you go through the links which might be useful to you:
Use of XSLT mapping?
Re: Java Mapping and Graphical Mapping
---Mohan -
Calling function modules from a BSP page
Hi all
How do we call function modules from a BSP page.
regards,
PaulOk, You want to construct the URL pointing to a BW report and want to execute the same when a button is clicked right? if yes here is the answer.
for constructing the BW query URL
http://<bwserver>:<port>/sap/bw/BEx?sap-language=ENCMD=LDOC&infocube=<cube anme>&query=<query name>&var_name_1=<variable name1>&var_value_ext_1=<variable value 1>&var_name_2=<variable name2>&var_value_ext_2=<variable value 2>
(for more info on how to pass parameters to BW query URL refer to the BW web designer reference manual which can be found at http://services.sap.com/bw)
and for executing this from a button use onclientclick property of htmlb:button along with window.open
<htmlb:button id ="BWQ"
onClientClick = "javascript:window.open("<%= BW_URL %>" );"/>
Hope this is clear.
Regards
Raja -
Calling an EXE from Forms 4.5
How do i call a windows Exe from forms. Whats the exact syntax to do that? Code sample would help.
Thanks!Client/server mode calling an EXE from Forms 4.5
The following is a Foreign Function Interface that I employed to launch an outside program in its own asynchronous window. It was a great alternative to the HOST command.
The disadvantage to the HOST command was that the launched program would have to be closed before you could return to the form. With this method the the launched program
could be minimized etc. and you could switch back and forth between forms and it.
===============================================================
PACKAGE fp_winexec IS
FUNCTION run(p_cmd IN OUT VARCHAR2)
RETURN BOOLEAN;
END;
PACKAGE BODY fp_winexec IS
dll_handle ORA_FFI.LIBHANDLETYPE;
winexec_handle ORA_FFI.FUNCHANDLETYPE;
FUNCTION RunICD(
handle IN ORA_FFI.FUNCHANDLETYPE;
cmd IN OUT VARCHAR2;
disp_mode IN PLS_INTEGER)
RETURN PLS_INTEGER;
PRAGMA INTERFACE(C, RunICD, 11265);
FUNCTION run(p_cmd IN OUT VARCHAR2)
RETURN BOOLEAN IS
v_tmp PLS_INTEGER;
v_cmd VARCHAR2(2000) := p_cmd;
v_retval BOOLEAN := TRUE;
BEGIN
v_tmp := RunICD(winexec_handle, v_cmd, 1);
IF v_tmp = 2
THEN
MESSAGE('Cannot find '||v_cmd||' or one of its components);
v_retval := FALSE;
END IF;
return(v_retval);
END run;
BEGIN
dll_handle := ORA_FFI.REGISTER_LIBRARY
(NULL, 'krn386.exe');
winexec_handle := ORA_FFI.REGISTER_FUNCTION(dll_handle, 'WinExec', ORA_FFI.PASCAL_STD);
ORA_FFI.REGISTER_RETURN(winexec_handle, ORA_FFI.C_INT);
ORA_FFI.REGISTER_PARAMETER(winexec_handle, ORA_FFI.C_CHAR_PTR);
ORA_FFI_REGISTER_PARAMETER(winexec_handle, ORA_FFI.C_INT);
END;
====================================================================
-- To call the program from forms
DECLARE
v_retval BOOLEAN;
BEGIN
v_retval := fp_winexec.run(:control_block.program_to_run);
END; -
Help me in using RUN_PRODUCT to call a report from form
Hi GURUs
I am trying to call a report from a form.
I enter hiredate as input parameter in the form and click the 'run report' button.
The hiredate value will be sent to report via pl_id, TEXT_PARAMETER,:CTL.TXT_DT as shown below in when button pressed trigger
DECLARE
pl_id ParamList;
BEGIN
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'HRDATE',TEXT_PARAMETER,:CTL.TXT_DT);
Run_Product(REPORTS, 'C:\empreport.RDF', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
END;
Coming to report side its a simple query select * from emp where trunc(hiredate) > trunc(:hrdate);
I created 'hrdate' user parameter in the report
The problem is when I run the form it calls report and shows the report parameter form with the carried value. now I have to run report again.
How do I supress this paramenter form because when I am sending value from form I dont have to see the parameter form at the report.
I dont know how to use paramform = no with RUN_PRODUCT
Please tell me what to do it....
ThanksLooking at the Forms documentation it specifies, "To run a report from within a form, you must use the dedicated report integration built-in RUN_REPORT_OBJECT." The RUN_PRODUCT built-in is used to run the Graphics product. I suggest you give RUN_REPORT_OBJECT a try. This is how we call a report from a form.
Hope this helps.
Craig... -
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. -
Calling a report from forms - FRM-40735 when-button-pressed raised unhandle
Hi,
I created a form to generate a pdf report.
its not going too well, so i need some help.
my form only has one button , when pressed I want it to generate a report in pdf format.
i created a when-button-pressed trigger and the following code is below:
I also create a web service proxy jar file,
the jar file is in the FORMS_BUILDER_CLASSPATH, and the jar file is imported from forms builder without any issues.
As of now I am hard coding everything in the code below to see if it works.
The error I am getting FRM-40735 when-button-pressed raised unhandled exception ORA-105100 i dont know why ?
This error is occurring at this line of code, please help, this is my first time doing something like this.
obj := publicreportserviceclient.new(); DECLARE
param_name varchar2(200);
un varchar2(200);
pw varchar2(200);
out_file varchar2(200);
obj ORA_JAVA.JOBJECT;
BEGIN
obj := publicreportserviceclient.new();
param_name := 'EMP';
un := 'Administrator';
pw := 'Oracle123';
out_file := 'D:\DevSuiteHome_1\j2ee\home\default-web-app'||'output';
publicreportserviceclient.callRunReport(obj,'/~administrator/Learn/Test1/Test1.xdo','EMP','141414',un,
pw,'pdf','New_Template',out_file);
web.show_document('http://jmenge-de.de.oracle.com:8889/j2ee/' || 'output');
exception
--check for ORA-105101
when ORA_JAVA.EXCEPTION_THROWN then
message('Java Exception : '
|| Exception_.toString(ORA_JAVA.LAST_EXCEPTION));
ORA_JAVA.CLEAR_EXCEPTION;
return;
--check for ORA-105100
when ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
return;
END;This is my java function
public void callRunReport (String reportPath, String paramName, String paramValue, String
username, String password, String format, String template, String outFile) {
try {
bip_webservice.proxy.PublicReportServiceClient myPort = new bip_webservice.proxy.PublicReportServiceClient();
// Calling runReport
ReportRequest repRequest = new ReportRequest();
repRequest.setReportAbsolutePath(reportPath);
repRequest.setAttributeTemplate(template);
repRequest.setAttributeFormat(format);
repRequest.setAttributeLocale("en-US");
repRequest.setSizeOfDataChunkDownload(-1);
ParamNameValue[] paramNameValue = new ParamNameValue[1];
paramNameValue[0] = new ParamNameValue();
paramNameValue[0].setName(paramName);
String[] values = new String[1];
values[0] = paramValue;
paramNameValue[0].setValues(values);
repRequest.setParameterNameValues(paramNameValue);
ReportResponse repResponse = new ReportResponse();
repResponse = myPort.runReport(repRequest,username,password);
byte[] baReport = repResponse.getReportBytes();
FileOutputStream fio = new FileOutputStream(outFile);
fio.write(baReport);
fio.close();
} catch (Exception ex) {
ex.printStackTrace();
}Thanks - please helpIf there is a way to make it work with Bi publisher, Please let me know.
I need to something to make it work with BI publisher.
thanks,
Edited by: Rooney on May 27, 2010 1:27 PM -
Calling a Report from Form in 10g
Hi all,
I am very new to Oracle Form builder, I wana to call a report from a Form.
we are using Oracle 10g Developer suit.
Can any body please help me regarding on this?
Regards
Tanmaya Pradhan(Tam)..or
Take a look at
Re: Run Report10g Through form 10g
Maybe you are looking for
-
Cannot see host drives from within guest OS
My host PC is Win7 64-bit, and guest PC is Win7 32-bit. I've installed and enabled Integration Services and ticked the relevant resource sharing options under "Integration features". Should I expect to see the host's drives appear in the guest's Wind
-
I want to use the microphone built in to the MacBook Pro while still outputting audio through the Apple Earphones. This is because the microphone on my earphones has stopped working. If anyone knows how to do this, please tell me
-
Bug Report: constant crashes in CS6 (Win 7)
I have only finished a couple small projects without a crash. Sometimes it crashes moments in. There doesn't seem to be any clear pattern to it. I'm using Windows 7. Here's what the problem description comes up with in the crash dialog: Problem Event
-
How to change and save a new file in Edge web Lumira server for Team ?
Hi Lumira folks, I've installed SAP Lumira 1.0, Edge edition and View a sample 'Dairy Wholesaler-Sample" I'd like to change it and save as new file, but "Save" button is disabled and when I put my mouse over the button, it says "Save Option is disabl
-
Mac Book not detecting iPhone 4 wirelessly
My Mac Book has recently stopped detecting my iPhone wirelessly. When I first got my iPone, it was detected in the 'devices' section of iTunes, however recently this seems to have stopped working. Not sure if this is related, but Vuse has also stopp