How to add a row for every 5 records using logic:iterate

Hi,
In my application, using logic:iterate iam displaying 20 records per page.
I want to insert a row for every 5 records.
Please tell how to insert that row.
Thanks in advance.
Mohan

I think this could work for you
for (int x=1 ; x<=20 ; x++) {
addRowWithRecord
if (x%5==0)
addEmptyRow
}

Similar Messages

  • How  to fire a query for every record in a table, pass values in a loop

    Hi,
    For each record in a table, I want to loop through each record and then fire a query by passing acct, product and date from this table to the where clause of the query. I would have to create a pl/sql block..The output of the query I want to spool from sql developer.
    I need the exact syntax please for doing this.. since i am new to Oracle. Just the template will be enough. I will fill in the query.
    Any help is appreciated as always..
    Regards,
    hena

    904385 wrote:
    Hi,
    For each record in a table, I want to loop through each record and then fire a query by passing acct, product and date from this table to the where clause of the query. I would have to create a pl/sql block..The output of the query I want to spool from sql developer.
    I need the exact syntax please for doing this.. since i am new to Oracle. Just the template will be enough. I will fill in the query.
    Any help is appreciated as always..
    Regards,
    henaHave you ever considered using a JOIN ? It does the same thing as looping through a table and applying that to the where clause of a select on a query, only much, much, much faster and without the need to write any code. SQL is a declarative language, so you specify what you want and not how to do it. It can be bit of a journey to change your thought process if you come from a procedural or object world, but once you get there it's a beautiful view.

  • Mac Mini for audio recording using LOGIC X

    Has anyone had experience using the latest Mac mini for audio recording? I'm thinking of purchasing the 2.6GHz Quad-Core Intel Core i7 16GB 1600MHz DDR3 SDRAM - 2x8GB 1TB Serial ATA Drive @ 5400 rpm  model. I'll be using Logic X along with Reasons, Wave, UA plugins with a Apollo I/O  I'd appreciate any feedback and or suggestions.

    I'd work off of another hard drive as much as possible.  Install the applications to your boot drive, but keep your data on a separate external hard drive.  If you try to run OS, apps and big audio data off of that 5400, I foresee performance issues even with 16GB of RAM.  Also, don't forget a second external hard drive for your backups.

  • How to add an space for every line in a text file in 46.B?

    Hi Friends!!
    My problem is the following,
    I need to add spaces in all lines of a text file
    Ej.'ABC ' , I'm using GUI_DOWNLOAD to download the internal table, but the function truncates all spaces, as it is 46B doesn't have the option for allowing the spaces at the end of each line,
    Do you know what can I do?? is there any other function module I could use?? I also tried with WS_DOWNLOAD but it didn't help!
    Thanks so much in advance!!!
    Frinee

    This a short example:
    data: begin of mytable occurs 0,
            line(2),
            lspace type x value '20',
            lenter type x value '0D0A',
          end of mytable.
    mytable-line = '1'.
    condense mytable-line.
    append mytable.
    mytable-line = '2'.
    condense mytable-line.
    append mytable.
    mytable-line = '3'.
    condense mytable-line.
    append mytable.
    call function 'GUI_DOWNLOAD'
         EXPORTING
           BIN_FILESIZE = 50
            FILENAME = 'C:\mybinfile.txt'
            FILETYPE = 'BIN'
         TABLES
            DATA_TAB = mytable
         EXCEPTIONS
           others = 9.

  • How to select a row for update values, Using CTEs or suitable method

    HI All,
    I have a table as claim_data as below.
    claim_id   
    amount         change_monthkey
             created_monthkey
             ord
    54511      
    300            201304         
             201304          
              1
    54511      
    0              201305         
             201304          
              2
    120301     
    250            201502         
             201502          
              1
    120624     
    150            201502         
             201502          
              1
    120624     
    0              201503    
                  201502          
              2
    I want to isolate rows which appear in the table and do a update using below query ( This query is already in a procedure, so I just looking for a suitable way to modify it to support my task )
    In the above e.g.  ONLY row containing claim_id = 120301 needs to update (amount  as updated_amount)
    I use following query, but it update other rows as well, I want a suitable query only to capture rows of nature claim_id = 120301 and do this update? Is there any functions that I could use to facilitate my task??
    select
         a.claim_id
        , a.Created_MonthKey
        , a.Change_MonthKey
        , a.amount - ISNULL(b.amount,0.00) as amount_movement
        ,a.amount  as updated_amount   --- >> I need help here??
        FROM claim_data a
    LEFT JOIN claim_data b
        ON a.claim_id = b.claim_id
        AND b.Ord = a.Ord - 1
    Thanks
    Mira

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your datC1. You should follow ISO-11179 rules for naming data elements. You do not know this IT standard.
    You should follow ISO-8601 rules for displaying temporal datC1. We need to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. 
    And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> I have a table AS claim_data AS below. << 
    Thanks to your lack of netiquette, we have no name, no DDL, no keys and have to re-type the raw data into SQL, guess at everything! Does your boss treat you with the same contempt? 
    Think about how silly “_data” is AS an attribute property! What tables do you have without an data in them? You had to give this meta-data in 1970's operating systems, FORTRAN compilers, etc. but we do not do this today. I see you use “A”, “B”, etc for table
    aliases This is the name of the disk or tape drive in a 1970 computer! In SQL we use helpful, meaningful table aliases so code is easier to maintain. I see you also use the old punch card trick of putting a comma at the front of each line of code. 
    The column named “ord” is a mathematical fiction for ordinal sets. I think you meant to use it as a non-relational sequential number to let you keep writing 1970's COBOL is T-SQL. We have not used the old Sybase ISNULL() since we got COALESCE() in SQL-92. They
    are actually different. 
    First, let's post what you should have posted if you followed forum rules: 
    CREATE TABLE Claims
    (claim_id CHAR(5) NOT NULL,
     claim_amount DECIMAL (8,2) NOT NULL
     CHECK (claim_amount >= 0.00),
     change_month_name CHAR(10) NOT NULL
     REFERENCES Month_Period(month_name),
     creation_month_name CHAR(10) NOT NULL
     REFERENCES Month_Period(month_name),
     ord INTEGER NOT NULL, -- NO!! Awful design! 
     PRIMARY KEY (claim_id, ord)); --required by definition
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Month_Periods
    (month_name CHAR(10) NOT NULL PRIMARY KEY
     CHECK (month_name LIKE '[12][0-9][0-9][0-9]-[01][0-9]-00'),
     month_start_date DATE NOT NULL,
     month_end_date DATE NOT NULL,
     CONSTRAINT date_ordering
     CHECK (month_start_date <= month_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. It has been proposed for the Standard, but is not yet part of it. The regular expression pattern for validation is simple. 
    INSERT INTO Claims  -- a mess! 
    VALUES
    ('054511', 300.00, '2013-04-00', '2013-04-00', 1)
    ('054511', 0.00, '2013-05-00', '2013-04-00', 2),
    ('120301', 250.00, '2015-02-00', '2015-02-00', 1),
    ('120624', 150.00, '2015-02-00', '2015-02-00', 1),
    ('120624', 0.00, '2015-03-00', '2015-02-00', 2);
    Now, throw this mess out. It looks like your repeat the claim creation date over and over and over. It looks like you crammed a claim creation and a claim history together in one table. 
    >> I want to isolate rows which appear in the table and do a update using below query (This query is already in a procedure, so I just looking for a suitable way to modify it to support my task). 
    In the above e.g. ONLY row containing claim_id = '120301' needs to update (amount AS updated_amount)
    >> I use following query, but it update other rows as well, I want a suitable query only to capture rows of nature claim_id = '120301' and do this update? <<
    No. SQL is set oriented so an update applies to the whole table. You can filter out rows in a WHERE clause. 
    CREATE TABLE Claims
    (claim_id CHAR(5) NOT NULL PRIMARY KEY,
     claim_amount DECIMAL (8,2) NOT NULL
     CHECK (claim_amount >= 0.00),
    claim_creation_month_name CHAR(10) NOT NULL
     REFERENCES Month_Period(month_name));
    See how this works? 
    INSERT INTO Claims  -- a mess! 
    VALUES
    ('054511', 300.00, '2013-04-00'),
    ('120301', 250.00, '2015-02-00'),
    ('120624', 150.00, '2015-02-00');
    Normalize the table: 
    CREATE TABLE Claim_Changes
    (claim_id CHAR(5) NOT NULL 
      REFERENCES Claims(claim_id)
      ON DELETE CASCADE,
     change_month_name CHAR(10) NOT NULL
      REFERENCES Month_Period(month_name),
     PRIMARY KEY (claim_id, change_month_name),
     change_amount DECIMAL (8,2) NOT NULL
     CHECK (change_amount >= 0.00)
    INSERT INTO Claims_Changes
    VALUES
    ('054511', 0.00, '2013-05-00'),
    ('120624', 0.00, '2015-03-00');
    Now you just add another change row to the history. There is no update. If you want to the delta and so forth, use LAG() and other window functions. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to add network information for failover zones with logical hostname?

    Hello!
    As stated in [http://docs.sun.com/app/docs/doc/819-3069/ds_template-21?a=view] I must not configure network addresses for a zone when I manage these with a logical hostname:
    If you require the SUNW.LogicalHostName resource type to manage all the zone's addresses, configure a SUNW.LogicalHostName resource with a list of the zone`s addresses and do not configure them by using the zonecfg utility.But when I start the zone for the first time using "zlogin -C" it does not ask me any questions about the network. Of course, there is no adapter configured. But how do I add information like routes or nameservers to the system when using a logical hostname?
    TIA
    Stephan

    Hi Stephan,
    I can only assume that when the zone was configured via zonecfg without any network interfaces that sysidcfg did not ask you for the default route or name service, as such you will need to setup those parts up manually.
    Please take a look at the FAQs for zones, i.e. http://opensolaris.org/os/community/zones/faq/ in particular
    http://opensolaris.org/os/community/zones/faq/#u5
    http://opensolaris.org/os/community/zones/faq/#cfg_defroute
    Finally, if you require a NIS client then please see http://docs.sun.com/app/docs/doc/816-5166/ypinit-1m?a=view
    Regards
    Neil

  • How to add new row in KL02 trx - Activity type control data

    Hi guys.
    I am not a FI-CO consultant, but I want to add a row since KL02 transaction within a cost center, with a new fiscal year. When you access KL02 (change activity type), you set the activity type, then press Master Data and the basic screen appears. If you press the Display planning control button, you will see the "Display Activity Type Control Data" List. I wanna add a row for a specific cost center here, because the cost center I refer has not 2011 as fiscal year. I tried to use, since basic screen of KL02, use the Change planning control button, but when I set my cost center and 2011 as fiscal year, the Save button is inactive. Furthermore, I tried to press the Period screen and a message appeared "No data has been entered yet". So I dont know how to add one row for a cost center in the Planning control (Activity type control data) list of the KL02 transaction, specifically for an activity type. Do you know? Thanks in advance

    Hi,
    The list of cost centers in which the activity type is planned is given in KL02 under planning data.  In order to add a new cost center to this, you need to enter the activity type in transaction KP26 for a particular year. 
    Goto transaction KP26
    Give version - 0
    from period 1 to 12
    year - 2011
    cost center - mention the cost center
    Activity type - mention activity type
    goto overview screen F5 and add the plan price for the activity in the cost center.  This step will automatically add new row in the activity type control data.
    Hope this helps.
    Thanks,
    Ram

  • How to get wage type for every time record

    Hi Pros,
          I am using DS 0CA_TS_IS_1, it includes report time type (0REPTT), but not have wage type. in CATSDB, I fied fields for attendance/absence type and wage type. but not every time record has wage type. can you please tell me how to get wage type for every time record? what is relation between reporting time type, attendance/absence type and wage typs?

    Hello,
    Can you talk to your HR/T&E functional consultant if they populate these values in CATSDB table using standard way or if there are custom fields that are in CATSDB OR any other table which can be used to meed the requirements
    Thanks
    Abhishek Shanbhigue

  • How to popup editor for every record?

    hi
    i want to popup the editor for every record changed .
    It is a mutli record block.
    I tried it using in pre record trigger using
    go_item(the field name');
    but it is saying illegal restricted porcedure using go_item in the the block level trigger.please someone help me .
    sudharshan

    I want to do this logic
    while querying the records and when-new-record-instance trigger is not firing can someone please help me how to do this.
    Thankyou
    sudharshan

  • Number for every record that is retrieved from (query)

    Hello
    I wish to put a number for every record that is retrieved
    from the record that is output by this query
    For example
    For the first recored/row
    Generated number, ksnumber, date
    1, gg111 11/05/05
    2, oo235 12/06/05
    the query returned 2 records 1 and 2 are the number that is
    generated with this code.
    In addition if there is a built in function, where in the
    code do I put it???
    <cfquery name="gelov datasource="kl90">
    SELECT
    FROM
    WHERE
    ORDER BY
    <cfswitch expression="#Form.orderBy#">
    <cfks value="KSNUMBER">
    KS.KS_NBR
    </cfks>
    <cfks value="CREATIONDATE">
    KS.KREATDAT
    </cfks>
    </cfswitch>
    </cfquery>
    <!---html report--->
    <cfswitch expression="#Form.outputFormat#">
    <cfks value="HTML">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Ctwye Kss Report</title>
    </head>
    <style type="text/css">
    table{
    font-family:Arial, Helvetica, sans-serif;
    font-size:10px;
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:10px;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:10px;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:13px;
    </style>
    <body>
    <cfoutput>
    <table border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td align="center">
    <h3>Ctwye Kss
    Report</h3><br><br></td>
    </tr>
    <tr>
    <td align="center">
    </h2>report returned #getCtwyeKss.RecordCount#
    records</h2></td>
    </tr>
    <tr>
    <td>
    <table border="1" cellpadding="2" cellspacing="0">
    <tr>
    <td width="160">Ks Number</td>
    <td>Creation Date</td>
    <!--- <td class="dataField">Address</td>
    <td class="dataField">Type</td>
    <td class="dataField">Description</td>--->
    </tr>
    <cfloop query="getCtwyeKss">
    <tr bgcolor="<cfif currentrow mod
    2>GHOSTWHITE<cfelse>WHITE</cfif>">
    <td>#KS_NBR#</td>
    <td>#dateformat(KREATDAT,"mm/dd/yyyy")#</td>
    </tr>
    </cfloop>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    </cfoutput>
    </cfks>
    <cfks value="CSV">
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=ctwye.csv">
    <cfcontent type="application/msexcel">"Ks
    Number","Creation Date"
    <cfoutput
    query="getCtwyeKss">#ltrim(KS_NBR)#,"#dateformat(KREATDAT,"mm/dd/yyyy")#"
    <tr #IIF(getCtwyeKss.CurrentRow MOD
    2,DE(''),DE('backgroundColor="##999"'))#>
    <!---<tr bgcolor="<cfif currentrow mod
    2>##808080<cfelse>##ffffff</cfif>"> --->
    </cfoutput>
    </cfks>
    </cfswitch>

    <cfks> is not a Coldfusion tag. Use <cfcase>
    instead.
    The following code will print the row numbers
    <cfquery name="gelov" datasource="kl90">
    select ksnumber, date
    from yourTable
    </cfquery>
    <cfoutput query="gelov">
    #currentrow#, #ksnumber#, #date#<br>
    </cfoutput>

  • HOW TO: Add /manipulate columns for a GridControl

    HOW TO: Add /manipulate columns for a GridControl when the columns (attributes) are from different entity objects.
    This HOWTO describes the basic steps of using attributes from different entity objects for a GridControl.
    One way you can create a GridControl which contain attributes from different entity objects is to create a view object and base it on the entity objects which contain
    the desired attributes.
    Here are the basic steps:
    1.Create a new view object (or use an existing view object) by selecting File>New from the menu, clicking the Business Components tab and double-clicking
    on the View Object icon.
    2.In the View Object wizard change the name to something meaningful.
    3.Select the entity objects you will base your view object on.
    4.Nivigate to the attribute screen and select the attributes you would like to include in your view object from each entity object. At this point you can also create
    a new attribute by clicking the "New" button. The new attribute can be a concatenation of other attributes, derived from a calculation etc.
    5.In the query panel of the View Object wizard, click "Expert mode" and enter a query statement. You write complex queries such as decoding a set of attribute
    values.
    6.Add your newly to your newly created view object to the application module by double-clicking on the application module in the navigation pane and selecting
    your view object from the list.
    7.Create a new row set.
    8.Bind row set to a query by editing their queryinfo property and selecting your view object and its attributes from the queryInfo pane.
    9.Create a GridControl and bind it to the row set by editing the dataItemName property of the GridControl. Since the GridControl is bound at the row set level
    all of the related attributes are automatically added.
    null

    Michael,
    Are you intending this as a commercial solution or a work around?
    To take an existing equivalent, one would build a view in the database tailored for each grid in an Oracle Forms application. Or a separate query layered over tables for each form/grid in a Delphi or Access application? Even if it is ninety nine percent the same over half a dozen forms/grids?
    And now you've added a whole slew of "slightly different" rowSetInfos to maintain.
    So if you wanted to add a column that needs to appear everywhere... you've just increased the workload multi-fold?
    That would be a management nightmare, wouldn't it? Not to mention yet more performance cost and a slower system?
    Hmmmm..... I'm not sure I like where this is headed... someone needs to do some convincing...
    null

  • How to add empty rows in table in smart form

    how to add empty rows in table in smart form?
    plz help me regarding this
    send me ur queries to [email protected]

    You will need to add some extra rows to the internal table that your table is displaying.  Use a program node to append additional rows with a key but no argument.
    Alternaively a template may me more suitable for your requirement than a table.
    Finally, please do not include you e-mail address in your question.  Your question and the answers provided to it are for the benefit of everyone in the Community.
    Regards,
    Nick

  • Access 2010 Chart - Report returns an identical chart for every record in the underyling query

    Hi there, I hope someone can help me with this. I've created a stacked column chart in a Report. The chart seems to be working fine but my report is returning a chart for every record in the source query.  The chart adds up the days each vehicle in
    a fleet was used in a given time frame.  I'm not a code writer so wizarded my way to the following:
    TRANSFORM Sum(QVehicleDaysUsed.[DaysOfUseThisMonth]) AS SumOfDaysOfUseThisMonth SELECT QVehicleDaysUsed.[YearMakeModelPlate] FROM QVehicleDaysUsed GROUP BY QVehicleDaysUsed.[YearMakeModelPlate] PIVOT QVehicleDaysUsed.VehicleUseForMonthStarting;
    The chart seems to be producing exactly what I want but it's repeated once for every record in the source query. I don't know if this is the issue but I don't have a Master/Child field linking the chart to the report it's in - chart is unbound and therefore
    won't allow me to link fields. I'd sure appreciate any help you can offer! Thanks!
    (Incidentally VehicleUseForMonthStarting is a date field - ideally it should be shown as a DatePart MMMM but for whatever reason Access is balking at the Format expression.)
    Thanks!

    GOT IT! Hurray.  Obvious after giving it more thought... I had to make the report the chart was in Unbound. :) Leaving post up in case it helps someone else out.

  • To genrate individual file for every record.

    Hi Experts,
    I am receiving a message with multiple records. I need to generate individual files for every record.
    How can it be done?
    Thanks
    Karthik

    Bhatia,
    FCC is file content conversion. If your sender communication channel is file and the file is any fixed length or with any separator then you can use this option in your file sender communication channel.
    Regards,
    ---Satish

  • Getting message for every record while pressing down arrow key:apps form

    Hi,
    when i query the form and when I am going through the records by pressing the down arrow of the keyboard I am getting the message 'Do you want to Save the records' for every record even though i did not update any record
    How to avoid the message?
    I developed the form in oracle applications and it is a master detail form which have a header block and lines block.
    thanks & regards
    Deekshit

    Hello,
    You can review the following;
    https://metalink.oracle.com/metalink/plsql/f?p=200:27:627127677634310554::::p27_id,p27_show_header,p27_show_help:173383.995,1,1
    Hope it helps.
    Adith

Maybe you are looking for

  • Can't see list of backups of TimeMachine service in Server.app

    We can't see the list of backups (users and date of last backup) in Server.app anymore. Load the settings will say, after a couple of minutes: Error Reading Settings Service functionality and administration may be affected. Click Continue to administ

  • RFC call from XI ABAP stack to XI

    Hi All, I have a RFC in the XI ABAP stack. When I created an RFC connection (TCP/IP) connection on the XI ABAP stack through SM59, and tried test connection, it is not working. Am I doing something wrong here? If I am trying to call XI JAVA stack fro

  • ABAP HELP in Start routine

    Hello everybody, I have written a code to delete some records in start routine, we are using BI 7.0. here is the code, TYPES: BEGIN OF tys_SC_3, TCTUSERNM TYPE /BI0/OITCTUSERNM, END  OF tys_SC_3. DATA zz_s_SC_3 type sorted table of tys_SC_3 with uniq

  • Why does the Mac App Store say "Item not currently available in the U.S. store" when I try to upgrade to OS X Yosemite?

    This showed up when I clicked "Upgrade Now" from the Apple website.

  • MySQL extensions with DW CS4

    I am setting up DW to work with PHP, MySQL and Apache. All seems to be fine except that when I try to connect to the database with CS4, I get the message "Your PHP server doesn't have the MySQL module loaded or you can't use the mysql_(p)connect func