Calling variables from a loop

Hi
I have 6 variables declaerd:
b_banner0 iloug.iloug_activities.banner0%type;
b_banner1 iloug.iloug_activities.banner1%type;
b_banner2 iloug.iloug_activities.banner2%type;
b_banner3 iloug.iloug_activities.banner3%type;
b_banner4 iloug.iloug_activities.banner4%type;
b_banner5 iloug.iloug_activities.banner5%type;
i would like to loop through the variables and do with them something, is it possible to call the variables in a dynamic way, somthong like this:
for i IN 0..5 loop
if not(b_banner| |i IS NULL) then
end if;
end loop;i get an error message that b_banner has to be declared, apperantly, it doesnt understand the | | sign in this case, is there another way?
Thx in advance
Esther
null

Hy Esther in this case declare the vars as one PLSQL-Table/Varray, then you can use the for -loop efficient;
Karl[
QUOTE]Originally posted by Esther levin ([email protected]):
Hi
I have 6 variables declaerd:
b_banner0 iloug.iloug_activities.banner0%type;
b_banner1 iloug.iloug_activities.banner1%type;
b_banner2 iloug.iloug_activities.banner2%type;
b_banner3 iloug.iloug_activities.banner3%type;
b_banner4 iloug.iloug_activities.banner4%type;
b_banner5 iloug.iloug_activities.banner5%type;
i would like to loop through the variables and do with them something, is it possible to call the variables in a dynamic way, somthong like this:
for i IN 0..5 loop
if not(b_banner| |i IS NULL) then
end if;
end loop;i get an error message that b_banner has to be declared, apperantly, it doesnt understand the | | sign in this case, is there another way?
Thx in advance
Esther
null

Similar Messages

  • XSL-How to get value of a variable from inside loop-- to the outside loop?

    Pls help
    hi im currently working on this xsl file..
    This works on generating a txt file,my problem right now is
    ' how can i get the value of a variable generated from the inside forloop,
    i have to get the total,sum value of this variables after performing the loop
    ***this is the for loop
    <xsl:for-each select="OutboundPayment">
    <xsl:variable name='id' select='generate-id(OutboundPayment)'/>
    <xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
    <xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
    <xsl:value-of select='$id'/>
    <xsl:text>D</xsl:text>
    <xsl:value-of select='$DDate'/>
    <xsl:value-of select='$Batch'/>
    <xsl:text>3</xsl:text>
    <xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
    <xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
    <xsl:value-of select='substring(Payee/Name,1,20)'/>
    <xsl:value-of select='$PValue'/>
    <xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
    <xsl:variable name="LHash">
    <xsl:call-template name="GetHash">
    <xsl:with-param name="A1" select="$PValue" />
    <xsl:with-param name="A2" select="$Addend" />
    </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="concat('[',$LHash,']')" />
    <!--LHash*i have to get the total amount of this one from the outside loop /---->
    <xsl:call-template name='NewLine'/>
    </xsl:for-each>
    <!--I have to put in here the total value of that LHash/---->
    <!--This is the template on how to get the value of that variable in the inside loop/---->
    <xsl:template name="GetHash">
    <xsl:param name='A1'/>
    <xsl:param name='A2'/>
    <xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
    <xsl:variable name='Weight' select='317191314191112'/>
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="15"/>
    <xsl:with-param name="Sum" select="$TwoSum"/>
    <xsl:with-param name="Wgt" select="$Weight"/>
    <xsl:with-param name="Tot" select="0"/>
    </xsl:call-template>
    </xsl:template>
    <xsl:template name='WDigit'>
    <xsl:param name='Cnt'/>
    <xsl:param name='Sum'/>
    <xsl:param name='Wgt'/>
    <xsl:param name='Tot'/>
    <xsl:choose>
    <xsl:when test="$Cnt > 0">
    <xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
    <xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
    <xsl:variable name='Prduct' select='$Multip$Factor'/>
    <!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
    <!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
    <!--xsl:call-template name='NewLine'/-->
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="$Cnt - 1"/>
    <xsl:with-param name="Sum" select="$Sum"/>
    <xsl:with-param name="Wgt" select="$Wgt"/>
    <xsl:with-param name="Tot" select="$Tot+$Prduct"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="Rem" select="$Tot mod 11"/>
    <xsl:variable name="Chk" select="11 - $Rem"/>
    <xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:template name='GetTotal'>
    </xsl:template>
    Thanks in advance for those who are willing to help.
    -Leighya

    It would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
    If that wasn't what you were asking, then please post your code in a readable format.

  • Call variable from outside method

    I have a method for a listSelectionListener with a variable in it called "results", I want to be able to get the information from this variable outside of this method. In my main class alled "gifts" I have a TextArea and I want "results" to be displayed in it but I can't get results into it because it's in a seperate method. Anyone know how I can do this?
    Heres some relevant code:
    public Gifts()
              super( "Spiritual Gift Database" );
              try
                   Class.forName(JDBC_DRIVER);
                   conn = DriverManager.getConnection(DATABASE_URL);
                   stat = conn.createStatement();
                   ResultSet rs = stat.executeQuery("SELECT heading1 FROM demo");
                   Vector vector1 = new Vector();
                   while(rs.next()) vector1.add(rs.getObject(1));
                   container = getContentPane();
               container.setLayout( new FlowLayout() );
                   nameListPanel = new JPanel();
                   statListPanel = new JPanel();
                   buttonPanel = new JPanel();
               nameList = new JList(vector1);
               nameList.setVisibleRowCount( 9 );
                   nameList.setPrototypeCellValue("XXXXXXXXXXXX");
                   nameList.addListSelectionListener(
                        new ListSelectionListener()
                             public void valueChanged(ListSelectionEvent event)
                                  try
                                       ResultSet resultSet = stat.executeQuery("SELECT * FROM demo");
                                       StringBuffer results = new StringBuffer();
                                       ResultSetMetaData metaData = resultSet.getMetaData();
                                       int numberOfColumns = metaData.getColumnCount();
                                       for(int i = 1; i<=numberOfColumns; i++)
                                       results.append(metaData.getColumnName(i) + "\t");
                                       results.append("\n");
                                       while (resultSet.next())
                                            for(int i = 1; i<= numberOfColumns; i++)
                                            results.append(resultSet.getObject(i) + "\t");
                                            results.append("\n");
                                  catch(SQLException sqlException)
                                       JOptionPane.showMessageDialog(null,sqlException.getMessage(),
                                       "Database Error", JOptionPane.ERROR_MESSAGE);
                                       System.exit(1);
                   statList = new JTextArea(results.toString());
                   add = new JButton("Add Entry");

    Declare you variable at the class level instead of the function level, then you can see if from any method in the class.
    Paul

  • How to access (call) variables from multiple components

    I have what I think is a basic task, but I cant seem to get it to work.  I have a Flex project with one application.  In addition to the one application, I have many components that are used in the application.  These components vary from simple (a ComboBox) to complex (many sub-components).  What I need to do is define a viable in one component and access it in another component.  I can't seem to do this.  Below is an example of how I think it should be:
    Component1
    <mx:Script>
           <![CDATA[
            [Bindable]
            private var userID:int=0;
           ]]>
    </mx:Script>
    Component2
    <mx:TextInput  text="{Component1.userID}"/>
    Any help you can provide would be beneficial.
    Lee

    Hello,
         You may also want to consider using the mx.core method.
         In your main application script area define all of your public variables and functions. Then from your component, you can reference these absolutely with the following syntax.
    <!-- Main App -->
    [Bindable]
    public var userID:int;
    <!-- Component -->
    private function init():void {
         var com_UserID = mx.core.Application.application.userID;
    Using this method ensures that you will have access to any Function or variable within the scope of the project.
    Kind Regards,
    Dr. Ivan Alexander, Ph.D.
    Sr. Applications Engineer
    FlexAppsStore.com
    Sun Microsystems
    MySQL Enterprise Ready Partner 2009

  • Update a front panel indicator from a loop inside a called vi. Without exiting

    I am looking for the best way to update some indicators from within loop within a called .vi.
    I need to update the front panle without exiting the loop.
    I am able to use functional global vi to update the values of front panel indicators from within my nested loops, but I am looking for the best way that these values can be read to update my indicators.
    Thanks

    Or a cluster of references, that way each reference can be named, and can be different types to match the respective indicator.
    There are also methods where you can just send in a VI reference, and in the subVI traverse all the controls and search for the appropriate references by name.
    Take a look at this long nugget.

  • URGENT: Report parameter form set to yes in calling report from menu

    I have write this code for calling report from menu module. But where i put the code
    PARAMFORM='YES' to display the report parameter form in order to enter the parameter by user.
    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_NAME',TEXT_PARAMETER,:GLOBAL.COMPANY);
    Add_Parameter(pl_id,'P_B_NAME',TEXT_PARAMETER,:GLOBAL.BRANCH);
    Add_Parameter(pl_id,'P_user',TEXT_PARAMETER,:GLOBAL.user);
         repid := find_report_object('REPORTOBJ');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,getpath||'E_open_balance.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
              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;

    Jeneesh,
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,
    'paramform=YES
    what about this variable ?
    P_VAR1 = ........');

  • Passing a variable from a movie clip to the main timeline

    Hi,
    I'm having trouble passing a variable from a movie clip in my
    flash file to the main timeline.
    I have a movieclip with the instance name IntroNav which
    contains several buttons. Clicking a button sets the variable
    "page" to a specific name, i.e. page = "home"
    However, outside of the movie clip, on the main timeline I am
    unable to call this variable, and "page" seems to have no value.
    Can anyone tell me why this is and how to solve it?
    Thanks

    Umm, yes ... declare your variables correctly.
    var page:String = new String(); //proper complete
    var page:String; //strict typing
    var page:String = "home"; //stirct typing with value
    declaration
    Do not declare the variable in your buttons, you would have
    to do so in every button and be constantly resetting the value.
    Declare it on the main timeline at the lowest level. You do not
    need to use it as a _global, you just need to resolve your path
    issues. You can 'set' the variable value from a button, without any
    problem, but you have to call to the variable correctly.
    You do not 'name' a variable as "_root.page" , the '_root'
    refers to the lowest level of the SWF or the main timeline, as does
    a call to ' _level0' (that's a zero). If the variable is declared
    on the main timeline, and you're calling from the MC/button or
    anywhere you can refer to the variable by calling to it by
    the proper path of '_root.page'
    To set the variable from any of your button/MC instances
    call:
    _root.page = "value"; OR _level0.page = "value";
    But you must have the varibale declared on the main timeline,
    and only once and the playhead should be stopped or it will reset
    the value to the default upon looping.

  • Return multiple variables from function via DBLINK

    hey,
    I've created a function for use by another database through a dblink.
    I created the function to return a ref cursor but
    have since found out that this is not allowed so i'm looking for
    alternatives?
    Assuming I want to keep the function on our database (for maintainability reasons) what other options do i have?
    Two suggestions i've got are 1) to return a ',' delimited string
    or to have a number of OUT parameters. Is there any reason
    why either of these would not work or would be preferable to the other?
    Thanks for reading, any help much appreciated.
    BTW i'm new to PL/SQL so feel free to dumb it down.
    cheers.
    function....
    CREATE OR REPLACE FUNCTION "GET_SCHEME_DETAILS"
    IN_BRANCH IN VARCHAR2,
    IN_AGENCY IN VARCHAR2,
    IN_PRODUCT_SUFFIX IN VARCHAR2,
    IN_TERM IN INTEGER,
    IN_LOAN_START_DATE IN DATE
    RETURN sys_refcursor AS TYPE RESULTSET IS REF CURSOR;
    and its being called like this....
    select GET_SCHEME_DETAILS@PPPRO ( '864' , '500086' , 'M7' , 10 , TO_DATE ( '01/02/2010' , 'DD/MM/YYYY' ) ) FROM DUAL ;

    I would be amazed if that even compiled.
    The function should look something like:
    CREATE FUNCTION GET_SCHEME_DETAILS (in_branch          IN VARCHAR2,
                                        in_agency          IN VARCHAR2,
                                        in_product_suffix  IN VARCHAR2,
                                        in_term            IN INTEGER,
                                        in_loan_start_date IN DATE) RETURN sys_refcursor AS
       l_ref_cur SYS_REFCURSOR;
       < any other variables that need declaring >
    BEGIN
       OPEN l_ref_cur FOR
          <your select tstatment here>
       RETURN l_ref_cur;
    END;and you would call it from the other database like:
    DECLARE
       l_other_ref_cur SYS_REFCURSOR;
       < any other variables that need declaring  like one for each column in the ref cursor>
    BEGIN
       l_other_ref_cur := get_scheme_details@PPPRO ('864', '500086', 'M7', 10,
                                                    TO_DATE ( '01/02/2010' , 'DD/MM/YYYY' ));
       LOOP
          FETCH l_other_ref_cursor INTO <variable list>
          EXIT WHEN l_other_ref_cursor%NOT_FOUND;
          <do something with the values>
       END LOOP;
       CLOSE l_other_ref_cur;
    END;Having said that, if you are only expecting to get one row back, then you could just as easily use a procedure with out parameters.
    If you expect multiple rows back, you could also just do a query on the other database drectly using the db link assuming that the user that the db link uses to connect has appropriate privileges.
    HTH
    John

  • Clearing variable from Request object

    Hi everyone,
    After getting value from request.getParameter("var"), I want to clear this "var" variable from request scope. So that in the next coming statements if i again call the same request.getParameter("var") statement than it must return null
    So how to handle this issue of clearing certain variable from request scope or flushing the whole request object

    I don't know what you are trying to do but it sounds confused. I would suggest you read the parameter once, at the beginning of the code. Store it in a variable and use that variable as necessary. If you still need help then would you explain what you are trying to achieve here.

  • Call tcode from alv report and passing  group of values

    hi all .
    i want to call tcode from alv report and passing an internal table or group of values to a selection option of that t code ? how
    ex. passing group of GL to fbl3n and display the detials of all .
    thank you

    Dear,
    You have done a small mistake
    --> rspar_line-option = 'EQ'.
         rspar_line-HIGH = PDATE-HIGH.
    u r passing "high" value and in "option u r passing "EQ" so how it will work!!!
    So if u r passing only 1 date or more dates like 01.01.2010 , 15.02.2010 , 10.03.2010 then pass
    rspar_line-selname = 'SO_BUDAT'.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'EQ'.
    rspar_line-LOW = PDATE-HIGH.
    APPEND rspar_line TO rspar_tab.
    or if u r passing low & high date means in range like 01.01.2010 to 30.01.2010, then pass
    rspar_line-selname = 'SO_BUDAT'.
    rspar_line-kind = 'S'.
    rspar_line-sign = 'I'.
    rspar_line-option = 'BT''.
    rspar_line-LOW = PDATE-LOW.
    rspar_line-HIGH = PDATE-HIGH.
    APPEND rspar_line TO rspar_tab.
    try above code , hope it helps...
    i think u cannot use "call transaction using bdcdata" in ur case bcoz as u said in ur 1st post u want to display the details of all but still if u want to use then u should pass all parameters in  loop.
    PROGRAM
    DYNPRO
    DYNBEGIN
    FNAM
    FVAL
    ex:-
    LOOP AT GT_TEMP INTO GS_TEMP.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = 'SAPXXXX'.
    bdcdata_DYNPRO = '1000'.
    bdcdata_DYNBEGIN = 'X'.
    bdcdata_wa-fnam = '''.
    bdcdata_wa-fval = ''.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = ''.
    bdcdata_DYNPRO = ''.
    bdcdata_DYNBEGIN = ''.
    bdcdata_wa-fnam = 'SD_SAKNR'.
    bdcdata_wa-fval = GS_TEMP-GLACCOUNT.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_PROGRAM = ''.
    bdcdata_DYNPRO = ''.
    bdcdata_DYNBEGIN = ''.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = 'XXX'.
    APPEND bdcdata_wa TO bdcdata_tab.
    ENDLOOP.
    try above code if u r using call transaction...
    Edited by: mihir6666 on Jul 9, 2011 3:10 PM
    Edited by: mihir6666 on Jul 9, 2011 3:11 PM
    Edited by: mihir6666 on Jul 9, 2011 3:13 PM

  • 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;

  • Calling Report from Form Error ORA-06508

    Dear all,
    I want migrate from Fom6i to Oracle Developer Suite 10g (10.1).
    Folder Form = C:\APLIORA\IRS\FORM
    Folder Report = C:\APLIORA\IRS\REPORT
    I have modified file DEFAULT.ENV
    FORMS_PATH=C:\APLIORA\IRS\FORM;C:\APLIORA\IRS\REPORT
    i do not have problem call a form from form.
    but when i call report from form show error ORA-06508 : PL/SQL : could not find program unit being called ; -6508
    my procedure is
    PROCEDURE Call_Report IS
         list_id ParamList;
    BEGIN
    list_id := Get_Parameter_List('input_params');
    IF NOT Id_Null(list_id) THEN
    Destroy_Parameter_List(list_id);
    END IF;
    list_id := Create_Parameter_List('input_params');
    Add_Parameter(list_id,'MAXIMIZE',TEXT_PARAMETER,'YES');
    Add_Parameter(list_id,'ORACLE_SHUTDOWN',TEXT_PARAMETER,'YES');
    RP2RRO.RP2RRO_RUN_PRODUCT(REPORTS,'TESTREPORT.REP',SYNCHRONOUS,RUNTIME,FILESYSTEM,list_id,null);
    END ;
    Do I miss something ?
    Can any one help ?
    Thanks

    Hi,
    Thank you for your replay.
    The problem have solved.
    This my step :
    1. Install Windows XP SP2 and Form 10.1.2.0.2 on new pc.
    2. Install Jinit version 1.3.1.28.
    3. Create report server
    3. Compile form, report and pll
    4. call report from from with this procedure :
    PROCEDURE Call_Report (vFILENAME varchar2) IS
    report_id                Report_Object;
    ReportServerJob VARCHAR2(100);
    vc_rep_status      VARCHAR2(100);
    repsvr                          varchar2(21) := 'myserv';
    userid                         VARCHAR2(100);
    pass                          VARCHAR2(100);
    Host                    VARCHAR2(100);
    BEGIN
    userid          := Get_Application_Property(USERNAME) ;
    pass          := Get_Application_Property(PASSWORD) ;
    Host          := Get_Application_Property(CONNECT_STRING) ;
    report_id:= find_report_object('REPORT');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,vFILENAME||'.jsp');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,repsvr);
    ReportServerJob:=run_report_object(report_id);
    vc_rep_status := REPORT_OBJECT_STATUS(ReportServerJob);
    WHILE vc_rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED', null)
    LOOP
    vc_rep_status:=REPORT_OBJECT_STATUS(ReportServerJob);
    END LOOP;
    IF vc_rep_status='FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet?report='||vFILENAME||'.jsp'||'&userid='||userid||'/'||pass||'@'||Host||'&destype=CACHE&desformat=PDF&paramform=yes','_blank');
    ELSE
    message ('Report failed with error message '|| vc_rep_status);
    END IF;
    END;
    Ok, but i have another strange error. I will post new thread.
    Thank you and regards
    Teguh S

  • Problem using local variable in event loop

    I have a state machine from which I want to monitor various controls, including "Start" and "Stop" buttons.  Not every state needs to monitor the controls.  At present, most states run timed loops.  In the first state that reads the front panel, I have an Event structure (inside a While loop) that monitors the various controls' Change Value events.  For numeric controls, I update variables (in shift registers) as needed.  The "Start" button is used to end the While loop controlling the Event structure, allowing the State to exit to the next state.
    My problem comes in subsequent states that employ this same idea.  Here, I put a Local Variable bound to the Start button and use the same code, but it frequently happens that when I enter this particular state, I cannot "turn on" the control -- I push the button, but it stays off.  Curiously, if it was On when I enter, I can turn it off, but then I'm stuck not being able to turn it on.
    I mocked up a very simply routine that illustrates this.  There are two sequences (corresponding to the two states).  Both use an Event loop with a local variable bound to my Stop button (really this is an LED control with custom colors).  I've deliberately moved the "initialization" (the declaration of the control in the block diagram) out of the Event loops -- putting it inside the first loop modifies the behavior in another strange way.
    Here's my thinking on how I would expect this to work:  The code outside Event Loop 1 should have little effect.  Assume the Stop button is initially Off.  You will "sit" in Event Loop 1 until you push the Stop button, changing its value to True; this value will be passed out of the Event case and cause the first While loop to exit.  You now enter the second sequence.  As I understand the Exit tunnel, it defaults to "False", so I'd expect to stay in the second Event loop until I turn the Stop button from On to Off, which will pass out a False, and keep me in the While for one more button push.  However, this doesn't happen -- I immediately exit, as though the "True" value of the Stop local variable is being seen and recognized by the Event loop (even though it hasn't changed, at least not in the context of this second loop).
    An even more curious thing occurs if I start this routine with the Stop button turned on.  Now I start in my Event loop waiting for a change, but this time the change will be from On to Off, which won't cause an exit from the frame.  This will be reflected by having the While loop count increment.  We should now be in the state of the example above, i.e. in an Event loop waiting for the control to be pushed again, and turned On.  However, clicking the control has no effect -- I cannot get it to "turn on".
    Where am I going astray in my thinking?  What is it about this method of doing things that violates the Labview paradigm?  As far as I can tell, what I'm doing is "legal", and I don't see the flaw in my reasoning, above (of course not -- otherwise I'd have fixed it myself!).  Note that because I'm using local variables inside Event loops (and I'm doing this because there are two places in my code where I want to do such testing), the Stop control is not latching (as required).  Is there something that gets triggered/set when one reads a latched control?  Do I need to do this "manually" using my local variable?
    I'll try to attach the simple VI that illustrates this behavior.
    Bob Schor
    Attachments:
    Simple Stop Conundrum.vi ‏14 KB

    altenbach wrote:
    Ravens Fan wrote:
    NEVER have multiple event structures that share the same events. 
    Actually, that's OK.  NOT OK is having multiple event structures in the same sequence structure.
    See also: http://forums.ni.com/ni/board/message?board.id=170&message.id=278981#M278981
    That's interesting.  I had always thought I read more messages discouraging such a thing rather than saying it was okay.  Your link lead me to another thread with this message. http://forums.ni.com/ni/board/message?board.id=170&message.id=245793#M245793.  Now that thread was mainly concentrating on registered user events which would be a different, but related animal. 
    So if you have 2 event structures they each have their own event queue?  So if you have a common event, one structure pulls it off its event queue and it does not affect the other structure's event queue?  I guess the inherent problem with this particular VI was that the second event structure locked the front panel.  Since the code never got to that 2nd event structure because the  first loop never stopped because the change was from true to false.  After reading your post and the others, I did some experimentation and turned off the Lock front panel on the 2nd structure, and that prevented the lockup of the program.
    Overall, the example VI still shows problems with the architecture and I think your answer should put the original poster on the right track.  I think as a rule I would probably never put the same event in multiple structures, I feel there are better ways to communicate the same event between different parts of a program,  but I learned something by reading your reply and about how the event structures work in the background.  Thanks.

  • Accessing variable in a loop

    I cannot access this variable from outside the loop. I know
    it has to be something very simple. When tracing the variable, it
    comes back as undefined. Please help.. Thanks

    when you prefix a variable with var, you make it local to the
    function that contains the variable.

  • Calling Reports From Forms

    Hello,
    i'm trying to call a Report from a Form but i'm getting the error:
    <b>Cannot Get Output of Job ID 91 you requested on Mon Feb 03 14:00:03 BRT 2003.
    REP-56033: Job 91 does not exist<b/>
    I'm using Reports Server 9i (9.0.2.3) and Forms Server 6i.
    The PL/SQL to call the report is something like the following:
    <b>declare
    v_rep_id Report_Object;
    v_rep_job_id Varchar2(200);
    v_rep_status Varchar2(200);
    begin
         v_rep_id := Find_Report_Object('RPT_GENERICO');
         Set_Report_Object_Property(v_rep_id, REPORT_FILENAME, 'plscvnd0013rpt');
         v_rep_job_id := Run_Report_Object(v_rep_id, pLista_ID);
         v_rep_status := Report_Object_Status(v_rep_job_id);
         while v_rep_status in ('RUNNING', 'OPENING_REPORT', 'ENQUEUED')
         loop
              v_rep_status := Report_Object_Status(v_rep_job_id);
         end loop;
         if v_rep_status = 'FINISHED' then
              Web.Show_Document('http://reports.caarj.com.br:7779/reports/rwservlet/getjobid' ||
                                                 substr(v_rep_job_id, 18) || '?server=Rep.caarj.com.br');
    end if;
    end;
    end if;
    Destroy_Parameter_List(pLista_ID);
    end;</b>
    I've already commented out the <security> section, and uncommented the <compatible version="6i"> in <reports_server>.conf file. The rwproxy service is up and running on port 1949 and i'm using SIGLE_SIGN_ON=NO in rwservlet.properties file.
    What could be wrong??
    Regards,
    Marcus Santos.

    Jermima,
    To call Reports9i from Forms6i it needs to be configured for backward compatibility. this means that your Reports9i server must run as if it was a 6i server.
    The following is from an unpublished paper I wrote on this topic:
    Using Reports9i with Forms 6i
    ====================================================
    To be able to call Reports9i Services from a Forms6i client, an extra Reports server process must be created. Oracle9iAS Reports Services knows of two kinds of Reports Server processes. The in-process server is started the first time that a Reports is requested from the Web by
    the Reports Servlet rwservlet. This Reports Server process cannot be used with Forms using Run_Report_Object and therefore a separate Reports Server process must be started prior to using it.
    This can be done by issuing he following command from the Oracle9iAS/bin directory rwserver <servername> batch=yes & (UNIX)or rwserver -install <service name> (WINDOWS)In both cases, the first time that the Reports Server starts, a Reports configuration file <servername>.conf (UNIX) or <service_name>.conf (WINDOWS) is created in the Oracle9iAS/reports/conf directory.
    To use Reports9i Services form a Forms6i client, this file needs some editing:
    The Reports Sevices configuration file gets created with the first start of the Oracle9iAS Reports Services. The configuration settings in this file determine the runtime behavior of the Reports Services.
    Two changes need to be applied to this file to make Oracle9iAs Services work with Forms6i client-server applications. Make sure that the Reports Services process was stopped before opening the Reports Services configuration file, located in the Oracle9iAS/reports/conf directory, with a text editor. The Reports Services configuration file name does apply to the following naming convention.
    Separate server process
    <ServiceName>.conf
    <server>
    [1] <!--compatible version="6i"/-->
    <cache class="oracle.reports.cache.RWCache">
    <property name="cacheSize" value="50"/>
    <!--property name="cacheDir" value="your cache directory"/-->
    <!--property name="maxCacheFileNumber" value="max number of files"/-->
    </cache>
    [2] <security id="rwSec" class="oracle.reports.server.RWSecurity">
    <property name="securityUserid" value="tyKAUY845QDO/2vyaGbQw …" confidential="yes" encrypted="yes"/>
    </security>
    </server>
    Change the following entries in the Reports Services configuration file for the Oracle9iAS Reports Services to accept requests from Forms 6i
    clients.
    [1] Uncomment this line to make Reports9i Services run in 6i compatibility mode. After uncommenting this line it should look similar to this
    <compatible version="6i"/>
    [2] Remove the <security> </security> tag pair and their included content. This effectively disables the Reports Services access control,
    which by default requires a system authentication to be provided by the user to before running a report.
    If later you want to recover access control, then all you need to do is to stop the Reports Services, delete the configuration file and start it up
    again. This leads to a new configuration file being created. Repeat step [1].
    Configure the tnsnames.ora file on the client and the server
    For the Forms6i client server application and the Oracle9i Reports Server to know each other, the tnsnames.ora file needs to be edited on
    both sides. The tnsnames.ora file to use is located in the Forms6i_Home/net80/admin directory on the client and the
    Oracle9iAS/network/admin directory on the server. Add the following entry to both files:
    <report_server_name>.<domain>=
    (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=<hostname of the Reports Server installation>)
    (PORT=1950)
    The following entry is an example for a Reports Server with the name RepSRV in a “world� domain. Note that the port number of the Reports
    Services is defaulted to 1950.
    RepSRV.world=
    (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=<fnimphiu-lap.de.oacle.com)
    (PORT=1950)
    Rwservlet configuration file
    =============================
    Calling Oracle9iAS Reports Services from a Browser URL* accesse the reports servlet first, which then routes the request to the server
    engine, The Reports servlet rwservlet is configured by a file named rwservlet.properties, located in the Oracle9iAS/reports/conf directory.
    Open this file with a text editor and uncomment the following line by remiving the ‘#’ character in front of it.
    # SINGLESIGNON=YES
    Change the value of this varible to No, so that the whole entry reads
    SINGLESIGNON=NO.
    Restart the Oracle9i Application Server, restarting the Oracle process monitor service (OPM), for the changes to take effect.
    From now on the Reports Services does not require users to provide their single sign-on login password when retrieving the Report output
    from the Web, which is one option of getting a Report back to the client.
    * Note that you call the Servlet for retrieving the Reports output through web.show_document

Maybe you are looking for

  • Send e-mail in HTML-format with attachment

    Does function SO_OBJECT_SEND allow to send e-mail with attachment? Does function SO_DOCUMENT_SEND_API1 allow to send e-mail in HTML format?

  • Opinion - MacBook Pro  -is now the time to buy?

    I am looking to replace a 2006 MacBook Core Duo 2 Ghz wi 2 GB RAM and a 500 GB drive with either a 15 or 17 MB Pro with Matte screen (4 GB and 500 GB drive). They have the high end 15 and 17 in stock with matte screens at my local Apple Store. Is now

  • Send object to background?!?

    How do I send an object/graphic to the background so that all of my text will be visable? Everytime I select the graphic, the arrange buttons become active but they do not send it behind the text. It does nothing. The edge of the graphic is covering

  • Upgraded Mac OS X to 10.8.4, Flash Builder cannot launch application

    I've update the JRE to Version 7, and added it to Flash Builder, but I when I run, nothing happens, when I debug, I get the following: The Flash Builder debugger failed to connect to the running application. Ensure that:           1. For in-browser a

  • Pls help abt dbms_space.space_usage

    SQL> declare 2 3 l_fs1_bytes number; 4 l_fs2_bytes number; 5 l_fs3_bytes number; 6 l_fs4_bytes number; 7 l_fs1_blocks number; 8 l_fs2_blocks number; 9 l_fs3_blocks number; 10 l_fs4_blocks number; 11 l_full_bytes number; 12 l_full_blocks number; 13 l_