Run_product problem
Hi all,
I have a form which calls a report using the RUN_PRODUCT built in.
The report gets executed only on certain cases. After much tracing and debugging, I've pinpointed it to one text parameter which i'm passing across. This text parameter is actually a SQL 'where clause' which the report uses.
It fails when the text parameter contains a value with spaces inside quotes, for e.g, column1 = 'value 1'
It works when, column1 = 'value1'
When it fails, nothing happens, the form doesn't come back with any error messages. The report doesn't get launched.
Can someone tell me if this is a known bug or if there is a clean workaround for this.
rgds
Hi,
The example of the text parameters,
1) column1 = 'value1'
2) column1 = 'value 1'
is just an example. Let's say in this example, the table does contain the two values, 'value1' and 'value 1'.
This is what i'm experiencing with run_product. When i pass the text parameter as a where clause,
text parameter : where column1 = 'value 1'
nothing happens, there is no empty report, the report doesn't execute, there is no error message, form doesn't hang.
When i pass it as,
text parameter : where column1 = 'value1'
the report gets executed. After my debugging, i've pinpointed it to the space inside the quote.
My workaround at the moment is actually replacing the spaces inside the where clause with a special
character ~ (where~column1~=~'value~1') before it gets pass and replacing it back to spaces before the report executes. This works, but i was wondering whether there is a cleaner solution.
rgds
Hi
Your query is not clear to me.
Your statement : "It fails when the text parameter contains a value with spaces inside quotes, for e.g, column1 = 'value 1' "
It should not return an error. "where clause" passed by you, doesn't satisfy any record in the table. Reports should execute, but as table doesn't
contain any record in which column1 has a value equal to 'value 1' (with a empty space in the string) and it should return a empty report with no columns.
Do u get a empty report or form hangs or gets an error that form failed, what excatly happens ?
With Regards
Reports team
Similar Messages
-
PDF not generated in Report builder 3.0
Here, I m using Oracle Report Builder 3.0 Rel 2.1. I am running a report from FORM through RUN_PRODUCT , problem is that when i generate the PDF file it shows sometime message of formula column error which is i have seen in rdf is correct and some time it creates blank. But in this report Report Builder Parameter Form also exists , i hide this parameter form in FORM thourgh PARAMFORM in ADD_PARAMETER. I think it requires the parameter values that report generated PDF blank or generated an error of formula column. But i run this report through report parameter form and generate PDF correctly.
Please Help me this regards
Shahid Shafi
Analyst/Programmer
Novartis Pharma (Pakistan) Ltd.
[email protected]Hi KanataPablo,
According to your description, it seems that you are using linked server to pass value to oracle. Seeing that the query is worked well in Management Studio, you may have the permission to connect to oracle (In this scenario, make sure the users to run the
query in SSMS and Report Builder are the same user). So this issue can be caused by the user’s permission to connect to report server, the credential of data source and the dynamic query.
We can add the current user as a Login, then click Properties and navigate to User Mappings page, enable ReportServer and ReportServerTempDB options.
We can try to type user name and password, and enable “Use as Windows credentials” as the credential used to connect to data source.
Try with dynamic query:
="Select column1, column2 From tableName where ID IN (" + JOIN(Parameters!param1.value, ",") + ")"
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Having problem in using RUN_PRODUCT in oracle apps 11.0.3
I am having problem in using RUN_PRODUCT in oracle apps 11.0.3. Error in oracle apps is
FRM-40733 PL/SQL built-in RUN_PRODUCT failed
What could be the possible cause for this error ?Hi again;
I found this please also check this:
Price List Migration from 11.0.3 to 11.5.10/R12.
Regard
Helios -
Problem with Run_Product.. FRM-41211 Oracle reports team pls respond
Hi,
I am calling run_product built in my form 3 times on when button pressed trigger I am getting error
FRM-41211 Integration Error: SSL Failure running another product..
how to solve this problem..
In help it is given check with Run_Product ... but no errors are exist in run_product...
pls help me.. its very urgent..
regards
KiranHi every thing is fine problem is
If am running 3 reports consecutive from form builder I am getting frm-41211 error. To solve this I have place message('1') ;pause in-between run_product statements now it is working fine. Could u please find out any solutions for this (not using timers);
Or
Pls pass maild of Oracle reports team usually they answer questions in oracle .com forums. -
Requirement :
To generate stock movement report for certain selected items.
Background :
A Form is created with data block (tmp_item_master - a global temporary table)
when_new_form_instance :
inserting into tmp_item_master from item_master and then execute_query on tmp_item_master block.
User selects certain items using check box provided.
Now tmp_item_master is updated for ch_select_flag_yn = 'Y' for selected items
and commit.
Calling report from form(using run_product()).
Now the main query in report, is joined with tmp_item_master where ch_select_flag_yn = 'Y'
Here, we are unable to see the report for any item. As the global temporary table data is not visible in the report session.
How to resolve this problem ?
Note : global temporary table created with ON COMMIT PRESERVE ROWS
Thanking you,
From praful.
nullHi,
You are using 'ON Commit Delete Rows' . Instead of Use ' ON COMMIT PRESERVE ROWS'
The ON COMMIT DELETE ROWS clause indicates that the data should be deleted at the end of the transaction.
CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT DELETE ROWS;
In contrast, the ON COMMIT PRESERVE ROWS clause indicates that rows should be preserved until the end of the session.
CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT PRESERVE ROWS;
Edited by: Mrucha on Nov 26, 2012 6:06 AM -
RUN_PRODUCT is not working
hI,
I am working in developer 6i forms and reports. I am trying to call a report from a for using RUN_PRODUCT built in. But it’s generating the following
Error: FRM-41211: Integration error: SSL failure running another product.
I think the procedure used for running the report is ok because it’s working in another machine.
Please help me, how can I solve this problem.
Best Regards,Re-Install the reports again,,
this is a common Windows Problem -
Problem with running bitmap report in Oracle 6i
Hello,
I am running a report from a form using run_product in client/server enviroment. And I use the same code in all forms that run reports. In test enviroment, everything works normally. But in customer enviroment there is weird behaviour. Some reports need a lot of time to be executed, and when they are finally finished, report previewer is not maximized as it is in test enviroment. And more important problem is that one report doesn't execute at all. Report background engine is started but report doesn't come out at all.
Here is code which I use to run reports:
declare
izvestaj varchar2(15);
pListName varchar2(20) := 'parList';
dt varchar2(6) := 'Screen';
pList paramlist;
BEGIN
izvestaj := 'EBS12';
begin
pList := get_parameter_list(pListName);
if not id_null(pList) then
destroy_parameter_list(pList);
end if;
pList := create_parameter_list(pListName);
if (not id_null(pList)) then
add_parameter(pList, 'P_PREDUZECE', text_parameter, to_char(:kontrolni.preduzece_id));
add_parameter(pList, 'P_PRENOS', text_parameter, to_char(:prenos.id));
add_parameter(pList, 'P_RAD', text_parameter, :prenos.chk_radnik);
add_parameter(pList, 'P_LOK', text_parameter, :prenos.chk_lokacija);
add_parameter(pList, 'P_ZAR', text_parameter, :prenos.chk_isplata);
add_parameter(pList, 'P_RAS', text_parameter, :prenos.chk_raspored);
add_parameter(pList, 'P_NAL', text_parameter, :prenos.chk_nalet);
add_parameter(pList, 'P_BEZ_RAS', text_parameter, :prenos.bez_rasporeda);
add_parameter(pList, 'P_STATUS', text_parameter, to_char(:prenos.status));
add_parameter(pList, 'P_RAD_ID', text_parameter, to_char(:prenos.radnik_id));
add_parameter(pList, 'P_SORT', text_parameter, to_char(:prenos.redosled));
add_parameter(pList, 'PARAMFORM', text_parameter,'NO');
add_parameter(pList,'DESTYPE',text_parameter,dt);
run_product(reports, izvestaj, synchronous, runtime, filesystem, pList, null);
end if;
exception
when others then
set_alert_property('cfg_error',alert_message_text,'Poziv izveštaja nije uspeo! '||sqlerrm);
if (alert_button1=show_alert('cfg_error')) then null;
end if;
raise form_trigger_failure;
end;
END;
Is it maybe some enviroment settings problem and if yes, what should I pay attention on?
Tnx in advance,
NatiHello,
When you put a block on a "new stacked canvas" that canvas is generated as a popup canvas. If that popup overlaps with some other generated items (for instance: items in master block) Forms will not show it.
You can try showing that popup canvas programatically with Show_View('canvas_name') in When-New-Form-Instance and see what happens.
Dalibor
P.S. Why do you have to put detail block on a popup canvas? Why don't you simply put it on a "same content canvas"? -
Problem running a report in forms.
Hello!
I am having a problem with running a report in a form. I have installed on my computer Oracle developer suite 10g, weblogic, oracle database 11g. Now i have a main form in witch runs froms and reports. The forms and reports had run well on oracle 6i but now i am faceing with a issue, the forms are running but the reports do not. In oracle 6i the reports did run with run_product, now with REPORT_OBJECT. I don't understand what structure could i use. Do i have to install Application server ???? PLS explain what do i have to do, all the configuration necessery, other ipoduct installation if needed. thanks!!!!!
This is the main form that runs other forms and reports:
DECLARE
nod varchar2(50);
htree ITEM;
lis paramlist;
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(100);
BEGIN
nod:=ftree.get_tree_node_property('COP1',ftree.get_tree_selection('COP1',1),ftree.node_value);
htree := Find_Item('FRONT.COP1');
Ftree.Set_Tree_Selection(HTREE, :SYSTEM.TRIGGER_NODE, Ftree.SELECT_ON);
--lis:=create_parameter_list('LISTA');
:GLOBAL.PROJECT_PATH:= 'D:\Diploma\Last_version\rap\';
-- forme
if lower(nod) = 'intretinere clienti' then
open_form('D:\Diploma\Last_version\INTRETINERE_CLIENTI',ACTIVATE, SESSION);
ELSIF LOWER(nod) = 'produse clienti' then
--add_parameter(lis,'USERU',TEXT_PARAMETER,:PAROLA.USERU);
open_form('D:\Diploma\Last_version\PROD_CL_inch',ACTIVATE, NO_SESSION,lis);
-- rapoarte
elsif upper(nod)='CLIENT' then begin
run_product(REPORTS,'D:\Diploma\Last_version\rap\CLIENT',SYNCHRONOUS,RUNTIME,FILESYSTEM,'',NULL);
--v_rep := RUN_REPORT_OBJECT('D:\Diploma\Last_version\rap\CLIENT');
end;
elsif upper(nod)='PRODUSE BANCARE DESCHISE IN PERIOADA' then begin
run_product(REPORTS,'D:\Diploma\Last_version\rap\PRODUSE_PERIOADA',SYNCHRONOUS,RUNTIME,FILESYSTEM,'',NULL);
--repid := find_report_object('PRODUSE_PERIOADA');
--SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE, SYNCHRONOUS);
--SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
--rep_status := REPORT_OBJECT_STATUS(repid);
-- v_rep := RUN_REPORT_OBJECT('D:\Diploma\Last_version\rap\PRODUSE_PERIOADA');
--v_rep := RUN_REPORT_OBJECT(repid);
end;
elsif upper(nod)='DEPOZITE SCADENTE IN PERIOADA' then
run_product(REPORTS,'D:\Diploma\Last_version\rap\DEPOZITE_SCAD',SYNCHRONOUS,RUNTIME,FILESYSTEM,'',null);
-- nomenclatoare
elsif upper(nod)='TIPURI PRODUSE' then
open_form('D:\Diploma\Last_version\nom_prod',activate, NO_SESSION);
elsif upper(nod)='TIPURI DOBANZI' then
open_form('D:\Diploma\Last_version\nom_dob',activate, NO_SESSION);
-- operatiuni
elsif upper(nod)='DEPUNERE NUMERAR' then
lis:=create_parameter_list('LISTA');
add_parameter(lis,'STARE',TEXT_PARAMETER,'D');
open_form('D:\Diploma\Last_version\depunere_numerar',activate, NO_SESSION,lis);
elsif upper(nod)='ELIBERARE NUMERAR' then
lis:=create_parameter_list('LISTA');
add_parameter(lis,'STARE',TEXT_PARAMETER,'E');
open_form('D:\Diploma\Last_version\depunere_numerar',activate, NO_SESSION,lis);
elsif upper(nod)='TRANSFER' then
open_form('D:\Diploma\Last_version\TRANSFER',activate, NO_SESSION);
elsif upper(nod)='SIMULARE DEPOZIT' then
open_form('D:\Diploma\Last_version\SIMULARE_DEPOZIT',activate, NO_SESSION);
elsif upper(nod)='RAMBURSARE CREDIT' then
open_form('D:\Diploma\Last_version\RAMBURSARE_CREDIT',activate, NO_SESSION);
elsif upper(nod)='RAMBURSARE RATA' then
open_form('D:\Diploma\Last_version\RAMBURSARE_RATA',activate, NO_SESSION);
elsif upper(nod)='TRECERE LA RESTANTA' then
open_form('D:\Diploma\Last_version\RESTANTA_CREDIT',activate, NO_SESSION);
elsif upper(nod)='TRAGERE CREDIT' then
open_form('D:\Diploma\Last_version\TRAGERE_CREDIT',activate, NO_SESSION);
/*elsif upper(nod)='TRAGERE CREDIT' then
open_form('D:\Diploma\Last_version\TRAGERE_CREDIT',activate, NO_SESSION);*/
end if;
--destroy_parameter_list(lis);
END;Ok, so I have installed on my computer Oracle developer suite 10g, weblogic, oracle database 11g just like i said in the previous post. If i installed weblogic and i can run forms it means that i have the weblogic server running, no? If not what do i have to install for it to run ? I did what you said about the reports path, but just to be clear , i put it in environment variables REPORT_PATH='D:\diploma\Last_version\Rap'. I don't know where to put it in fromsweb.cfg ! Now about the main from, it looks like this :
DECLARE
nod varchar2(50);
htree ITEM;
lis paramlist;
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(100);
report_job_id VARCHAR2(100);
BEGIN
nod:=ftree.get_tree_node_property('COP1',ftree.get_tree_selection('COP1',1),ftree.node_value);
htree := Find_Item('FRONT.COP1');
Ftree.Set_Tree_Selection(HTREE, :SYSTEM.TRIGGER_NODE, Ftree.SELECT_ON);
--lis:=create_parameter_list('LISTA');
--:GLOBAL.PROJECT_PATH:= 'D:\Diploma\Last_version\rap\';
-- forme
if lower(nod) = 'intretinere clienti' then
open_form('D:\Diploma\Last_version\INTRETINERE_CLIENTI',ACTIVATE, SESSION);
ELSIF LOWER(nod) = 'produse clienti' then
--add_parameter(lis,'USERU',TEXT_PARAMETER,:PAROLA.USERU);
open_form('D:\Diploma\Last_version\PROD_CL_inch',ACTIVATE, NO_SESSION,lis);
-- rapoarte
* elsif upper(nod)='CLIENT' then begin *
* v_rep := RUN_REPORT_OBJECT('CLIENT');*
* report_job_id := RUN_REPORT_OBJECT(repid);*
* end;*
* elsif upper(nod)='PRODUSE BANCARE DESCHISE IN PERIOADA' then begin*
* repid := find_report_object('PRODUSE_PERIOADA');*
* report_job_id := RUN_REPORT_OBJECT(repid);*
* end;*
* elsif upper(nod)='DEPOZITE SCADENTE IN PERIOADA' then *
* repid := find_report_object('DEPOZITE_SCAD');*
* report_job_id := RUN_REPORT_OBJECT(repid);*
-- nomenclatoare
elsif upper(nod)='TIPURI PRODUSE' then
open_form('D:\Diploma\Last_version\nom_prod',activate, NO_SESSION);
elsif upper(nod)='TIPURI DOBANZI' then
open_form('D:\Diploma\Last_version\nom_dob',activate, NO_SESSION);
-- operatiuni
elsif upper(nod)='DEPUNERE NUMERAR' then
lis:=create_parameter_list('LISTA');
add_parameter(lis,'STARE',TEXT_PARAMETER,'D');
open_form('D:\Diploma\Last_version\depunere_numerar',activate, NO_SESSION,lis);
elsif upper(nod)='ELIBERARE NUMERAR' then
lis:=create_parameter_list('LISTA');
add_parameter(lis,'STARE',TEXT_PARAMETER,'E');
open_form('D:\Diploma\Last_version\depunere_numerar',activate, NO_SESSION,lis);
elsif upper(nod)='TRANSFER' then
open_form('D:\Diploma\Last_version\TRANSFER',activate, NO_SESSION);
elsif upper(nod)='SIMULARE DEPOZIT' then
open_form('D:\Diploma\Last_version\SIMULARE_DEPOZIT',activate, NO_SESSION);
elsif upper(nod)='RAMBURSARE CREDIT' then
open_form('D:\Diploma\Last_version\RAMBURSARE_CREDIT',activate, NO_SESSION);
elsif upper(nod)='RAMBURSARE RATA' then
open_form('D:\Diploma\Last_version\RAMBURSARE_RATA',activate, NO_SESSION);
elsif upper(nod)='TRECERE LA RESTANTA' then
open_form('D:\Diploma\Last_version\RESTANTA_CREDIT',activate, NO_SESSION);
elsif upper(nod)='TRAGERE CREDIT' then
open_form('D:\Diploma\Last_version\TRAGERE_CREDIT',activate, NO_SESSION);
/*elsif upper(nod)='TRAGERE CREDIT' then
open_form('D:\Diploma\Last_version\TRAGERE_CREDIT',activate, NO_SESSION);*/
end if;
--destroy_parameter_list(lis);
END;
Thanks, hope u can guide me :). -
Problem in Using Oracle with Thin Clients(Image) Technology
I am running Oracle on Server and mine clients are thin clients.I have image on Oracle Server from where I am booting thin clients.The Problem I am facing is when I use single Thin client then everything works but as I starts using more than one thin client mine I got the error rwrun60 and it gives the that close or ignore message.I am using run_product for running reports.Then I tried to use run_report_object but how can I pass paramater using run_report_objects
i m not getting much from what you are saying.... but i found something.i created a windows application and then was able to create a dataset from ODAC connection to oracle. then dragging the dataset on windows form... i was able to create a data grid containing the data. hittin F5 the app was running successfull. however when tryin to do same in asp.net...when configuring the data source using sql datasource it gave me following error ...
ORA-00942: table or view does not exist
help help -
Problem with output from report to excel, calling the report from form 10g
Hi everyone, I'm having a problem generating a excel from a report, which is called from a form, I'm using Forms 10g. The problem is this: My report has a variable number of columns. These columns appear according to data obtained from the database, these columns are dates, In vesion 6 excel file generated shows the columns one after another starting in column A1 to column CP. I mean that the dates are correlative. But in version 10g the excel file generated shows the same report starting in column A to column T, only shows the 20 dates correlative corresponding to this columns, the rest of the dates are down the excel sheet in groups of 20 dates, it's something, the file in 6i grows across and in 10g grows down the excel sheet. The report (rdf file) is the same in 6i and 10g, I compiled the 6i version to obtain the 10g version. The excel sheet generated in 10g looks like the report was in pdf format, because PDF format, cuts the report in pages and the file grows down, if I generate the report in PDF format it has the same structure excel file in 10g has. I hope yo can help because I have days trying to solve this but I have no succes. If someone could help I could email the excel files generated in two versions. Here I put the code I use to generate the files in 6i and 10g. I have tried with DESFORMAT=SPREADSHEET in 10g but the result is the same. Thanks for your help. Greetings for all.
Code for version 6i (Works Very well)
PROCEDURE GUARDAREXCEL IS
pl_id ParamList;
nom_rep varchar2(20);
cla_rep varchar2(20);
cod_dis varchar2(4);
nom_arch varchar2(100);
fec date;
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');
IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
cod_dis := :BK_PARAMETROS.LI_COD_DIS;
END IF;
IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
ELSE
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
:BK_PARAMETROS.TI_COD_CLI:='%';
END IF;
IF :BK_PARAMETROS.CLAS_REP=1 THEN
cla_rep := '001';
ELSE
IF :BK_PARAMETROS.CLAS_REP=2 THEN
cla_rep := '002';
ELSE
IF :BK_PARAMETROS.CLAS_REP=3 THEN
cla_rep := '003';
ELSE
cla_rep := '004';
END IF;
END IF;
END IF;
Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );
select sysdate into fec from dual;
IF :BK_PARAMETROS.TIPO_REP=1 THEN
BEGIN
nom_rep := 'tdvenrli1577.rep';
nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
BEGIN
nom_rep := 'tdvenrli1578.rep';
nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
BEGIN
Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');
nom_rep := 'tdvenrli1576.rep';
nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
ELSE
BEGIN
nom_rep := 'TDVENRLI1545.REP';
nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
END;
END IF;
--Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
standard.commit;
Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
EXCEPTION WHEN Run_Product_Failure THEN
message('Error');
END;
Code for version 10g
PROCEDURE GUARDAREXCEL IS
pl_id ParamList;
nom_rep varchar2(20);
cla_rep varchar2(20);
cod_dis varchar2(4);
nom_arch varchar2(100);
fec date;
--byt12122007.sn
repid REPORT_OBJECT;
vURL VARCHAR2(500);
rep_status VARCHAR2(20);
vJobID VARCHAR2(100);
v_rep VARCHAR2(100);
VAR NUMBER;
w_name_repserv VARCHAR2(30);
--byt1212007.en
BEGIN
--w_name_repserv:=F_OBTIENE_SERVREP;
w_name_repserv:='repserv';
pl_id := Get_Parameter_List('mytmp_params');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('mytmp_params');
IF :BK_PARAMETROS.LI_COD_DIS IS NOT NULL THEN
cod_dis := :BK_PARAMETROS.LI_COD_DIS;
END IF;
IF :BK_PARAMETROS.TI_COD_CLI IS NOT NULL THEN
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,:BK_PARAMETROS.TI_COD_CLI||'%');
ELSE
Add_Parameter(pl_id,'P_COD_CLI',TEXT_PARAMETER,'%');
:BK_PARAMETROS.TI_COD_CLI:='%';
END IF;
IF :BK_PARAMETROS.CLAS_REP=1 THEN
cla_rep := '001';
ELSE
IF :BK_PARAMETROS.CLAS_REP=2 THEN
cla_rep := '002';
ELSE
IF :BK_PARAMETROS.CLAS_REP=3 THEN
cla_rep := '003';
ELSE
cla_rep := '004';
END IF;
END IF;
END IF;
Add_Parameter(pl_id,'P_COD_DIS',TEXT_PARAMETER, cod_dis);
Add_Parameter(pl_id,'P_FECHA',TEXT_PARAMETER,to_char(:BK_PARAMETROS.FECFIN, 'DD/MM/YYYY'));
Add_Parameter(pl_id,'P_CLASE',TEXT_PARAMETER, cla_rep);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
/*Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'File');
Add_Parameter(pl_id,'MODE',TEXT_PARAMETER,'Character');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'DELIMITED' );*/
select sysdate into fec from dual;
IF :BK_PARAMETROS.TIPO_REP=1 THEN
BEGIN
repid := find_report_object('tdvenrli1577');
--nom_rep := 'tdvenrli1577.rep';
nom_arch := 'c:\windows\temp\RepCobranzaPlanos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1577');
END;
ELSIF :BK_PARAMETROS.TIPO_REP=2 THEN
BEGIN
repid := find_report_object('tdvenrli1578');
--nom_rep := 'tdvenrli1578.rep';
nom_arch := 'c:\windows\temp\RepCobranzaLargos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1578');
END;
ELSIF :BK_PARAMETROS.TIPO_REP=3 THEN
BEGIN
repid := find_report_object('tdvenrli1576');
Add_Parameter(pl_id,'P_XLS',TEXT_PARAMETER, '1');
--nom_rep := 'tdvenrli1576.rep';
nom_arch := 'c:\windows\temp\RepCobranzaDetallados' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1576');
END;
ELSE
BEGIN
repid := find_report_object('tdvenrli1545');
--nom_rep := 'TDVENRLI1545.REP';
nom_arch := 'c:\windows\temp\RepCobranzaTodos' || TO_CHAR(fec, 'ddmmyyyy') || '.xls';
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_FILENAME,'tdvenrli1545');
END;
END IF;
--Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,nom_arch );
--Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, nom_arch);
standard.commit;
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESNAME,nom_arch);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, RUNTIME);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, 'File');
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'DELIMITED');
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_SERVER, w_name_repserv);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'paramform=no');
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);
END LOOP;
IF rep_status = 'FINISHED' THEN
vJobID := SUBSTR(v_rep, INSTR(v_rep, '_', -1)+1);
vURL:='/reports/rwservlet/getjobid'||vJobID||'?'||'server='||w_name_repserv;
END IF;
WEB.SHOW_DOCUMENT(vURL, '_blank');
IF NOT form_success THEN
MESSAGE('Error: PL/SQL held against Button failed to execute');
RAISE FORM_TRIGGER_FAILURE;
END IF;
/*Run_Product(REPORTS, nom_rep, SYNCHRONOUS, runtime, FILESYSTEM, pl_id,'');
EXCEPTION WHEN Run_Product_Failure THEN
message('Error');*/
END;There are two problems with your VI. First, the basic logic of writing/appending to a file (Excel, TDMS, anything) should go something like this: Open the file, position yourself at the end of the file, then, in the loop, acquire data and write it to the file until you are finished with data acquisition. When you exit the acquire/write to file loop, then close the file. In particular, the opening and the closing of the file should not be inside the loop.
As others have pointed out, writing to Excel might not be optimal, particularly if you are acquiring data at a high rate (and would therefore be writing a lot of data). We actually use Excel in our data acquisition routine, mainly reading from a WorkSheet to get the parameters of a particular stimulus, but also writing the outcome of the response to the stimulus. As it happens, our "acquisition rate" in this example is on the order of several samples per minute, so there's no problem using Excel (we also sample 16 channels of analog data at 1 KHz -- this gets written as a binary file).
Second, if you really do want to use Excel, use the (existing) Excel file to which you want to append as the "template" argument of the New Report function. Then use the Excel Get Last Row function to position yourself at "end of file", as noted above.
Good Luck.
Bob Schor -
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]) -
Using run_product to call reports6i on 64-bit os,no log in Report Engine
When I execute a form 6i with Run_product call to report6i , it hangs on windows 2003 64bit server.
same works on 32 bit server.
Any one having similar problem???
rgdsHi Ludek
<P>
Let me clarify a bit about the issue we been have:<br>
For example we have report-1.rpt and report-2.rpt, both are very similar and in fact report-2 have a little bit more information than report-1. So when I install our application on a webserver in Windows 2003 32 bit system, with Crystal Report XI R2 developer edition + SP4, both reports work perfectly fine and application save the report and show it on the crystal report ActivesX viewer. So I made copy of report-1.rpt and report2.rpt with data and kept it a side.
<P>
Now I install our application that is the asp files and COM objects on a 64 bit windows 2003 and turned on the 32 bit mode to enable our COMs to work. I then run our application pointing it to the same database I used with the other OS, and I tried to run report-1.rpt and report-2.rpt, so report-1.rpt has failed with the viewer showing but no pages and only the controls. However, the report-2.rpt worked fine with data showing ok. So I copied the 2 reports I generated from the other OS and pointed my view report asp page to these rpt files, again same result report-1.rpt failed and report-2.rpt worked ok.
<P>
So I guess what I am trying to say is we are using the exact same COMs on both OS and to generate on both reports, also pointing to the same database using the same connection string. The result is one report is failing on the 64 bit machine.
<P>
Now when I try to export/save the report-1.rpt, the report that come with no pages, I get the error below, this is the same error I get if I try to move to different pages.
<br><br>CRAXDRT Error Occured on Server.70 : Permission denied
<P>
Please let me know if I can provide more information.
<P>
Many thanks -
I am using Oracle Developer6.0 . I am facing problem with reports. I am invoking reports from form using run_product.
1. I could not able to save the report in text file . Whenever i try to save the report output in a text file.It gives dump and application get closed.
2. In RTF format , it execute the query which i have given at the design time while creating a report . But while running i am passing query either through lexical parameter or passing value of where criteria user parameters. It display the output for the specified value. But when i save this report output in rtf file . It execute design time query and save that in a rtf file.
If any body is having any idea about it . Please let me ASAP . It is very urgent for me.
Thanks in advance
nullHi ,
Why don't you try the output in PDF. Its been working for us. We don't have any problems
Good Luck
Rao -
Problem in using RUN_REPORT_OBJECT
I am trying to use following code to call a report from a menu of a .MMB file.
my_rep_id := find_report_object('my_report');
my_rep := RUN_REPORT_OBJECT(my_rep_id);
This 'my_report' has been developed in report builder independently of Forms 6i.
Now the problem is that find_report_object is unable to find 'my_report'
It gives error no. FRM-41219. Can't find report: Invalid ID.
Pl. guide.
TariqThanks Malik,
RUN_PRODUCT does work but I still want to know about RUN_REPORT_OBJECT because I have the impression that Oracle now recommends RUN_REPORT_OBJECT instead of RUN_PRODUCT.
Thanks again.
Tariq Hi
You have to create a report object within the form.
If you look at the Object NAvigator in the Form Builder right below Record Group
tou would see an option for Report. Create a new report object.
Set the following properties for that object
Filename - This should be the name of your RDF file you created from Report Builder along with the full path.
Set the Execution Mode, Communication Mode and Report Destination Type as per your requirements.
In the parameter for find_report_object() pass the name of the report object you created.
eg.
if the name of the report object you created is Report2 then
your call should be rep_id := find_report_object('Report2') .
You are calling the report object which has been created in your form builder and through that call you are running the report file specified in the Filename property of that report object.
Regards
Poorvi -
Problems Calling Graphics by Forms on the Web
Hi!
I'm not able to call a graphic on the web using Forms6i (Version 6.0.8.8.0 (Production)) and Graphics (Version 6.0.5.33.0).
I made a call to a graphic using the RUN_PRODUCT built-in.
On a client-server connection the call has no problem.
On the Web i have no error messages, no results!!!
I tried to populate a chart item with the graphic (always with RUN-PRODUCT) and i had a correct result but when i tried to enlarge the item i had an error message (FRM-92100: Your connection to the Server was interrupted with him detail composed by a lot of java exceptions).
HELP!!!!!!!!
nullStart by setting the "Java console" on in the Jinitator control panel on the client machine. This will show you if Jinitator is called and if it is downloading the correct Jar files.
If you weren't prompted to install Jinitator I would guess you have some security setting you need to set in your IE to allow the download of an exe file.
Maybe you are looking for
-
[ORA-01704: string literal too long] in a long xquery
I get an error when using queries with xmlquery. If the quoted string part is longest than 4000 chr then I get ORA-01704: string literal too long. Example... select xmlquery( ' <Root > {for $xxx in ora:view("ttttttt") let $nnn := $xxx/RO
-
My question on the above issue of MP3music HQ charging $40 is who are they? I was given no choice when I signed up for iTunes to add a $40 charge for MP3.
-
Printing to Acrobat 9 Pro renders giberish text
When printing from the net to my Acrobat 9 Pro the image output is perfect yet the text is all giberish. Can anyone help? Thanks in advanced. Francisco De La Chesnaye [email protected]
-
JMS/JTA issue is case of a server crash
Hi All I am having some JMS/JTA related issue in case of a server crash. This is there for both 6.1 and 7.0. Its like this - an MDB is getting data from a Queue and its CMT [ie JTA]. Now when the MDB has the on
-
ORA-12560 in database restore cold backup
Hi guys, I'm trying to restore a cold backup (WINDOWS NT) and I did the following: 1. Restore the datafiles in a specific location, according to the directory that the files were before. 2. Create the service: C:\>oradim -new -sid ORCL -startmode aut