How to create a loop in this case?

Hi! I'm trying to use the if statement, but the code is only read once.
How do I get this code to be read several times?
For example, when the car passes the detector the number goes to 10.
So the code does not detect the if statement because the code is only read once.
Code:
var score: Number = 9;
if (score == 10)
gotoAndPlay (3);

you could put that code in a function and use a loop (like enterframe to call it) or, even more efficent, call the function whenever score could be changed.

Similar Messages

  • I create cloud ID long time ago. My cloud ID is email. This email is not working now. I cant check inbox. How I can reset password in this case?

    I create cloud ID long time ago. My cloud ID is email. This email is not working now. I cant check inbox. How I can reset password in this case?

    https://appleid.apple.com

  • How to create a hirarchy for this characteristic having lengh 50?

    Hi guru's
    I have a scenario like characteristic is having lengh 50.Now I want to create a hierarchy for this characteristic.
    But Hirarchy allows maximum lengh 32chrs only.
    So could you please let me know how to create a hirarchy for this characteristic having lengh 50?
    Thanks in advance
    Sivanand

    Isn't this the same question as here:
    Hi all, Have a problem, Please let me know urgently.
    Why the duplicate postings with different names??

  • HT5312 How do I cancel purchase (in this case renting movie) from App Store

    How do I cancel purchase (in this case renting movie from App Store)?

    There is no cancel. You may be able to get a lucky exception for a refund (no promises).
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • How to create a report like this.

    Userid       logintime                                                    logouttime
    367     2008-12-22 08:58:09.000          2008-12-22 10:18:02.000     
    369     2008-12-22 08:52:04.000          2008-12-22 10:18:13.000     
    371     2008-12-22 08:58:27.000          2008-12-22 10:36:24.000     
    374     2008-12-22 08:01:26.000          2008-12-22 10:17:54.000     
    375     2008-12-22 08:56:14.000          2008-12-22 10:18:16.000     
    376     2008-12-22 08:57:38.000          2008-12-22 10:17:57.000     
    463     2008-12-22 12:05:13.000          2008-12-22 13:01:39.000     
    450     2008-12-22 12:01:31.000          2008-12-22 12:14:42.000     
    from this data....i want to find how many people online each hour.
    Time      Login
    8AM         0
    9AM     5
    10AM     5
    11AM     0
    12PM     2
    01PM     0
    02PM     0
    03PM     0
    04PM     0
    05PM     0

    I don't think..both person's solution will work in this case.
    My user table data is like this.
    Userid          logintime                                  logouttime
    367              2008-12-22 08:58:09.000           2008-12-22 10:18:02.000
    369              2008-12-22 08:52:04.000           2008-12-22 10:18:13.000
    371              2008-12-22 08:58:27.000           2008-12-22 10:36:24.000
    374              2008-12-22 08:01:26.000           2008-12-22 10:17:54.000
    375              2008-12-22 08:56:14.000           2008-12-22 10:18:16.000
    376              2008-12-22 08:57:38.000           2008-12-22 10:17:57.000
    463              2008-12-22 12:05:13.000           2008-12-22 13:01:39.000
    450              2008-12-22 12:01:31.000           2008-12-22 12:14:42.000
    from this data....i want to find how many people online each hour using a report.
    Time              Login
    8AM              0
    9AM              5
    10AM            5
    11AM            0
    12PM            2
    01PM            0
    02PM            0
    03PM            0
    04PM            0
    05PM            0
    i think this is not possible using report.
    maybe i need to create a view in db from above table first and out of view should be report data...then just use report to display.
    is there a better and easy solution than above?
    nobody ever tried a report like this?.
    we need group by time function in crstal...each hour, each 30 mins, each 15 mins etc...more time features..

  • How to use dynamic SQL in this case for best performance

    I have the table with following columns
    ID NUMBER,
    DATA LONG,
    TAG VARCHAR2(255)
    Records in this table will be like following
    1 this is an abstract ABSTRACT
    1 this is author AUTHOR
    1 100 PRICE
    2 this is an abstract ABSTRACT
    2 this is author AUTHOR
    3 contract is this CONTRACT
    Basically all the records with the same number constitute 1 record for another table. Tag in the above table indicates that what column it is and DATAwill have the actual data for that column. I need to populate the second table based an the above table but will not get the same number of TAGS all the time. I need to insert the values only for the columns provided in the TAG field. How will I accomplish this by dynamic sql. Do I create a loop and create two strings one with columns and one with values and then combine them and use execute immediate to insert into table? Is there an easier way to do this??
    Please respond quickly.
    Thanks
    Bhawna
    null

    > so which collection should i use to perform it..
    so that performance is best......
    Program to interfaces. That way, you can switch out implementations and test for yourself which performance is best in an actual production context. But first, write your program so that it works. Worry about refactoring for performance once your program is written and it works.
    > plz send me the logic....
    Give it a shot on your own first; we can help if you get stuck.
    ~

  • How to create an object for this Question...

    i want to create an object to Factorial.java, but the class is in String object... how can i do that
    please help me with code how to create an object
    String str = Factorial.java;
    i tried to do like this
    str s1 = new str();
    this way is not working...
    thank u

    yes sir am trying to instantiate and retrieve the metadata, am a student am asked to do Program Analyzer, while fullfilling the application requirements i came across this situation, like i have to find total number of public methods in any source file that is entered as input.
    Am taking the input in String variable, i can have the details of the source class only of i instantiate and create an Object to that....
    Please suggest me some way to do that... JAVA is so interesting am working on the project since 2 weeks am done with all other classes but struck here finding the total number of methods...
    Thank you

  • Hi how to avoid nested loops in this program to improve the performence

    Hi all
    How to avoide the nested loops in this programing what is the replacement for the nested loops in this program coding......
    LOOP AT itb_ekpo.
        READ TABLE itb_marc WITH KEY
           matnr = itb_ekpo-matnr
           werks = itb_ekpo-werks BINARY SEARCH.
        CHECK sy-subrc = 0.
    FAE 26446 fin remplacement
        itb_pca-ebeln = itb_ekpo-ebeln.
        itb_pca-ebelp = itb_ekpo-ebelp.
      itb_pca-lifnr = itb_ekko-lifnr.   "-FAE26446
        itb_pca-lifnr = itb_ekpo-lifnr.                         "+FAE26446
        itb_pca-ekgrp = itb_ekpo-ekgrp.                         "+FAE26446
        itb_pca-dispo = itb_ekpo-dispo.                         "+FAE26446
        itb_pca-matnr = itb_ekpo-matnr.
        itb_pca-werks = itb_ekpo-werks.
      Recherche du libellé article
        READ TABLE itb_makt
                   WITH KEY matnr = itb_ekpo-matnr
                            spras = text-fra
                   BINARY SEARCH.
        IF sy-subrc = 0.
          itb_pca-maktx = itb_makt-maktx.
        ELSE.
          READ TABLE itb_makt
                    WITH KEY matnr = itb_ekpo-matnr
                             spras = text-ang
                    BINARY SEARCH.
          IF sy-subrc = 0.
            itb_pca-maktx = itb_makt-maktx.
          ENDIF.
        ENDIF.
        IF NOT itb_ekpo-bpumn IS INITIAL.
          itb_pca-menge = itb_ekpo-menge * itb_ekpo-bpumz /
                                           itb_ekpo-bpumn.
        ENDIF.
      Sélect° ds la table EKES des dates de livraisons et des qtés
      en transit
        CLEAR w_temoin_ar.
        CLEAR w_etens.
        LOOP AT itb_ekes
                FROM w_index_ekes.
          IF  itb_ekes-ebeln = itb_ekpo-ebeln
          AND itb_ekes-ebelp = itb_ekpo-ebelp.
            IF itb_ekes-ebtyp = text-arn.
              itb_pca-eindt = itb_ekes-eindt.
              w_temoin_ar = 'X'.
            ELSE.
            Si c'est une qté en transit alors on recupere
            la quantité et la date.
              IF itb_ekes-dabmg < itb_ekes-menge.
                itb_pca-qtran = itb_pca-qtran + itb_ekes-menge -
                                itb_ekes-dabmg.
              ENDIF.
              IF itb_ekes-etens > w_etens.
                w_etens = itb_ekes-etens.
                itb_pca-dtran = itb_ekes-eindt.
              ENDIF.
            ENDIF.
          ELSEIF itb_ekes-ebeln > itb_ekpo-ebeln
          OR ( itb_ekes-ebeln = itb_ekpo-ebeln
          AND itb_ekes-ebelp > itb_ekpo-ebelp ).
            w_index_ekes = sy-tabix.
            EXIT.
          ENDIF.
        ENDLOOP.
      S'il n'y a pas d'AR alors récupérat° de la date livraison dans EKET.
        LOOP AT itb_eket
                FROM w_index_eket.
          IF  itb_eket-ebeln = itb_ekpo-ebeln
          AND itb_eket-ebelp = itb_ekpo-ebelp.
            IF w_temoin_ar IS INITIAL.
              itb_pca-eindt = itb_eket-eindt.
            ENDIF.
            itb_pca-slfdt = itb_eket-slfdt.
          Calcul du portefeuille fournisseur à partir de la
          qté commandée et la qté reçue
            itb_pca-attdu = itb_pca-attdu + itb_eket-menge -
                            itb_eket-wemng.
          Calcul du montant du poste
            itb_pca-netpr = itb_ekpo-netpr * itb_pca-attdu.
            IF itb_ekpo-peinh NE 0.
              itb_pca-netpr = itb_pca-netpr / itb_ekpo-peinh.
            ENDIF.
          Calcul quantité réceptionnée.
            itb_pca-wemng = itb_pca-wemng + itb_eket-wemng.
          Calcul du retard en nombre de jours calendaires
          Le calcul du retard  ne doit pas prendre en compte
          le jour de livraison
            ADD 1 TO itb_eket-eindt.
            IF NOT itb_pca-attdu  IS INITIAL
            AND    itb_eket-eindt LT sy-datum.
            Calcul du retard en nombre de jours ouvrés
              CLEAR w_retard.
              CALL FUNCTION 'Z_00_BC_WORKDAYS_PER_PERIOD'
                   EXPORTING
                        date_deb = itb_eket-eindt
                        date_fin = sy-datum
                   IMPORTING
                        jours    = w_retard.
              itb_pca-rtard = itb_pca-rtard + w_retard .
            ENDIF.
          ELSEIF itb_eket-ebeln > itb_ekpo-ebeln
          OR (   itb_eket-ebeln = itb_ekpo-ebeln
          AND    itb_eket-ebelp > itb_ekpo-ebelp ).
            w_index_eket = sy-tabix.
            EXIT.
          ENDIF.
        ENDLOOP.
      Recherche de la derniere date de livraison.
        LOOP AT itb_mseg
                FROM w_index_mseg.
          IF  itb_mseg-ebeln = itb_ekpo-ebeln
          AND itb_mseg-ebelp = itb_ekpo-ebelp.
            READ TABLE itb_mkpf
                       WITH KEY mblnr = itb_mseg-mblnr
                                mjahr = itb_mseg-mjahr
                       BINARY SEARCH.
            IF sy-subrc = 0.
              IF itb_mkpf-bldat > itb_pca-bldat.
                itb_pca-bldat = itb_mkpf-bldat.
              ENDIF.
            ENDIF.
          ELSEIF itb_mseg-ebeln > itb_ekpo-ebeln
          OR (   itb_mseg-ebeln = itb_ekpo-ebeln
          AND    itb_mseg-ebelp > itb_ekpo-ebelp ).
            w_index_mseg = sy-tabix.
            EXIT.
          ENDIF.
        ENDLOOP.
        APPEND itb_pca.
        CLEAR itb_pca.
    FAE26446 suppression parag. suivant
         ELSEIF itb_ekpo-ebeln > itb_ekko-ebeln.
           w_index_ekpo = sy-tabix.
           EXIT.
         ENDIF.
       ENDLOOP.
    Fin FAE26446
      ENDLOOP.
    Thanks in advance for all.....

    Hi
    these are the performance tips
    Instead of using nested Select loops it is often better to use subqueries.
    SELECT * FROM SPFLI
      INTO TABLE T_SPFLI
      WHERE CITYFROM = 'FRANKFURT'
        AND CITYTO = 'NEW YORK'.
    SELECT * FROM SFLIGHT AS F
        INTO SFLIGHT_WA
        FOR ALL ENTRIES IN T_SPFLI
        WHERE SEATSOCC < F~SEATSMAX
          AND CARRID = T_SPFLI-CARRID
          AND CONNID = T_SPFLI-CONNID
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    The above mentioned code can be even more optimized by using subqueries instead of for all entries.
    SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
        WHERE SEATSOCC < F~SEATSMAX
          AND EXISTS ( SELECT * FROM SPFLI
                         WHERE CARRID = F~CARRID
                           AND CONNID = F~CONNID
                           AND CITYFROM = 'FRANKFURT'
                           AND CITYTO = 'NEW YORK' )
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    <b>Internal Tables</b>
    1.     Table operations should be done using explicit work areas rather than via header lines.
    2.     Always try to use binary search instead of linear search. But don’t forget to sort your internal table before that.
    3.     A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
    4.     A binary search using secondary index takes considerably less time.
    5.     LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
    6.     Modifying selected components using “ MODIFY itab …TRANSPORTING f1 f2.. “ accelerates the task of updating  a line of an internal table.
    Point # 2
    READ TABLE ITAB INTO WA WITH KEY K = 'X‘ BINARY SEARCH.
    IS MUCH FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY K = 'X'.
    If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
    Point # 3
    READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
    Point # 5
    LOOP AT ITAB INTO WA WHERE K = 'X'.
    ENDLOOP.
    The above code is much faster than using
    LOOP AT ITAB INTO WA.
      CHECK WA-K = 'X'.
    ENDLOOP.
    Point # 6
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
    The above code is more optimized as compared to
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1.
    7.     Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
    8.    If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
    9.    "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to “ LOOP-APPEND-ENDLOOP.”
    10.   “DELETE ADJACENT DUPLICATES“ accelerates the task of deleting duplicate entries considerably as compared to “ READ-LOOP-DELETE-ENDLOOP”.
    11.   "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to “  DO -DELETE-ENDDO”.
    Point # 7
    Modifying selected components only makes the program faster as compared to Modifying all lines completely.
    e.g,
    LOOP AT ITAB ASSIGNING <WA>.
      I = SY-TABIX MOD 2.
      IF I = 0.
        <WA>-FLAG = 'X'.
      ENDIF.
    ENDLOOP.
    The above code works faster as compared to
    LOOP AT ITAB INTO WA.
      I = SY-TABIX MOD 2.
      IF I = 0.
        WA-FLAG = 'X'.
        MODIFY ITAB FROM WA.
      ENDIF.
    ENDLOOP.
    Point # 8
    LOOP AT ITAB1 INTO WA1.
      READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
      IF SY-SUBRC = 0.
        ADD: WA1-VAL1 TO WA2-VAL1,
             WA1-VAL2 TO WA2-VAL2.
        MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
      ELSE.
        INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
      ENDIF.
    ENDLOOP.
    The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
    LOOP AT ITAB1 INTO WA.
      COLLECT WA INTO ITAB2.
    ENDLOOP.
    SORT ITAB2 BY K.
    COLLECT, however, uses a hash algorithm and is therefore independent
    of the number of entries (i.e. O(1)) .
    Point # 9
    APPEND LINES OF ITAB1 TO ITAB2.
    This is more optimized as compared to
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    Point # 10
    DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
    This is much more optimized as compared to
    READ TABLE ITAB INDEX 1 INTO PREV_LINE.
    LOOP AT ITAB FROM 2 INTO WA.
      IF WA = PREV_LINE.
        DELETE ITAB.
      ELSE.
        PREV_LINE = WA.
      ENDIF.
    ENDLOOP.
    Point # 11
    DELETE ITAB FROM 450 TO 550.
    This is much more optimized as compared to
    DO 101 TIMES.
      DELETE ITAB INDEX 450.
    ENDDO.
    12.   Copying internal tables by using “ITAB2[ ] = ITAB1[ ]” as compared to “LOOP-APPEND-ENDLOOP”.
    13.   Specify the sort key as restrictively as possible to run the program faster.
    Point # 12
    ITAB2[] = ITAB1[].
    This is much more optimized as compared to
    REFRESH ITAB2.
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    Point # 13
    “SORT ITAB BY K.” makes the program runs faster as compared to “SORT ITAB.”
    Internal Tables         contd…
    Hashed and Sorted tables
    1.     For single read access hashed tables are more optimized as compared to sorted tables.
    2.      For partial sequential access sorted tables are more optimized as compared to hashed tables
    Hashed And Sorted Tables
    Point # 1
    Consider the following example where HTAB is a hashed table and STAB is a sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    This runs faster for single read access as compared to the following same code for sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE STAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    Point # 2
    Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
    LOOP AT STAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.
    This runs faster as compared to
    LOOP AT HTAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.
    <b>Reward if usefufll</b>

  • How to create particular loop

    Hi
    Can anyone tell me how to create my particular animation into a loop? The two main problems:
    - How to make the first and last frames "match", so the animation looks fluently.
    - At the moment it fades in and that is not allowed (since I need to export the movie as a loop).
    Here's the animation file: http://dl.getdropbox.com/u/175241/how_to_make_it_loop.aep
    Thanks for your time
    //MadsRH
    madsrh(a)gmail.com

    Thank you for the link I didn't know that site.
    I saw the looping videos, but I can't seem to find anything about looping particular.

  • How to create replacement variable in my case?

    I have one time info in my cube call datefrom, now I want to calculate the days after I input date data into pop-up window, system will automatically calculate the days namely input date data minus datefrom data from cube. So how to handle this case. Pls give info step by step. Thanks!

    Hi,
    Try this:
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Rgs,
    I.R.K

  • RethinkDB - how to create a PKGBUILD for this monster?

    Hi!
    After an interesting discussion on HackerNews about RethinkBD, I wanted to take a look for myself. Using it in Ubuntu (my work system) wasn't that bad, they build package for that one, and looked like something I might like to play with. But for that I'd wanted to have a package for my personal system running Arch, and there don't seem to be one.
    I did have a big bunch of packages before (not saying that they were any good, but have seen enough to know what might be relatively easy and what will be hard). When I checked out the build information, it just looks terrifying. The big list of dependencies is not that bad, but the other requires are nodejs, node libraries, ruby libraries, some of them are on AUR but orphaned and cannot be really relied on....
    Any suggestion how to get the bottom of this?

    Trilby wrote:Strictly speaking, your PKGBUILD only has to list the dependencies.  If the dependencies are broken, your PKGBUILD doesn't need to solve that.
    Thinking about it, I see your point, while I still feel that it's not the complete picture. That way I can make a package for myself, and using nvm/rvm for the missing packages, but e.g. then I couldn't really upload it to AUR or if I was, definitely someone would remove it because of being broken (and would be right about it.
    Trilby wrote:
    Of course it would be pointless to have a PKGBUILD that depended on something broken, but you should push those maintainers to fix their PKGBUILDs.
    Have you checked that those dependencies can't be satisfied by packages in the repos?  Nodejs, for example, is in [community] and rubygems is provided by ruby in [extra].  In fact, I don't see anything there that would not likely be provided by something in the main repos.
    EDIT: upon looking closer ruby_protobuf and coffee-script-git are aur-only, do those fail to build from the aur?
    Looking at things, they might need older nodejs version, coffee-script and their dependencies are in AUR, ruby_protobuf and ruby-less (and their dependencies) seem to be orphaned packages on AUR....

  • How to create a loop for my problem? Please read for more detail.

    Hi guys,
    I am doing my project and currently i faced one problem and that is more towards looping i guess. My project is about embedding and I had done all the embeding stuffs already but I am only able to embed my barcode into image at starting at coordinate 0,0.
    What i want to know is how do i had to structure my loop so that i can embed my barcode even when i start at x=20 and y=30 for example?
    currently i used nested for loop which is why i can only start at 0,0.
    I wanted to make it something like this:
    for<lets make it x=20>
    for<lets make it y=30>
    <my code retrieve pixel at x=20 y=30>
    <my code retrieve pixel of barcode at x=0 y=1>
    end
    end
    end
    I wanted to have something like above where i can start at 20,30 but at that certain cooridnate i will starting retrieve barcode pixel at 0,0.

    So just say what you don't know how to do, because what I showed is exactly what you need.
    So please answer the following:
    1.) I have an image of my barcode and I don't know how to paint it onto another image.
    or is it
    2.) I have a routine that draws a barcode at a fixed location and I don't know how to get it to draw anyplace I tell it.
    or
    3.) I don't have anything yet, and I want someone to code this for me.
    or it is
    4.) Les you don't have any idea what I want to do, so here is what I need (pay more attention):
    but in any case (well except #3), you'll be better off if you can give us some code to look at and explain what you are specifically trying to do and where you are having problems.

  • How to create an acitivty inside a Case

    Dear All,
    Sorry to bother. We are using CRM 7.0 SAP GUI for Case Management and Activity Management. Use t-code SCASE to enter Case Management, to create a new case, save it. Now we are trying to create a new activity inside that case. How can we do that? Or if we have an existing activity, how do we link that to an existing case?
    Your input is much appreciated!
    Leon

    Hi Leon,
    In order to link an existing activity to the case, choose the button 'Linked Objects'.
    Choose the link Business transaction inorder to link and create an activity.
    Wish this helps.
    Regards,
    Shalini Chauhan

  • How to create random loop

    i am trying to create a picture quiz what picks randomly 50
    pictures from 500.
    how can i do that i wont pick twice the same picture.
    So how to code a random code what fist picks a
    number...stores it to variable..then
    stores it to array? and next time when picking number it
    first checks is that number already in the array
    and if it is then does another random untill finds a number
    what is "new" , not in the array?

    hi,
    I'm using random functions quite a lot at the moment.
    In Flash you'd use:
    var random_number:Array = new Array();
    var i:Number;
    for (i = 0; i < 50; i++) {
    trace(i);
    random_number(i) = random(500)
    (those should be square brackets around the i after the
    'random_number' in the assigning line)
    this would randomly choose a number from 0 to 499 and assign
    it to the variable random_number array - indexed according to the
    current step within the loop. The loop will run for 50 loops giving
    you your 50 numbers.
    I'm tight on time so....all that's left is that within the
    loop you'd just need to do a conditional check before assigning a
    value.
    Hope that helps!

  • How to create a report in this style

    Hello,
    I faced a problem about report display in dashboard.
    there are a year prompt, If I choose 2010, the report will show three years' sales , namely 2009,2010,2011, three years' data.
    like:
    YEAR 2009 2010 2011
    SALES 100 200 300
    and if I choose 2009, it will display 2008,2009,2010, three years' data.
    How can I realize this requirement?
    waiting for your help, thank you!

    Here you go..Just follow these steps blindly and you are done.
    1) Create a year prompt with presentation variable as pv_year
    2) Create a report say Mid report with year column selected 3 times
    - Put a filter of pv_year presentation variable on first year column with a default value say @{pv_year}{2008}
    - Rename the second time column say YEAR+1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)+1
    - Rename the second time column say YEAR-1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)-1
    Now when you will run Mid Report, this will give you a records with value as 2008 2009 2007
    3) Create your main report with criteria as Year and Measure col
    - Change the fx for year column as CAST(TIME_DIM."YEAR" AS INT)
    - Now put a filter on year column with Filter based on results of another request and select these:
    Relationship = greater than or equal to any
    Saved Request = Browse Mid Report
    Use values in Column = YEAR-1
    - Again,put a filter on year column with Filter based on results of another request and select these:
    Relationship = less than or equal to any
    Saved Request = Browse Mid Report (incase it doesn't allow you to select then select any other request first and then select Mid Report)
    Use values in Column = YEAR+1
    This will select Year > = 2007 AND Year < = 2009. Hence the results will be for year 2007,2008,2009
    This will 100% work...
    http://i56.tinypic.com/wqosgw.jpg
    Cheers

Maybe you are looking for

  • Ipod not seen by itunes?

    Have bought a refurbed Ipod for my son and set up a new account on my laptop. Husband uses older version of itunes on home pc. Ipod initially picked up by itunes and it has named it but will not generally sync. Have run diagnostics and it says cannot

  • Embedding a SWF file with an iFrame

    I wanted to embed an assessment in to one of my PDFs. I know I can't do it directly so I tried to create a small little Flex app that shows an iFrame (see here for the example). I then tried to insert this (as a SWF) in to my PDF file. I have a probl

  • Javac bug database still being maintained?

    After the Oracle acquisition, is the javac bug database still being maintained? I submitted a bug report on 04/20/2010 and received an e-mail response back confirming it was a new bug on 04/22/2010. The e-mail said it would be posted in the external

  • Authorization/deauthorization

    My friend came over and we both authorized each others computers on iTunes so we could share apps. I no longer want my friend to be able to use my iTunes purchases. How do I stop him from using my purchases on his computer?

  • Read metadata from file cancel modifications !

    Hi, I use Lightroom 1.1 in french. I made some photo (in raw but in jpeg the result is the same) and import them in Lightroom with conversion in DNG. In Lightroom, in develop module, I crop, change contrast and som others. After that, I geotag my DNG