Building a block based on the records fetched - Forms 10g

Is there a way in forms to dynamically build the block ( I mean in a multi record block, we usally set the number of records displayed in the property pallete) Instead of setting the property is there a way that we can do it based on the records fetched by the query?
select a.unit_id, substr(b.product_code,1,5)
from [email protected] a,[email protected] b
where substr(a.product_code,1,5) = b.product_code
and substr(a.product_code,1,5) = 'E3088'
and inv_product_type in ('PHER','LPHER','VPHER')
and warehouse_id = 'A'
This is the query.
If the query for product_code fetched 5 units for product code = 'E3088' of inv_product_type as mentioned in the query, is if possible to build the multi record block? For another product E3077 it might give us 6 records.
User wants me to see if I can do it? Is it possible?
Thanks in advance.
Anu

Hi,
I've not tried this and can't say for sure if it is possible or not.
But, have a look at this link Re: Automatic  Number  of record displayed .
I'd thought of a solution but never tried myself. Try if it works for you.
If it doesn't, i think it will not be possible in oracle forms.
Navnit

Similar Messages

  • How to execute the query for a block based on the parameter

    Hi All,
    Good evening.
    i have requirement where i need to display the data in one block based on the selected items.
    the scenario is like this...there are 2 LOV's and one apply button and one external region on the form.
    so when u select the lov values and click on apply button the query should execute based on this 2 lov values.
    i am not getting how to achieve this..i am very new to oracle forms..
    Please Help..
    Thanks
    Bharat
    please help..it is urgent..
    thanks
    bharat
    Edited by: Bharat on Jan 31, 2012 5:19 AM

    Bharat wrote:
    Hi All,
    Good evening.
    i have requirement where i need to display the data in one block based on the selected items.
    the scenario is like this...there are 2 LOV's and one apply button and one external region on the form.
    so when u select the lov values and click on apply button the query should execute based on this 2 lov values.
    i am not getting how to achieve this..i am very new to oracle forms..Another way you can do this. Create a lov and don't assign it to any column just one return item (should be id).
    Now create a button may be your "apply button" write two trigger when-button-press and when-mouse-click.
    at When -Button-Press trigger, change the block state to 'ENTER-QUERY' and at when-mouse-click show the LOV and then write execute_query.
    Hope this will help you.
    If someone's response is helpful or correct, please mark it accordingly.

  • Does adding a field to a table affect a data block based on the table?

    If I make a change to a table like adding a field does it affect data data blocks based on the table?

    The other place I have seen where adding a new column to a table causes problems is when a programmer codes: Select * from table.
    If that is coded in a form, the form will need to be recompiled before it will work properly.

  • Where is the Record Update Form Wizard in DWCC?

    Trying to follow online help but it doesn't relate to DWCC.   A tutorial I found for CS6 suggests that it's in Insert > Data Objects > Update Record > Record Update Form Wizard but in DWCC there is no "Data Objects" option in the Insert menu.
    By the way, I'm looking for the wizard not the straight Update behaviour which I'm aware is in the Server Behaviours panel.
    Thank you.
    NJ
    EDIT:  Just spoke to Adobe "support" by chat about this and they were absolutely useless. The directed me to the article that I've highlighted above as being for CS6, which isn't helpful because "Data Objects" isn't in the Insert menu in DWCC, and when I pointed that out they gave me this link to try:  http://www.adobe.com/devnet/
    Seriously?  Is this the best I can hope for from Adobe support?  It was clear that the operative was just doing Google searches for the answers as opposed to actually knowing the software that they represent.  Really disappointing support.

    Hi Jon,
    "Database functionality was removed from DWCC."  - I use database functionality a lot so this is a real let down.  Why has it been removed when it seems so integral to a lot of modern websites and web applications?
    I've got the Legacy Extension, or Depracated_ServersBehaviours panel extension, but that does not bring back the Record Update Form Wizard.
    Tutorials as far as CS6 reference the Record Update Form Wizard but I'm guessing that it has just been completely dropped in DWCC - not that anyone from Adobe know that one way or another.  The official "support" I received earlier was a complete joke (some guy doing Google searches whilst saying - "I'm just verifying your account").
    I'm quite handy with Google myself so maybe there's an opportunity for me to move into a career as an Adobe support technician.
    I'll have to find a third party extension then I guess.  Thanks for the advice.

  • Updating record in a data block based on view in oracle forms

    hi all ,
    We have two data blocks in our custom oracle form.The first data block is for search criteria provided with buttons 'GO' and 'ADD ROW' and the second data block is based on a view that fetches record when user clicks on GO based on the the criteria specified in the above block. The Below block contains one SAVE button too.
    We have a requirement when GO button is pressed and corresponding records are shown in the below block, user should be able to edit the record. Want to know how to make it editable?
    Help appreciated....!!!

    Your view is based on how many tables and does it include all NOT NULL fields from all tables?

  • Building a block based on query

    Hi,
    I've to build a block containing empnumbers from emp table for the emp names entered by the user.
    EX: If emp enters SMITH,KING in a text item ,I've to build a mutlirecord block containing emp numbers of these emp names.
    I know I've to use EXEC_SQL package to achieve this.
    Ex is below:
    PROCEDURE getData1 IS
    connection_id EXEC_SQL.CONNTYPE;
    cursorID EXEC_SQL.CURSTYPE;
    sqlstr VARCHAR2(1000);
    loc_ename VARCHAR2(30);
    loc_eno NUMBER;               
    loc_hiredate DATE;
    nIgn PLS_INTEGER;
    nRows PLS_INTEGER := 0; -- used for counting the actual number of rows returned
    i integer:=0;
    type l_emp is table of emp%rowtype index by binary_integer;
    l_empvar l_emp;
    BEGIN
    connection_id := EXEC_SQL.OPEN_CONNECTION('scott/tiger@afresrtm');
    cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
    sqlstr := 'select empno from emp where ename in :text_item' ;
    EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
    --EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':bn', input_empno);
    EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1, loc_ename, 30);
    EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, loc_eno);     
    EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, loc_hiredate);
    nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);
    -- call FETCH_ROWS to obtain a row. When a row is returned, obtain the values,
    -- and increment the count.
    WHILE (EXEC_SQL.FETCH_ROWS(connection_id, cursorID) > 0 ) LOOP     
    nRows := nRows + 1;
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, loc_ename);
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 2, loc_eno);     
    EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 3, loc_hiredate);
    l_empvar(i).ename:=loc_ename;
    l_empvar(i).empno:=loc_eno;
    l_empvar(i).hiredate:=loc_hiredate;
    i:=i+1;
    END LOOP;
    IF (nRows <= 0) THEN
    TEXT_IO.PUT_LINE ('Warning: query returned no rows');     
    END IF;
    for i in 1..l_empvar.last loop
    :emp.ename:=l_empvar(i).ename;
    :emp.empno:=l_empvar(i).empno;
    :emp.hiredate:=l_empvar(i).hiredate;
    create_record;
    next_record;
    end loop;
    END;
    Here is a pbm in SQL query:
    How can I prepare a sql stmt for the input given by user bcoz it has to be varchar.
    Pls give me a sol..
    Adios..
    Prashanth Deshmukh

    Hi,
    I've not tried this and can't say for sure if it is possible or not.
    But, have a look at this link Re: Automatic  Number  of record displayed .
    I'd thought of a solution but never tried myself. Try if it works for you.
    If it doesn't, i think it will not be possible in oracle forms.
    Navnit

  • F4 help based on the records in the same column

    Dear All
    its an fantastic blog....i have one different question for u....n u can check the below..
    is it possible to get F4 functionality for a record in column in ALV based on the first 3 records of the same column....
    material vendor shipping contract
    2 4 6 -
    > 5(f4 help)
    3 2 4 6(f4 help)
    the contract value should only come based on the first 3 records of the coulumn and it shouldnt show any other value...other than combination values of first 3 records.....
    hope u got me know.....
    please let me know if you need further clarification....thanks in advance....
    Regards,
    Kartheek.....

    Hi Kartheek,
    do a where-used-list on function F4_INT_HELP_VALUE_REQUEST, start with B* programs.
    Or do a search on SCN and find [ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d] and [view the code sample|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true].
    I hope your approved programming skills allow you to copy&paste.
    Regards.
    Clemens

  • "Creating a block which has the record orientation in both ways "

    As we know in Forms we can set the record orientation either Horizontal or Vertical.
    I need to take readings of some parameters in regular time intervals. But the time i.e, the measured time will be a user input, which should have the Vertical orientation. The Parameters were populated in Horizontal orientation. These two are two different blocks and the data which should be entered will be related to both the blocks. How it could be achieved?
    Any help in this regard is highly appreciated.
    Thanks in Advance.
    Kamesh akundy

    My requirement is as follows:
    A template is associated to each disease. The template is nothing but a group of parameters to be recorded in regular time intervals for a patient. This information is stored in R_INP_TEMP_MASTER (RITM_TEMP_CD primary key).
    The Parameter information is stored in R_INP_ATTRIBUTE_MASTER(RIAM_ATTRB_CD primary key).
    The patient related template and attribute information is stored in R_INP_PATIENT_TEMP_ATTB.
    The above mentioned fields are the foreign keys of R_INP_PATIENT_TEMP_ATTB.
    The values of the parameters will be stored in R_PATIENT_ATTRIB_VALUES.
    In this RPAV_MEASR_TIME is the Recorded Time, RPAV_ATTRIB_VAL is the Value recorded at the given time.
    Now the requirement is as follows. There will be Drop-down box for the List of templates assigned to a Patient. Whenever the value in Drop-down box changes the Attributes related to the selected template should be populated in a Horizontal Non-Database-Block. (I have finished this.).
    The user Interface should look like this:
    (Names of the Attributes in Horizontal block)
    Recorded time Attribute1 Val Attribute2 Val
    10:30:56 106 98
    11:30:56 -- 100
    The time will be populated in another Non-Database block with Vertical Orientation. But how the Values block should be related with both the block so that the values will be stored into R_PATIENT_ATTRIB_VALUES.

  • Record not inserting into the table through Forms 10g

    Hi all,
    I have created a form in 10g(10.1.2.0.2) based on just one table that has 4 columns(col1, col2, col3, col4).
    Here col1, col2 and col3 are VARCHAR2 and col4 is date and all the columns are not null columns(There are no primary and foriegn key constrains, which means duplicates are allowed).
    My form contains 2 blocks where block 1 has one text item (col1) and 3 buttons (Delete, Save, Exit).
    And block2 is a database block and has col2,col3,col4 which are in tabluar layout frame displaying 10 records.
    When the form is opened the cursor has to be in block1.col1 for querrying. Here i enter a value in col1, and then when I click on col2 in the block2, then I put execute_query in new_block_instance of block2, which displays the records.
    The block2 properties are not updatable, insertable and query is allowed.
    Everything is working good until here. But here in the block2 when I want to insert another record into the table, by navigating all the way down to the last empty record and entering the new values for col2, col3 and col4 And then Ctrl+S will display the message "*FRM-40400: Transaction complete: 1 record applied and saved.*" But actually the record is not inserted into the table.
    I also disabled the col4 by setting the Enabled property to No, since while inserting new record the date have to be populated into it and it shouldnt be changed by the user. And im populating the sysdate into the new record by setting Intial Value property to *$$DATE$$*.
    And another requirement which I could not work arround here is that, the col3 also should be populated with the username of the user while inserting.
    please help me...

    Hi Sarah,
    I do not want to update the existing record. So I kept Udate Allowed to No in property palette for the items in block2.
    Do I have to do this property at block level also?
    I'm inserting a new record here.
    Edited by: Charan on Sep 19, 2011 8:48 AM

  • Record is not inserting into the Table thourgh forms 10g

    Hi All,
    I have the form built in 10g(10.1.2.0.2).
    Basically the form has 2 blocks.
    Block 1 with only one item, where we enter some value and hit enter(this will navigate to block2 and execute the query).
    Block 2(tabular) will fetch the records. Now this block2 have 3 columns(caseid, userid, date).
    Now when I insert a new record, I just need to enter the caseid only. And userid and date have to be automatically populated.
    I can populate the USERID and DATE fields.
    And when I enter some value in caseid item of block 2, and then do Control+S(to insert the record and Save the transaction),
    i get the message saying FRM-40400: Transaction complete: 1 records applied and saved.
    But when I query again for the same, I dont se the record inserted into the table.
    Why is this happening?
    Help please...

    @ Inol
    There is no promary or foriegn key relation ship. The form is fetching records from just one table. As I said block1 has col1. and Block2 has col2,3,4.
    @Andreas
    Yes I did select * from table, select count(*) from table in SQL*Plus. Nothing is inserted.
    And one thing I have to tall here is, I have a ON-INSERT trigger in block2.
    The code in ON-INSERT trigger is
    --  :BLOCK2.DATE := TO_DATE(:DATE,'DD-MON-YYYY') ;
    /* commented since I was populating date by assigning $$DATETIME$$ to the Initial value property of the data item. */
    :BLOCK2.SOURCE_CASE := :BLOCK1.SOURCE_CASEID;Forgot to tell you,
    Since I was inserting the record from block2(3 columns), to the table which has 4 columns, there is another item in block 2 which has the visible property No.
    So the block 2 has 4 columns. And the hidden column will hold the value that is in the item of block1. This is what i'm pushing in the ON-INSERT trigger.
    Edited by: Charan on Sep 20, 2011 1:51 PM

  • Displaying items based on Query record count (Forms 4.5)

    I have a special requirement.
    Assume col1 that I am selecting from table temp.
    select col1 from temp;
    Now if query fetches 9 records.
    Each column I want to show like this.
    1 2 3 4 5 6
    7 8 9
    If query fetches 15 records.
    Each column I want to show like this.
    1 2 3 4 5 6
    7 8 9 10 11 12
    13 14 15.
    That means items displayed on screen chages based on output of
    query.
    Pls. suggest some solution.
    null

    When i made the above query a view and created an oracle portal form. I get this error when I try to retrieve all the records in that view i made above.
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    What does the "key-preserved table" mean?

  • Display the records in forms when creating in a database

    hi to all
    i have a problem in forms, run in c\s using form6i..
    How can i display the records when i create a records to database and automatically display in forms when i open the forms or when creating a records?
    example:
    in form#1 , this is where i create records, i create records =A it will insert in database .when i update record A. I change A to B..then form#2 will also change to B and appear or dispaly in forms.
    in form#2, this has also a text item, when i open this form, it will appear the A records here, it will also update....
    what should be the best trigger to used and how to do this? plzzz help
    tnx in advance
    mica

    How can i display the records when i create a records
    to database and automatically display in forms when i
    open the forms or when creating a records?
    example:
    in form#1 , this is where i create records, i create
    records =A it will insert in database .when i update
    record A. I change A to B..then form#2 will also
    change to B and appear or dispaly in forms.Yours question is not clear to me , you didnt mention forms A and B contain the same underlying table or both have diffrent underlying table.
    My assumption both have diffrent table if its the case then use MERGE DML (introduced within 9i) and get refreshed it by TIMER (execute_query) within forms B.
    You need to clarify more what you wana achieve.
    Khurram

  • Datablock not assosicated with the database on forms 10G is giving me an er

    Hi All,
    I have a simple form (D/2000 10G)
    I would like to create simple datablock which not assosicated with the database, The text-items will be populated by triggers on validate
    Save should trigger stored procedure with DML commands.
    The form is working great, but when when I press "Save", I get "FRM-40401 No changes to save error"
    How can I do it ?
    Adi.
    Message was edited by:
    user566257

    You can do it without creating a new button.
    If you want to use the default 'Save' button, just create a KEY-COMMIT trigger on form level and from this trigger call your procedure.
    You can also include a message to inform the user that the record(s) has been saved. either within your DML procedure or the trigger code.
    Regards,
    Tony Garabedian

  • Changing the language in forms 10g

    Hi All,
    My windows operating system was installed without setting my language, after that I installed forms 10g
    The forms didn't read my language, I setup my language on the operating system but it still question marks when I try to write it (???????) in the form builder.
    Any solution please...

    Ciao Haytham,
    In the Registry:
    On Windows systems,
    You can easily modify this subkey with the Windows Registry Editor:
    Start -> Run...Type "regedit", and click "ok"Edit the following registry
    entry:HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEx\where "x" is the unique number identifying the Oracle home.HOME0 is the first installation
    There you have to set an entry with name NSL_LANG
    e.g. in Italian
    NLS_LANG (Value name)
    ITALIAN_ITALY.WE8MSWIN1252 (Value data)
    Hope this you solve

  • 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

Maybe you are looking for

  • Release order with reference to Contract.

    Hello all Client is using the quantity contract & against that Release order are created ,after changing the contract price, new release order will pick up new price from contract, Now the requirement is Old release order(GRN & INVOICE NOT DONE) pric

  • No code in EXIT_SAPLCQBM_002, but data in fqpmz has been deleted!!!!

    Hi, I checked the standard program regarding the assginment MIC in inspection plan and found an interesting matter: Program: SAPLQPAA Include: LQPAAFI5 PERFORM plmkb_fuellen_aus_qpmk USING plmkb qpmk qpmz qpmt. CQ_BM_PLMKB_FROM_QPMK There is an user

  • Wlc 2106 problem ( cant connect to 2 lwapp ( 1242 & 1131 ) need advice

    Dear All, could you give me some advice to configure wlc with 2 lwapp, i did try to used 1 lwapp ( 1242 ag ) and it's work, but when i try to connect with 2 lwapp ( 1242 & 1131 ), i can't associated with lwapp 1131 ag, i did used same configuration f

  • AppServ Control keeps mangling dateTime fields in WS tests

    I've deployed a web service that takes 2 dateTime fields as parameters. The format of the dateTime fields is xsd:dateTime (YYYY-MM-DDTHH:mm:ss.SSS). However, every time I type in a value in the datTime form field, and press the Invoke button, the AS

  • War inside ear; Classpath problem

    I have a deployment structure like the following: app.ear + META-INF --application.xml  --lib -- commons*.jar --ejb.jar --web.war --WEB-INF --META-INF  I have all the common jars inside top level lib directory. The war file references them through an