Merge two lines & show to a single line in the table results

Hi, I need to merge 2 rows with 3 columns in a single row in a table view

The passes are currently displayed in form:


Revenue-Revenue (Prior_Month) project No.-(Current_Month)
123123 10000
20000


Recipes are a single column with recipes for diffreent period.
10000 is for may
20000 is for April

Project NOT because both are the same, just the periods are different. If I'm not display period I need to merge the 2 rows & show as

Revenue-Revenue (Prior_Month) project No.-(Current_Month)
123123-10000-20000


Please let me know how we can achieve this?

thanx
Pankaj

.

Tags: Business Intelligence

Similar Questions

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • Two lines in the ApplicationControlBar

    Hello

    It's a way to make two lines in the applicationcontrolbar?

    To right-align a line for my title and logo and the second line of my menu?

    Thanks in advance.

    Johnny

    Hello

    You just need to use groups to control the layout of the controlbar, in a simpler form content, this will create 2-line labels

    David.

  • How to set the text in the last line of the table to be bold

    Hi all

    I have two tables in the report on my page and I would like to have the last line of the table as a "BOLD" text data.

    I found a jQuery selector to select the last row of the table, but I do not know how to implement it in the Apex. I want to control what table will have changed last row and who won't.
    $("tr:last").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    Could someone help me how to create a dynamic action to accomplish, or if y at - there another solution?

    My test app:

    user name: [email protected]
    passwd: kurintest
    appl: REPORT_APPL 12451

    Thanks in advance,

    Jiri

    Nico Martens wrote:

    PS: If you worry about sql plsql context switching, use a box instead of my function. Which probably could increase performance.

    Using this technique , analytics, and casewould be more effective and offer the best separation of concerns:

    Source report

    select
              product_id
            , sum(quantity_on_hand) qty
            , avg(quantity_on_hand) avg
            , case
                when   count(*) over ()
                     = row_number() over (order by product_id nulls last)
                then
                  'bold'
                else
                  'normal'
              end font_weight
    from
              oehr_inventories
    group by
              rollup(product_id)
    order by
              product_id nulls last
    

    HTML column expression

    #PRODUCT_ID#
    

    Avoid generating HTML in the query when it is possible that its impact on the ability to use the features of declarative report as column sorting and setting in the form. (See examples on page 3)

    If you have a table with 100 rows and you show only 15 lines. Do you want the 15th line "BOLD" or just line 100Le.

    It is really the important issue here. If the reports do not use paging and always show all lines, then it's trivial to implement using dynamic Action (as shown on page 2):
    H4. When

    Event: After refresh
    Selection type: jQuery Selector
    jQuery Selector: .report-standard

    H4. Real Action

    Action: Run the JavaScript Code
    Fire on loading the Page: Yes
    Code:

    $(".report-standard tr:last-child td").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    

    (Here is to use appropriate DA / jQuery selectors to make sure that only reports including totals get this formatting applied...)

    For more complex presentations, a report of custom line model is the way forward, as in the link in the previous thread of the OP: + {: identifier of the thread = 2436912} +.

    Also note that the columns hidden, based on the GROUP_ID/GROUPING/GROUPING_ID functions are very useful in these reports. They can be used to report conditions of line to avoid the additional conditions to be ready in the query (as in the case above) and provide the break several levels of formatting.

  • Added new line in the table

    Hello

    I have a table inside a panelCollection. When I press the button Add a new row (plu green) the empty line newly added appears in a random place in the table, but I want to appear as the first line of the table (top of the table). How I do that?

    Thank you very much
    Will do

    Will do,

    It is a weird behavior that was introduced in JDev 11.1.1.4. We fixed this in the next version by adding the new line always above the current line.

    You can do two things:
    -Make sure that the size of the range of the iterator binding is greater than the number of rows displayed, in this case the new line will be created directly below the current line
    -extend the JHeadstart TableBean class, override the createNewRow method and create a line in the first line

    Steven Davelaar,
    Jheadstart team.

  • Toggle buttons control according to the selected line in the table?

    Hello

    I have used JDev 11.1.1.2.0

    On my main page, it has a query section and view the result to a component of the lookup table and also has functioning as (update/deletion) buttons in the toolbar.

    I want to toggle buttons operating according to some value of the selected line in the table, and I searched on the OTN forum, found more than issues like that, but seemed no found a good solution.

    The table is a unique and has a status column selection, its data type is integer, and I want to activate the buttons when the value of the status field of the selected line is 0 or 1, disable the buttons when the State value is other values.

    Code of the table as:

    < af:table value = "#{bindings." Var VO1.collectionModel}"="row ".
    lines = ' #{bindings. " VO1.rangeSize}.
    emptyText = "#{bindingsVO1.viewable?" '} ". No data to display. ': 'Access Denied. »} »
    fetchSize = "#{bindings." VO1.rangeSize}.
    rowBandingInterval = '0 '.
    filterModel = "#{bindings." VOCriteriaQuery.queryDescriptor}.
    queryListener = ' #{bindings. " VOCriteriaQuery.processQuery}.
    filterVisible = "true" varStatus = "vs."
    selectedRowKeys = ' #{bindings. " VO1.collectionModel.selectedRow}.
    selectionListener = "#{bindings." VO1.collectionModel.makeCurrent}.
    rowSelection = "single" id = "resId1" >

    Operation code buttons like:
    < af:commandToolbarButton text = "Update" id = "ctb2" action = "editDAF" / >

    Any suggestions would be very helpful.

    Thank you
    zeroxin

    Hello

    bind to the attribute in the PageDef file for the status field. Then configure the PartialTriggers property button to point to the ID of the table. Of the disabled button property then points to the status as attribute link

    #{bindings.statusField.inputValue == 'value'}

    Frank

  • Add lines to the table of results

    Hi all

    A table of results page updated, I have one called submitButton 'Add' to add rows at the bottom of the table to create a new record.
    Wrote a method create in AM, but it's always add a new line to the second last position.

    How to add a new line to the table after the last record?


    Thank you and best regards,
    Patricia

    In your method of AM

    You can use following code in AM

    VORowImpl row = (VORowImpl)vo.last();
    vo.setCurrentRow(row);
    vo.next();
    VORowImpl newrow = (VORowImpl)vo.createRow();
    vo.insertRow(newrow);
    

    I hope that helps!

    Thank you
    AJ

  • Add the line in the table of the ADF

    I am trying to add a new line to the table of the ADF. Here are my steps:
    1 create new entities to tables (new-> EJB-> entities from Tables)
    2. create the Session Bean (new->-> Session Bean EJB) with all required methods for earlier of the entity created
    3 create the control of data off of it (right click-> session bean create a Data control)-, it creates 'testFindAll '.
    4. After these steps, I drag / drop my "testFindAll" of data controls to form and create the table
    5. now I do drag & drop operation Create since my 'testFindAll-> operations", create a button and move the action to create CreateInsert

    And now, eating disorders: ((...)) When I click on the button to add the new line I get null pointer exception. Here is the part of the trace:

    java.lang.NullPointerException
    at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.createRowData(UpdatableBeanDataControl.java:137)
    at oracle.adf.model.bean.DCBeanDataControl.createRowData(DCBeanDataControl.java:642)
    at oracle.adf.model.bean.DCDataVO.doCreateData(DCDataVO.java:870)
    at oracle.adf.model.bean.DCDataRow.create(DCDataRow.java:306)
    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:432)
    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:4679)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:567)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1818)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2211)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2257)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2233)
    at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:9404)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1223)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
    at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:464)
    at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    ...


    I know I can do it if you create ViewObject rather than Tables and SessionBean entities. But I need this approach.

    Thank you very much!

    Hi Goran,

    What is your version of JDev? You try with EJB 3.0 or 2.1? I just tried (with 3.0) and it works fine (tested in JDev 11.1.1.2.0).

    Here's my pagedef

    
    

    Infact, I don't have to change the action of creation at CreateInsert. By default, it is CreateInsert only.

    Arun-

  • Merge two lines based on a sequence_number

    Hi all

    Suppose I have a table with the following structure:

    UserID NUMBER PK
    SequenceID NUMBER NOT NULL
    Value1 NUMBER NULL
    Value2 VARCHAR2 NULL
    Value3 DATE NULL


    And, this table is populated as an example below:

    UserID SequenceID value1 value2 value3
    1 1 10 NULL 'TEST '.
    1 2 15 NULL 01/01/2011
    1 3 NULL "TEST2" 01/02/2011
    2 4 20 NULL NULL
    2 5 12 NULL 'ABC '.
    2 6 "AB" NULL NULL

    What I want to do, it's merge these lines, "bundling" then by user name (this is the PK), on a path that the last major sequence ID always has priority of the previous... Thus, the query must return something like:

    UserID SequenceID value1 value2 value3
    1 3 15 "TEST2" 01/02/2011
    2 6 12 NULL "AB".

    Explanations:
    As you can see, for each username, I´d like to get a line containing the value last filled for each column...
    I can´t use the MAX function, because on behalf of User2, I get unexpected values on column value2 (I'd get 'ABC' instead of 'AB') and the value1 column (I'd get 20 instead of 12).

    How is the best way (best performance) to archieve that?

    Thank you very much!!!

    Hello

    Maybe this will help you:

    select userid,
           max(sequenceid) keep (dense_rank last order by sequenceid) sequenceid,
           max(value1) keep (dense_rank last order by case when value1 is not null then sequenceid end nulls first) value1,
           max(value2) keep (dense_rank last order by case when value2 is not null then sequenceid end nulls first) value2,
           max(value3) keep (dense_rank last order by case when value3 is not null then sequenceid end nulls first) value3
      from t
     group by userid;
    

    Run the example:

    SQL> with t as (
      2  select 1 userid, 1 sequenceid, 10 value1, NULL value2, 'TEST' value3 from dual union all
      3  select 1, 2, 15, NULL, '01/01/2011' from dual union all
      4  select 1, 3, NULL, 'TEST2', '02/01/2011' from dual union all
      5  select 2, 4, 20, NULL, NULL from dual union all
      6  select 2, 5, 12, 'ABC', NULL from dual union all
      7  select 2, 6, NULL, 'AB', NULL from dual
      8  ) -- end of test data
      9  select userid,
     10         max(sequenceid) keep (dense_rank last order by sequenceid) sequenceid,
     11         max(value1) keep (dense_rank last order by case when value1 is not null then sequenceid end nulls first) value1,
     12         max(value2) keep (dense_rank last order by case when value2 is not null then sequenceid end nulls first) value2,
     13         max(value3) keep (dense_rank last order by case when value3 is not null then sequenceid end nulls first) value3
     14    from t
     15   group by userid;
    
        USERID SEQUENCEID     VALUE1 VALUE2 VALUE3
    ---------- ---------- ---------- ------ ----------
             1          3         15 TEST2  02/01/2011
             2          6         12 AB     
    

    You can take the result of this SQL and populate the new version of the table with an Insert... SELECT statement.

    Published by: fsitja on February 25, 2011 14:57 fixed and deleted the test code that went 'live' by mistake

  • Two lines with the same value (in a single pass) but a different value (in another pass)...

    Hello
    I have the following table:
    create the table pp_status (ppid number (10), ppdescr varchar2 (20),)
    (1) number, varchar2 (4)) bordered;
    The ppid is the primary key.

    where: the ppid Gets the values of a sequence, status may have values (0, 1, 2) and bordered of... years.
    Thus, some values of line may be as follows:
    insert into pp_status values(1,'XX',0,'2009');
    insert into pp_status values(2,'XXY',0,'2010');
    insert into pp_status values(3,'XXT',1,'2009');
    .....

    Now, I want to impose a business rule in which declaratively:
    If and only if both lines have values of shell (as in row 1, 3 in the example above lines) but different data values in the neck of status (and specifically the values 0 and 1 (not 2), as in the lines of the sample 1 and 3) then the second row (that is, the third row in the whole of the sample) is permitted , otherwise not. For example, the following lines:
    insert into pp_status values(3,'XXT',2,'2009'); {because of the whole first line was inserted}
    insert into pp_status values(3,'XXT',0,'2009'); {because of the whole first line was inserted}

    should not be allowed...

    Is it possible to achieve without writing code... I mean the declaratively.

    Note: I use DB10g v.2

    Thank you
    SIM

    SIM,

    It's an interesting challenge, which requires two unique indexes to solve declaratively:

    SQL> create table pp_status(ppid number(10),ppdescr varchar2(20),
      2  status number(1) check (status in (0,1,2)),firstyear varchar2(4));
    
    Tabel is aangemaakt.
    
    SQL> create unique index ui1 on pp_status (firstyear,decode(status,2,0,status))
      2  /
    
    Index is aangemaakt.
    
    SQL> create unique index ui2 on pp_status (firstyear,decode(status,2,1,status))
      2  /
    
    Index is aangemaakt.
    
    SQL> insert into pp_status values(1,'XX',0,'2009');
    
    1 rij is aangemaakt.
    
    SQL> insert into pp_status values(2,'XXY',0,'2010');
    
    1 rij is aangemaakt.
    
    SQL> commit
      2  /
    
    Commit is voltooid.
    
    SQL> insert into pp_status values(3,'XXT',2,'2009');
    insert into pp_status values(3,'XXT',2,'2009')
    *
    FOUT in regel 1:
    .ORA-00001: Schending van UNIQUE-beperking (RWIJK.UI1).
    
    SQL> insert into pp_status values(3,'XXT',0,'2009');
    insert into pp_status values(3,'XXT',0,'2009')
    *
    FOUT in regel 1:
    .ORA-00001: Schending van UNIQUE-beperking (RWIJK.UI1).
    
    SQL> insert into pp_status values(3,'XXT',1,'2009');
    
    1 rij is aangemaakt.
    

    Kind regards
    Rob.

    PS: why the hell proclaim the year varchar2 (4) instead of number 4?

  • Adding line to a linked child view vo appears two lines in the user interface

    Hello

    I have a creation page where I have to also add entries to the child. More like Create service as part of the same page, I must also add employees in this Department.

    My your are based EO. I have associations for my EOs, and based on these associations, I created ViewLinks.

    Now, I have a requirement on my page to add employees permanent and part-time as separate regions. So what I did add the child VO (basically added the child VO using the show link on my AM). I did twice - once for the permanent missions and another for part-time employees.

    So, indeed, that I use the same database view object (EmployeeVO), but the runtime, they are two different instances of EmployeeVO.

    Before I make the page to create, I add a new line to my DepartmentVO and I also get instances of permanent and part-time employees your and add a new line.

    But when I have the rendering of the page, I see that there are two lines each displayed for permanent regions and part-time, even if I had added only one line.

    Added to that, when I have this debug and run based on a few breakpoints, the page works correctly. Weird that the display link should behave that way. Any ideas?

    Thank you
    Srini

    Hi Srini,

    When you use the same VO for two different instances on the same page, this problem occurs. Before you create the child lines VO, for these children set VO property 'setAssociationConsistent' to 'false' and check if your problem is solved.

    getChildVOName.setAssociationConsistent (false)

    Thank you
    Naga

  • Yellow dots and two lines on the screen

    My computer shows the points of color on my screen which vary according to the background color and are mostly yellow. There are also lines on the screen that disrupt the display. The problem is not with the monitor, and I do not think his material. I had this problem before, which then developed into my computer crashes when starting each time, and someone managed to fix it for me when he reinstalled windows. It worked very well, but the other day I started a demo to the steam and the messed up display as soon as it is loaded. I tried to reinstall windows to see if it works, but the problem persists.

    My system is running a processor intel E6750, a Radeon HD 2900 XT 4 GB of RAM and Windows Vista 64-bit

    Can post you a photo? But I think that your graphics card is damaged. "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • View button 'Add a line' if there are no more than two lines in a table

    Hello

    Is there a possibility of JavaScript to dynamically check number of rows in a table and display the button 'Add Row' in the case where if displayed in number of lines in sub table form is more small/more than some setting?

    Example: I have 2 lines in a picture. The button should be indicated if there are no more than 3 lines.

    User click on the button - a blank line will be added here. Now, the button is hidden until the number of rows will be less than 3.

    Data sheet:

    APEX 4.1.1

    31%

    Listener 1.1.3

    Thank you

    J

    Hello

    I solved it by using the little piece of JS:

    if ($('#report_contact_form tr.highlight-row').length > 1)
    $x_Hide('ADD_ROW_T', true);
    

    Concerning

    J

  • How to hide the mess of buttons that occupy two lines on the right side of the Navigation bar? Customize does not affect the

    I just got an update 8.0.1 and now I have a set of not less than 20 icons at the top right of the Navigation bar.

    It's left arrow, right arrow, X, reload, home, Basel, clock, star, unjknown, unknown, window with + in it, scissors, two documents, Clipboard, four directions,-, +, two circular arrows, RSS icon, another arrow to the left.

    Some of them would be useful, but not two rows of them; However customize doesn't let me drag out - they move as a whole block and just snap back on the release.

    In addition, when I mouse over this area they Flash quickly on and outside.

    Can you advise how to choose which of these elements, I want to see: they take a lot of space and I only need about 3 - 4 of them.

    Thank you!

    Start Firefox in SafeMode (https://support.mozilla.com/en-US/kb/Safe+Mode) and the option "Reset tools and controls bars. This will return you to the stock icon set that you can then customize to your taste

  • 'Lines' of the table does not automatically extend as added content?

    This is a table of Storyboard, built with a simple table.  Three columns: one for the images, one as a spacer, a text.

    I did the storyboard to the origin in the Pages, and then converted in Word to work with a partner, now converted to Pages yet.  It seems to be OK except for one thing:

    Before, when I would write in the text of the text column... the line would extend automatically as the text was written, at least in the size of a page.

    Now, I think lines are somehow "locked" and does not (at least one page), extend this text and images, are "hiding" because the line is not normally develop as she would have.

    Is there some click preferably a place that keeps my lines to a constant size, any content is in every cell?

    Or maybe it's a corruption caused by going to Word and back?

    All ears,

    Ben

    V4.3 Pages ' 09, or permit Pages v5.6.2 splitting a line beyond the limits of the page, so limit the content of text in a cell a to a single page. I just copy and paste a page full of text and he dropped in the first row, cell 3. It is automatically extended to the bottom of the page and not details. There is no hidden settings in Pages that will be substituted for this limitation.

Maybe you are looking for