How to use CreateInsert in inseting new row at the beginning of each page

I would like to insert new row in an editable table bu using CreateInsert. How to insert that at the beginning of every pagination. Let us say, if my pagination is 10, when I insert the record in pagination 21-30, the new record will be inserted and will be the new 21st record. In pagination 1-10, the new inserted row will be the 1st record, and so on.
The default behavior is the newly inserted record will be at the top of the record where the focus is located. I want the behavior to be always at the top of every pagination. Pls help

Probably you have to create your own createAndInsert method in view object implementation class and expose it to the client. Then use this method instead of default create and insert action.
In your new method use createRow() and insertRowAtRangeIndex() methods to insert record exactly where you want.
Rado

Similar Messages

  • How to add an image or static text in the header of EACH page of a cross-Tab report

    Post Author: rtutus
    CA Forum: General
    Hi, I use Crustal 11.0.
    I have a cross Tab. I display the items on the left column and the months horizontally, the items are grouped by category field. The values are the sum of quantities are displayed for each month. Like this:
                             Items         Jan       Feb       March .....................Total
    Category 1                       
                             Item11         val11     Val12      Val13                     Total values
                             Item12         val21     Val22      Val23                     Total values
                             Item13         val31     Val32      Val33                     Total values
    Category 2                       
                             Item21         val11     Val12      Val13                     Total values
                             Item22         val21     Val22      Val23                     Total values
                             Item23         val31     Val32      Val33                     Total values
    Category 3                       
                             Item31         val11     Val12      Val13                     Total values
                             Item32         val21     Val22      Val23                     Total values
                             Item33         val31     Val32      Val33                     Total values
    The problem, I want to add a page header for each page of the report.
    When Crystal reports first displays my cross-tab in the designer, CR displays the cross tab in the Report header section. I d like to add text or image for each page and not only at the begining of my Cross-Tab.
    If I just add an image or text at the top of the report designer, which is my report header, I get the image or text only on the begining of the 1st page of my report but never in the other following pages.
    If I try to work around the problem and move the cross Tab to a group section instead, and then put the Image in the group header, I get what I want, but the problem is that:
    The columns header: Jan, February....December are displayed for each group of my report and not only in the beginning of the report. I get something like this:
                             Items         Jan       Feb       March .....................Total
    Category 1                       
                             Item11         val11     Val12      Val13                     Total values
                             Item12         val21     Val22      Val23                     Total values
                             Item13         val31     Val32      Val33                     Total values
                             Items         Jan       Feb       March .....................Total
    Category 2                       
                             Item21         val11     Val12      Val13                     Total values
                             Item22         val21     Val22      Val23                     Total values
                             Item23         val31     Val32      Val33                     Total values
                             Items         Jan       Feb       March .....................Total
    Category 3                       
                             Item31         val11     Val12      Val13                     Total values
                             Item32         val21     Val22      Val23                     Total values
                             Item33         val31     Val32      Val33                     Total values
    You see the months get duplicated. Any way, my real need is to add an image or text in the header of EACH page of a cross-Tab report.
    Thanks a lot for your help.

    Hi Divya,
    you could do for example in the wdDoInit() of the view
    wdContext.currentContextElement().setPicture("picture.gif");
    Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.
    I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials.  I have learned tremendously from them.
    Hope this helped
    Harald

  • Repeat as header row at the top of each page --- in Footer of the table

    I have a table
    1st row contains column description.
    I need the same column description in the last row of the page.
    Is it possible
    Thanks

    Column names are hard coded in the first row ?
    if so, create anther row after the "end for-each" put these columns description in that row.

  • How can I add a two second pause to the beginning of each slide?

    Hello,
    I have a project with TTS and perfectly aligned CC notes - 64 slides.  Now the customer would like for there be a two-second pause before the audio begins on each slide in order to allow the user to first become oriented with the slide.  Is there a way I can do this without moving the audio down the timeline two seconds, and then having to adjust the appearance of each of the CC notes accordingly? 
    I was thinking of something like pause two seconds On Enter -- Is this possible?
    Thanks for any help!!
    Ryan

    VTML (VoiceText Markup Language) – This Powerful hidden gem in Text to Speech helps you control the generated speech by adding pause, changing the pitch etc !
    Please use the document linked below to get the more information on VTML tags and its usage.
    https://ondemand.neospeech.com/vt_eng-Engine-VTML-v3.9.0-3.pdf
    Regards,
    Rajeev.

  • How do I automatically create a new file at the beginning of a new day, otherwise I only want to append that days file?

    In my robotics application I store my data using "Write to Spreadsheet.vi". I would like to append the file each time I run the program on any given day. On a NEW day I would automatically like to create a new file with a smiliar name and append that file for the day on which it is created. It's easy to do using the "Write to Measurement File. vi" but the text file created is vertical rather than horizontal, so I would like to use "Write to Spreadsheet". Any suggestions?
    Also how to I include my VI as part of this question for others to see?
    Thank you.
    Attachments:
    Untitled 4 (SubVI).vi ‏7 KB

    Does the file you are writing have a timestamp in it?  If so you could read the timestamp from the last time it was written and see if the day has changed, handling the name of the file appropriately.  The easiest way to record the timestamp is probably to write the timestamp as the number of seconds that have elapsed since 12:00 am on Firday January 1st 1904 in UT.  The "Get Date/Time in Seconds" function will give you this value.
    Message Edited by jmcbee on 03-05-2009 12:56 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • CreateInsert puts the new row at the top or second to the last

    Dear All,
    Just one question, is it possible to configure that when you create a new row in an
    editable table, it will be place at the end of the rows of the table?
    Use Case:
    I have a view object coming from the HR schema's Departments table.
    I then dropped this page as an editable table and enabled row selection.
    To add new row, I drag the create insert option as a button.
    <af:form id="f1">
    <af:panelStretchLayout id="psl1">
      <f:facet name="bottom">
         <af:panelGroupLayout id="pgl1">
           <af:commandButton text="Add Row" id="cb1"
                                  actionListener="#{bindings.CreateInsert.execute}"/>
           <af:commandButton actionListener="#{bindings.Commit.execute}"
                                  text="Commit" id="cb2"/>
           <af:commandButton actionListener="#{bindings.Rollback.execute}"
                                  text="Undo" immediate="true" id="cb3">
              <af:resetActionListener/>
           </af:commandButton>
         </af:panelGroupLayout>
      </f:facet>
      <f:facet name="center">
         <af:table value="#{bindings.DepartmentsView1.collectionModel}"
                     var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
                     emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                     fetchSize="#{bindings.DepartmentsView1.rangeSize}"
                     rowBandingInterval="0"
                     selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
                     selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
                     rowSelection="single" id="t1" partialTriggers="::cb1">
           <af:column sortProperty="DepartmentId" sortable="false"
                         headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
                         id="c4">
              <af:inputText value="#{row.bindings.DepartmentId.inputValue}"
                               label="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
                               required="#{bindings.DepartmentsView1.hints.DepartmentId.mandatory}"
                               columns="#{bindings.DepartmentsView1.hints.DepartmentId.displayWidth}"
                               maximumLength="#{bindings.DepartmentsView1.hints.DepartmentId.precision}"
                               shortDesc="#{bindings.DepartmentsView1.hints.DepartmentId.tooltip}"
                               id="it4">
              </af:inputText>
           </af:column>
           <af:column sortProperty="LocationId" sortable="false"
                         headerText="#{bindings.DepartmentsView1.hints.LocationId.label}"
                         id="c1">
              <af:inputText value="#{row.bindings.LocationId.inputValue}"
                               label="#{bindings.DepartmentsView1.hints.LocationId.label}"
                               required="#{bindings.DepartmentsView1.hints.LocationId.mandatory}"
                               columns="#{bindings.DepartmentsView1.hints.LocationId.displayWidth}"
                               maximumLength="#{bindings.DepartmentsView1.hints.LocationId.precision}"
                               shortDesc="#{bindings.DepartmentsView1.hints.LocationId.tooltip}"
                               id="it2">
              </af:inputText>
           </af:column>
         </af:table>
      </f:facet>
      <f:facet name="start"/>
      <f:facet name="end"/>
      <f:facet name="top"/>
    </af:panelStretchLayout>But I notice that when I clicked the createinsert button, the new row is appended at the top of the table.
    I then tried to click the last row, but when I click the CreateInsert, it is appended before the last row.
    How can I configure this so that it will show at the last row?
    Thanks.
    JDEV 11G PS 3

    Ramandeep Nanda wrote:
    * Insert new Rows at the end of RowSet.
    * @param row
    @Override
    public void insertRow(Row row) {
    //go to the end of Rowset if it has rows
    Row lastRow = this.last();
    if (lastRow != null) {
    //insert new row at the end and make it current
    int indx = this.getRangeIndexOf(lastRow) + 1;
    this.insertRowAtRangeIndex(indx, row);
    this.setCurrentRow(row);
    } else { // empty Rowset
    super.insertRow(row);
    }     The row will be added at the end. You actually override this method in your voImpl.Works like a charm..
    Thanks Ramandeep..learned something new today...

  • How to insert a new row in the middle of an set of rows

    Hi
    How to insert a new  row in the middle of an set of rows ? and How to Reset the line id after the new row added ?
    Regards,
    Sudhir B.

    Hai,
    just try this,
    Instead of using omatrix.Addrow(1,-1) use like
    omatrix.AddRow( RowCount , Position)
    RowCount
    The number of rows to add (default is 1)
    Position
    The position of the new rows (0-based; default is -1, meaning append row to the end)
    After adding rows in matrix For, sno.
    for i=1 to omatrix.visualrowcount
    otext=omatrix.getcellspecific("columnid",i)  '--where columnid is the unique id of the sno column
    otext.value=i
    next i
    Hope this helps you.
    Thanks & Regards,
    Parvatha Solai.N

  • How to use facebook  + skype with new Ipad? it needs flash player it seems...

    how to use facebook + skype with new Ipad? it needs flash player it seems...

    get the facebook and skype apps from the app store and there is no need flash.

  • How to use track effects with new version of GarageBand

    In the version of GarageBand before this one, you could access different effects that you could manage and apply to the different tracks.  Each track had an area containing its set of effects that were either activated or deactivated.  With this removed, i am not sure how to add those same kind of effects.  I am aware of the new nobs that are provided in order to mix and edit trebles, bass, mid, etc., but i want to be able to add different effects such as voice transformer, flanger, chorus, speech enhancer, bit crusher, bass amp, track echo, track reverb, amplifier, etc.  I desperately need help finding out how to do this, as this was a major part of my mixing and producing with GarageBand, and without these given effects, i do not feel as comfortable using GarageBand.

    zachseiden wrote:
    How to use track effects with new version of GarageBand
    this may help:
    http://www.bulletsandbones.com/GB/GBFAQ.html#replacemissingtrackeffectsgbv10
    This FAQ entry offers a Minute GarageBand video tutorial
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How can I Add and save new row in data table?

    Hello All,
    I want to add new row in the jsf page with data and save it.
    I have data table with rows from database..
      <h:form id="test">
            <h:dataTable id="hh" value="#{MyBean.dataList}" var="list">
              <h:column>
              <h:outputText value="#{list.name}"/>          
              </h:column>         
              <h:column>
              <h:outputText value="#{list.lastName}"/>          
              </h:column>         
              <h:column>
              <h:outputText value="#{list.phone}"/>          
              </h:column>         
            </h:dataTable>
            <h:commandButton id="sd" action="#{MyBean.addNewRow" value="Add Row" />
            <h:commandButton id="save" action="#{MyBean.updateList" value="Save Data />
          </h:form>
    {code}
    i understand action with save to database, but still I could not find right way to add new row from jsf page.....
    I want add new row, add new name, lastname, and save it....
    Edited by: armen on Feb 20, 2009 12:39 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Thanks, but your example consist from too many parts and I could not join all components for understatnding all proccess.

  • Adding new row to the reports list page

    How can I add a new report row in the reports list of the reports tab.
    Ex: a new row to the report "users by Date of Join report" is to be added
    How can we add Please help me out in this

    I am facing the same problem!
    camickr wrote:
    Try adding an empty row containing a null value for the String instead of the empty String.camickr, it will not help, the DefaultRowSorter in the "*+compare(int model1, int model2)+*" method return -1 if the first value is null and 1 if the sacond value is null. and incase of DESCENDING it mult by -1.
                    // Treat nulls as < then non-null
                    if (v1 == null) {
                        if (v2 == null) {
                            result = 0;
                        } else {
                            result = -1;
                    } else if (v2 == null) {
                        result = 1;
                    } else {
                        result = sortComparators[counter].compare(v1, v2);
                    if (sortOrder == SortOrder.DESCENDING) {
                        result *= -1;
                    }And this is the real problem!
    The empty line is sorted as the smallest value and incase of DESCENDING it will be the first line (because of the mult by -1).
    We could have overide it and incase of the empty row(usualy the last row) do not mult by -1 in DESCENDING mode.
    But the problem is that the "+*compare*+" method and it's caller "*+Row+*" inner class are private :-(
    It is not wise to do it but we can do like kmp83 wrote:
    kmp83  wrote:
    copy/duplicate "private" code from DefaultRowSorter into my extended class.Anyone have another suggestion?

  • Add a new row at the top of a table in GUI

    Hi,
    I am using JDev 11.1.1.1.0. I need to be able to let users add a new row at the top of a table and not anywhere else in the middle of table rows. I cannot seem to find a way to do it. note that it does not matter where a new row gets inserted in the db, i am only concerned about restricting the insert in the GUI to the topmost line/row.
    Thanks,
    AJ

    Hi
    Can you try with writing your custom create method in application module and calling same from UI on command button action like
    public void createNewRow()
    ViewObjectImpl vo = getVO1();
    Row newRow= vo.createRow()
    vo.insertRowAtRangeIndex(0, newRow);
    Vikram

  • Query: how to use structure and selection and what's the difference between

    Query: how to use structure and selection and what's the difference between these two?
    Would be appreciated if some experts here give examples to demenstrate on how to use structure and selection in query and what's the difference between these two?
    Thanks in advance!

    Hi Kevin,
    1. Well by default all the KF that you include in your query go into a Key Figure Structure. You can additionally have another structure for defining how your chars are laid out. A common example is a Calmonth structure where you have selections for 12 months, quarers and YTD values. This would be a char structure with different selections (for each month, qtr etc)
    2. Yes, a selection with a KF is the same as restricting a KF. You can use am RKF is you have one on the left hand side, or if you need to do this locally in the query, right click the structure and choose New Selection, then proceed to choose your KF and reqd char values.
    Hope this helps...

  • To add new row with the checkbox selected ....

    Hi All,
    In my project I have to create a table with 2 columns, 1 column is checkbox and other column is String type. In the same JFrame one textarea and one add button should be there. When we type text in the textarea and click add button, it should add a new row in the table with the checkbox selected and the 2nd column containing the text.
    I want to use AbstractTableModel.
    Please help me to solve this issue. If you have sample code that will be more helpful.
    Thank you,
    Regards,
    mkumar

    It would be better if you extend from DefaultTableModel rather than from Abstract Table Model. That is because DefaultTableModel provides functionality to add a row. In fact, you can directly use DefaultTableModel .
    In the button's action performed,
    public void actionPerformed(ActionEvent e)
      if(e.getSource() == bAdd)
        Vector newRow = new Vector(2);
        newRow.add(new Boolean(Boolean.TRUE));
        newRow.add(" ");
        DefaultTableModel dm = (DefaultTableModel)yourTable.getModel();
        dm.addRow(newRow);
    }Note : For the above code, Initialize the JTable with a DefaultTableModel parameter than directly with Vectors/ Arrays.
    This is because when we try to cast from TableModel to DefaultTableModel as in the above code, there is a possibility of an
    Exception if the Table is not initialized without a model.
    For the CheckBox in the first column, you need to set an editor and a renderer so that you can manipulate and see your boolean values as the state of the check boxes.
      JCheckBox b = new JCheckBox();
      DefaultTableCellRenderer dr = new DefaultTableCellRenderer(b);
      DefaultTableCellEditor de = new DefaultTableCellEditor(b);
      yourTable.getColumnModel().getColumn(0).setCellEditor(de);
      yourTable.getColumnModel().getColumn(0).setCellRenderer(dr);That should do it !
    Cheers

  • Add new Row at the bottom of the advance table

    Hi,
    I have an advance table which is displaying 50 rows per page. I have a button at the bottom of the table to add a new row in the table.
    Requirement is whenever user clicks on the button to add a new row and if he is viewing the 50-100 rows, new row should be added at the bottom of the same page giving 101st row as new row.
    Is this functionality possible. Please let me know the code for the same.
    Thanks in advance,
    Kaushik

    Hi,
    If the records displayed is set to 50 then at one time only 50 records will be visible.
    101st row will be inserted at seperate navigation 100-150.
    Instead you can insert the row at the top so that 100th row gets shifted to 101 and new row becomes on the same page
    for this use
    vo.insertRowatRangeIndex(row,0);
    Thanks,
    Gaurav

Maybe you are looking for