OBIEE:How to display row/columns where no data is present in pivot results?

I have a request from some team members to provide an OBIEE report of 7 teams and the number of open incidents for each team by week.
I was able to create the pivot listing the teams vertically and the age (by week#: 1 week, 2 weeks, 3 weeks, 4 weeks & > 4weeks) horizontally.
The dilemma I have is that of the 7 teams that have incidents tickets only 4 of them have data, thus only those 4 teams that have ticket data show up in my pivot. I would like to be able to reflect ALL 7 teams even if representing a dash or null value across the pivot for those teams that don't have data.
Does anyone know if this is possible and if so, how would I do this? I've tried searching the internet and found out how to replace a null value with a dash in columns/rows when a cell is null. But not how to display an entire row (or column) where no data is present.
Edited by: coutya on May 22, 2012 11:01 AM
Edited by: coutya on May 22, 2012 11:02 AM

You are correct; if there are no data at all, those teams won't show in a pivot table. NULLs or dashes only work if a particular column is null. There are two ways to accomplish what you wish. The first example I thought when I wasn't aware of being able to do a LEFT OUTER JOIN in Answers using the Advanced tab. The first method works nicely, though and is simpler to execute.
Read my solution here:
Re: Section Values showing NULL in Pivot
To do the LEFT OUTER JOIN read this:
http://gerardnico.com/wiki/dat/obiee/multiple_subject_area
Both will get you what you want...

Similar Messages

  • How to display the column into the narrative or section from pivot table

    I have a report. I have the basic number displayed in the pivot table, but missing one column and I need move one column to the top. The column missing (% of tested) should be calculated by column c /column F's last number, ie, F7=48. My desired column would be H3=c3/F48 9/48, H4=c4/F488/48.... But I could not get the number 48 into my formula, because it is the running total of the all column E. These data is in Pivot table.
    I also need display No of Students 74 in the top of the report. I am not able to get this number from pivot table. It is count distinct on student key from the repository.
    I appreciate any help.
    A     B     C     D     E     F     G
    2          # of Questions     Average # Correct     % Correct     Running total no. of test items     No of students
    3     PATTERNS, FUNCTIONS, AND ALGEBRA     9     4.68     51.95     9     74
    4     PROBABILITY AND STATISTICS     8     3.97     49.66     17     74
    5     MEASUREMENT AND GEOMETRY     11     6.11     55.53     28     74
    6     NUMBER AND NUMBER SENSE     8     4.16     52.03     36     74
    7     COMPUTATION AND ESTIMATION     12     8.2     68.36     48     74
    Edited by: user7315022 on Feb 3, 2010 2:28 PM

    I wish it was this easy. I must not explain it right. All the score from each student and each question for each subject and each test is stored in database. The number of question for the subject is the max of the questions for each subject. Basically, it needs 'parittion by'... But in the OBIEE, it would not let me add any 'partition by' in the column formula. Is this true? ie, can you use partition by in the column formula? Here are the query from trace file.
    RqList
    TEST_YEAR_SEASONS.TEST_SEASON_NAME as c1 GB,
    REPORTING_SCHOOL_YEARS.SCHOOL_YEAR as c2 GB,
    MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c3 GB,
    STUDENT_TEST_SCORES.TEST_SCORE_NUMBER as c4 GB,
    DIVISION_TOTAL_TESTS:[DAggr(STUDENT_TEST_SCORES.DIVISION_TOTAL_TESTS by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c5 GB,
    RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME as c6 GB,
    RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME as c7 GB,
    TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME as c8 GB,
    SCHOOLS.SCHOOL_NAME as c9 GB,
    SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c10 GB,
    SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] / nullif( COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] , 0) as c11 GB,
    MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c12 GB,
    (SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] / nullif( COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] , 0)) / nullif( MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] , 0) * 100 as c13 GB,
    STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY as c14 GB,
    STUDENT_TEST_SCORES.STUDENTS_KEY as c15 GB,
    max(SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) / nullif( max(COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) , 0) as c16 GB,
    (max(SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) / nullif( max(COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) , 0)) / nullif( max(MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) , 0) * 100 as c17 GB
    DetailFilter: RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME = 'GRADE 5' and SCHOOLS.SCHOOL_NAME = 'GLASGOW MIDDLE' and TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME = 'RAW SCORE' and TEST_YEAR_SEASONS.TEST_SEASON_NAME = 'SPRING' and REPORTING_SCHOOL_YEARS.SCHOOL_YEAR = '200102' and TESTS.TEST_ID = 'SOL' and TEST_DEFINITIONS.PARENT_TEST_SUBJECT_NAME = 'MATHEMATICS' and STUDENT_TEST_SCORES.TEST_SCORE_NUMBER < 900
    OrderBy: c1 asc, c2 asc, c4 asc, c6 asc, c7 asc, c8 asc, c9 asc, c14 asc, c15 asc
    +++azadams:320000:32001b:----2010/02/03 16:48:36
    -------------------- Sending query to database named tacdev (id: <<51109>>):
    select distinct D1.c5 as c1,
    D1.c4 as c2,
    D1.c9 as c3,
    D1.c14 as c4,
    D1.c12 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c15 as c8,
    D1.c8 as c9,
    D1.c11 as c10,
    D1.c11 / decode(D1.c10 , 0 , to_number(null), D1.c10) as c11,
    D1.c9 as c12,
    (D1.c11 / decode(D1.c10 , 0 , to_number(null), D1.c10)) / decode(D1.c9 , 0 , to_number(null), D1.c9) * 100 as c13,
    D1.c13 as c14,
    D1.c16 as c15,
    D1.c3 / decode(D1.c2 , 0 , to_number(null), D1.c2) as c16,
    (D1.c3 / decode(D1.c2 , 0 , to_number(null), D1.c2)) / decode(D1.c1 , 0 , to_number(null), D1.c1) * 100 as c17
    from
    (select max(D1.c1) over (partition by D1.c4, D1.c5, D1.c6, D1.c7, D1.c8) as c1,
    sum(D1.c2) over (partition by D1.c4, D1.c5, D1.c6, D1.c7, D1.c8) as c2,
    sum(D1.c3) over (partition by D1.c4, D1.c5, D1.c6, D1.c7, D1.c8) as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    max(D1.c1) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c9,
    sum(D1.c2) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c10,
    sum(D1.c3) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c11,
    sum(D1.c12) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c12,
    D1.c13 as c13,
    D1.c14 as c14,
    D1.c15 as c15,
    D1.c16 as c16
    from
    (select max(T56699.TEST_SCORE_NUMBER) as c1,
    count(T56699.TEST_SCORE_NUMBER) as c2,
    sum(T56699.TEST_SCORE_NUMBER) as c3,
    T33435.SCHOOL_YEAR as c4,
    T34232.TEST_SEASON_NAME as c5,
    T52429.TEST_SUBJECT_NAME as c6,
    T52429.TEST_LEVEL_NAME as c7,
    T59709.SCHOOL_NAME as c8,
    count(T36922.STDNT_STNDRD_TEST_KEY) as c12,
    T36922.STDNT_STNDRD_TEST_KEY as c13,
    T56699.TEST_SCORE_NUMBER as c14,
    T56693.TEST_SCORE_TYPE_NAME as c15,
    T36922.STUDENTS_KEY as c16
    from
    SCHOOLS T59709,
    TEST_DEFINITIONS T58733,
    TEST_SCORE_TYPES T56693,
    RPT_TEST_DEFINITIONS T52429,
    TEST_YEAR_SEASONS T34232,
    REPORTING_SCHOOL_YEARS T33435,
    TESTS T34149,
    DETAIL_TEST_SCORES T33341,
    STUDENT_STANDARD_TEST T36922,
    TEST_SCORES T56699
    where ( T33341.TEST_SCORE_TYPES_KEY = T56693.TEST_SCORE_TYPES_KEY and T36922.ADMIN_SCHOOLS_KEY = T59709.SCHOOLS_KEY and T34232.TEST_YEAR_SEASONS_KEY = T36922.TEST_YEAR_SEASONS_KEY and T33435.REPORTING_SCHOOL_YEARS_KEY = T36922.REPORTING_SCHOOL_YEARS_KEY and T34149.TESTS_KEY = T36922.TESTS_KEY and T36922.TEST_DEFINITIONS_KEY = T58733.TEST_DEFINITIONS_KEY and T33341.STDNT_STNDRD_TEST_KEY = T36922.STDNT_STNDRD_TEST_KEY and T33341.TEST_SCORES_KEY = T56699.TEST_SCORES_KEY and T33435.SCHOOL_YEAR = '200102' and T34149.TEST_ID = 'SOL' and T34232.TEST_SEASON_NAME = 'SPRING' and T36922.RPT_TEST_DEFINITIONS_KEY = T52429.RPT_TEST_DEFINITIONS_KEY and T52429.TEST_LEVEL_NAME = 'GRADE 5' and T56693.TEST_SCORE_TYPE_NAME = 'RAW SCORE' and T58733.PARENT_TEST_SUBJECT_NAME = 'MATHEMATICS' and T59709.SCHOOL_NAME = 'GLASGOW MIDDLE' and T56699.TEST_SCORE_NUMBER < 900 )
    group by T33435.SCHOOL_YEAR, T34232.TEST_SEASON_NAME, T36922.STDNT_STNDRD_TEST_KEY, T36922.STUDENTS_KEY, T52429.TEST_SUBJECT_NAME, T52429.TEST_LEVEL_NAME, T56693.TEST_SCORE_TYPE_NAME, T56699.TEST_SCORE_NUMBER, T59709.SCHOOL_NAME
    ) D1
    ) D1

  • Interactive report: How to display "count" column on total data set?

    Hi,
    I'm a relative newbie to APEX and would appreciate some help with the following:
    I have an interactive report that will usually contain around 8000 rows.
    I need to report the total number of distinct values in one of the columns - but I need to get around the limitation of APEX where it only counts the number of rows displayed on the screen.
    I thought to create a separate region and use a separate SQL query to show the full total regardless of the number of rows displayed - however, I've now got the problem of not being able to access the interactive report "query", so, for example, if someone running the report adds a filter, I need the total to report with this new filter applied.
    Does anyone know if I can:
    a) get around the the limitation of only counting the number of rows displayed?
    or, if not,
    b) how to access the interactive report "query" that is being run?
    or
    c) any other way of doing this!?
    I do hope this makes sense. Thanks in advance for any help....
    Helen

    Hi all,
    Thanks for your responses. They really are much appreciated.
    I had hoped to spend some time on this over the weekend - but haven't got round to it. I'll work on it again tomorrow and will certainly look at the thread you mentioned Tony.
    Sorry I'm not being very clear about what I want. Why are these things always so hard to explain in words :o)
    I'll have another go....
    I have an interactive report that would report around, say, 8000 rows. Obviously I don't want to display all 8000 on the screen so I'll probably display them in chunks of 15 rows. If I use the aggregation function on the report, I can add a count of the distinct account numbers to the bottom of the display, but it will only count the ones displayed on the screen. I need the count to be of all the rows - so 8000 instead of 15 - but still displaying only 15 rows. When a user then applies a filter to the report, I need the count to change in accordance with the filter - so if the number of rows returned as a result of the filter is now 4000 instead of 8000, I need the count to now say 4000 instead of 8000 even though still only 15 rows are actually displayed on the screen.
    I'll try and pre-empt the questions...
    1) There will always be duplicate account numbers in there so the count will never be the actual number of rows - but I'm simplifying above to help explain the problem better
    2) Why would they want 8000 rows? Don't ask. I'm sure it's something to do with exporting the lot into an excel spreadsheet but they'll never admit it :o)
    I hope this makes more sense......
    Thanks again!!
    Helen
    P.S. Almost forgot again... I'm using Apex 4.1 on the Oracle hosted environment which I assume is 11g.

  • How to Display Sub-Columns using ALV Grid

    Hi ,
      Could someone tell me how to display sub-columns under a parent column using ALV Grid. Do we have any standard Program which has this scenario. Please let me know.
    Thanks,
    Abaper.
    Message was edited by:
            ABAP'er

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • How to display dynamic column added by vo.addDynamicAttribute in jspx?

    Hi,
    I met problem when programmatically add cloumn and display it on screen. Here are my steps:
    0. define a ViewObject using xml. Define a transient column Addtion2. later will add a dynamic column Addtion3, but not defined here.
    1. Implement Application Module, adding a method init() and expose it to client.
    2. In init() method, get target VO and use vo.addDynamicAttribute("Addition3"). Then iterate it use row.setAttribute("Addition3", Math.random()). Add init() to page binding and invoke it.( it's invoked )
    3. In jspx, use dynamic table. But Addition3 never shows up.
    This is my last question: Re: How to display dynamic column added by vo.addDynamicAttribute in jspx? People say I should use dynamic table.
    please have a look at my code:
    Application Module: when it runs, it will print 6 coulmns. vo.getAttributeCount() is <font color="red">6</font>.
    <pre>
    public void init() {
    ViewObject vo = this.getCountryView1();
    if (vo.getAttributeIndexOf("Addition3") == -1) {
    vo.addDynamicAttribute("Addition3");
    vo.executeQuery();
    for (AttributeDef deft : vo.getAttributeDefs()) {
    System.out.println(deft.getColumnName() + ": " + deft.getName());
    RowSetIterator it = vo.createRowSetIterator("i1");
    while (it.hasNext()) {
    Row r = it.next();
    r.setAttribute("Addition2", Math.random());
    r.setAttribute("Addition3", Math.random());
    it.closeRowSetIterator();
    for (AttributeDef deft : vo.getAttributeDefs()) {
    System.out.println(deft.getColumnName() + ": " + deft.getName());
    System.out.println(vo.getAttributeCount()); //vo.getAttributeCount() is 6
    </pre>
    jspx: when it runs, only 5 columns are shown. Column Addition2's values are set as expected. but Column Addition3 never shows up. And #{bindings.CountryView1.attributeCount} shows <font color="red">5</font>.
    <pre>
    <af:table rows="#{bindings.CountryView1.rangeSize}"
    fetchSize="#{bindings.CountryView1.rangeSize}"
    emptyText="#{bindings.CountryView1.viewable ? 'No data to display.' : 'Access Denied.'}"
    var="row" rowBandingInterval="0"
    value="#{bindings.CountryView1.collectionModel}"
    selectedRowKeys="#{bindings.CountryView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.CountryView1.collectionModel.makeCurrent}"
    rowSelection="single" id="t1">
    <af:forEach items="#{bindings.CountryView1.attributeDefs}" var="def">
    <af:column headerText="#{def.name}"
    sortable="true" sortProperty="#{def.name}" id="c1">
    <af:outputText value="#{row[def.name]}" id="ot1"/>
    </af:column>
    </af:forEach>
    </af:table>
    <af:forEach items="#{bindings.CountryView1.attributeDefs}" var="def">
    <af:outputText value="#{def.name}" id="ot2"/>
    </af:forEach>
    <af:outputText value="#{bindings.CountryView1.attributeCount}" id="ot3"/>
    </pre>
    it's quite weird for me. The vo.getAttributeCount() is 6, but #{bindings.CountryView1.attributeCount} shows 5. And column Addtion3 never shows up.
    what's the matter? How can I show the dynamic added column Addtion3?
    Edited by: simon li on 2012-9-10 下午7:31
    Edited by: simon li on 2012-9-10 下午8:00

    Hi,
    Can you check the tree binding (CountryView1 - in the pagedef) and see it has the 5 attributes hardcoded in it. If yes, try removing everything and then run the page to see if it works fine.
    -Arun

  • How to Display Sub-Columns using ALV

    Hi experts,
        Could someone tell me how to display sub-columns under a parent column using ALV. Do we have any standard Program which has this scenario. points are guaranteed for the right answer.
    Thanks in advance
    Sreenivas

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • How to insert rows & columns into a jTable???

    helloo there...
    How to insert rows & columns into a jtable???
    your reply is greatly appreciated....
    -=samer=-

    Yes!thanks...
    But what i want is how to set the number of rows and the number of columns...and i don't know how to setColumns and rows....any idea?
    the user will input number of rows and columns in a jtextfield....
    Please rply...

  • How to create primary on a column when redundant data is present

    I am interested to add primary key constraint on a column where repeated data is there without affecting the date how can I immplement this.
    Can any one help me in this regard.
    Thanks
    Sanjay

    If you have duplicated data and going to specify the primary key constraint on that data it's quite against RDBMS concepts and can't be considered as a relevant idea. Nevertheless Oracle provides you with such tricky method, but once again, it's NOT good idea, change your mind:
    SQL> create table t (x int);
    Table created.
    SQL> insert into t values(1);
    1 row created.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t;
             X
             1
             1
    SQL> create index t_x on t(x);
    Index created.
    SQL> alter table t add primary key (x) novalidate;
    Table altered.
    SQL> insert into t values(1);
    insert into t values(1)
    ERROR at line 1:
    ORA-00001: unique constraint (ORACLE_OCM.SYS_C006647) violated
    SQL> insert into t values(2);
    1 row created.
    SQL> select * from t;
             X
             1
             1
             2In this case you have PK constraint and it affects all new DMLs, but
    in fact you can't rely on PK.
    Rgds.

  • How to display the column header in two rows?

    Hi Experts,
    I am using ALV_LIST_DISPLAY i neeed to display the column header in two rows.. How can i do that?
    Ex: purchase order i  need to display "purchase" in one row and "order" in second row.
    Thanks in advance,
    Sarath.j

    REPORT zpwtest .
    TYPE-POOLS slis .
    DATA : layout TYPE slis_layout_alv .
    CONSTANTS : c_len TYPE i VALUE 20 .
    TYPES : BEGIN OF ty_t100          ,
              sprsl TYPE t100-sprsl   ,
              arbgb TYPE t100-arbgb   ,
              msgnr TYPE t100-msgnr   ,
              text  TYPE t100-text    ,
              fline TYPE t100-text    ,
            END OF ty_t100            .
    TYPES : BEGIN OF ty_wrd   ,
             text TYPE char20 ,
            END OF ty_wrd     .
    DATA : it_t100     TYPE TABLE OF ty_t100 ,
           it_sentence TYPE TABLE OF ty_wrd  ,
           wa_t100     TYPE ty_t100          ,
           wa_word     TYPE ty_wrd           ,
           v_repid     TYPE syst-repid       ,
           v_tabix     TYPE syst-tabix       .
    DATA : it_fld TYPE slis_t_fieldcat_alv ,
           it_evt TYPE slis_t_event        ,
           wa_fld TYPE slis_fieldcat_alv   ,
           wa_evt TYPE slis_alv_event      .
    INITIALIZATION .
      v_repid = sy-repid .
    START-OF-SELECTION .
    * Get data
      SELECT *
        INTO TABLE it_t100
        FROM t100
       WHERE sprsl = 'EN'
         AND arbgb = '00' .
      LOOP AT it_t100 INTO wa_t100 .
        v_tabix = sy-tabix .
        CLEAR : it_sentence .
        CALL FUNCTION 'RKD_WORD_WRAP'
             EXPORTING
                  textline  = wa_t100-text
                  outputlen = c_len
             TABLES
                  out_lines = it_sentence.
        IF NOT it_sentence IS INITIAL .
          READ TABLE it_sentence INTO wa_word INDEX 1 .
          wa_t100-fline = wa_word-text .
          MODIFY it_t100 FROM wa_t100 INDEX v_tabix .
        ENDIF.
      ENDLOOP.
    * Prepare fieldcatelog
      CLEAR wa_fld .
      wa_fld-fieldname = 'SPRSL' .
      wa_fld-ref_tabname = 'T100' .
      wa_fld-ref_fieldname = 'SPRSL' .
      APPEND wa_fld TO it_fld .
      CLEAR wa_fld .
      wa_fld-fieldname = 'ARBGB' .
      wa_fld-ref_tabname = 'T100' .
      wa_fld-ref_fieldname = 'ARBGB' .
      APPEND wa_fld TO it_fld .
      CLEAR wa_fld .
      wa_fld-fieldname = 'MSGNR' .
      wa_fld-ref_tabname = 'T100' .
      wa_fld-ref_fieldname = 'MSGNR' .
      APPEND wa_fld TO it_fld .
      CLEAR wa_fld .
      wa_fld-fieldname = 'FLINE' .
      wa_fld-inttype      = 'CHAR' .
      wa_fld-outputlen = 20 .
      wa_fld-intlen    = 20.
      wa_fld-seltext_l = 'Text' .
      wa_fld-ddictxt = 'L' .
      APPEND wa_fld TO it_fld .
    * Get event.. we will handle BOFORE and AFTER line output
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           IMPORTING
                et_events = it_evt.
      READ TABLE it_evt INTO wa_evt
      WITH KEY name = slis_ev_after_line_output .
      wa_evt-form = slis_ev_after_line_output .
      MODIFY it_evt FROM wa_evt INDEX sy-tabix .
      READ TABLE it_evt INTO wa_evt
      WITH KEY name = slis_ev_top_of_page .
      wa_evt-form = slis_ev_top_of_page .
      MODIFY it_evt FROM wa_evt INDEX sy-tabix .
      layout-no_colhead = 'X' .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program = v_repid
                it_fieldcat        = it_fld
                is_layout          = layout
                it_events          = it_evt
           TABLES
                t_outtab           = it_t100.
    *       FORM top_of_page                                              *
    FORM top_of_page .
        uline .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               11 'line1'     ,
               31 sy-vline    ,
               37 sy-vline    ,
               58 sy-vline    .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               11 'line2'     ,
               31 sy-vline    ,
               37 sy-vline    ,
               58 sy-vline    .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               11 'line3'     ,
               31 sy-vline    ,
               37 sy-vline    ,
               58 sy-vline    .
    ENDFORM.
    *       FORM AFTER_LINE_OUTPUT                                        *
    FORM after_line_output   USING rs_lineinfo TYPE slis_lineinfo .
      CLEAR : it_sentence ,
              wa_t100     .
      READ TABLE it_t100 INTO wa_t100 INDEX rs_lineinfo-tabindex .
      CHECK sy-subrc = 0 .
      CALL FUNCTION 'RKD_WORD_WRAP'
           EXPORTING
                textline  = wa_t100-text
                outputlen = c_len
           TABLES
                out_lines = it_sentence.
      DESCRIBE TABLE it_sentence LINES v_tabix .
      CHECK v_tabix > 1 .
      LOOP AT it_sentence INTO wa_word FROM 2 .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               31 sy-vline    ,
               37 sy-vline    ,
               38 wa_word-text ,
               58 sy-vline .
      ENDLOOP.
    ENDFORM .

  • How to display row to columns without using pivot keyword

    hi,
    could someone help me how to dispaly rows into columns without using pivot keyword and actuall my scenario is,iam having two tables with names and sample data is shown below
    ID PROJECT MID MINAME TASKID TASKNAME
    1     PROJ1     1     AA     100     PR1_TASK1
    1     PROJ1     3     CC     102     PR1_TASK3
    1     PROJ1     4     DD     103     PR1_TASK4
    1     PROJ1     5     EE     104     PR1_TASK5
    1     PROJ1     6     FF     105     PR1_TASK6
    2     PROJ2     5     EE     114     PR2_TASK1
    2     PROJ2     6     FF     115     PR2_TASK2
    2     PROJ2     7     GG     116     PR2_TASK3
    2     PROJ2     8     HH     117     PR2_TASK4
    2     PROJ2     9     JJ     118     PR2_TASK5
    2     PROJ2     10     KK     119     PR2_TASK6
    2     PROJ2     1     AA     120     PR2_TASK7
    The output should display project and count of tasks in particular milestone as shown below
    project AA BB CC DD EE FF GG HH JJ KK
    1 2 0 1 5 3 2 0 2 1 0
    2 1 2 0 2 1 0 2 4 3 1
    Thanks in advance ,
    vvr

    WITH t1 AS
    (SELECT 1 ID,
             'PROJ1' PROJECT,
             1 MID,
             'AA' MINAME,
             100 TASKID,
             'PR1_TASK1' TASKNAME
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 3, 'CC', 102, 'PR1_TASK3'
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 4, 'DD', 103, 'PR1_TASK4'
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 5, 'EE', 104, 'PR1_TASK5'
        FROM DUAL
      UNION
      SELECT 1, 'PROJ1', 6, 'FF', 105, 'PR1_TASK6'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 5, 'EE', 114, 'PR2_TASK1'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 6, 'FF', 115, 'PR2_TASK2'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 7, 'GG', 116, 'PR2_TASK3'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 8, 'HH', 117, 'PR2_TASK4'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 9, 'JJ', 118, 'PR1_TASK5'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 10, 'KK', 119, 'PR1_TASK6'
        FROM DUAL
      UNION
      SELECT 2, 'PROJ2', 1, 'AA', 120, 'PR1_TASK7' FROM DUAL)
    SELECT id project,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'AA'
                  AND id = t_out.id),
               0) AA,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'BB'
                  AND id = t_out.id),
               0) BB,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'CC'
                  AND id = t_out.id),
               0) CC,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'DD'
                  AND id = t_out.id),
               0) DD,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'EE'
                  AND id = t_out.id),
               0) EE,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'FF'
                  AND id = t_out.id),
               0) FF,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'GG'
                  AND id = t_out.id),
               0) GG,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'HH'
                  AND id = t_out.id),
               0) HH,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'JJ'
                  AND id = t_out.id),
               0) JJ,
           NVL((SELECT mid
                 FROM t1
                WHERE miname = 'KK'
                  AND id = t_out.id),
               0) KK
      FROM (SELECT DISTINCT id FROM t1) t_out
    PROJECT     AA     BB     CC     DD     EE     FF     GG     HH     JJ     KK
    1     1     0     3     4     5     6     0     0     0     0
    2     1     0     0     0     5     6     7     8     9     10As I understand, you want MID of MINAMEs displayed ? But output is not like yours.. What is exactly your requirements?

  • How to display Rows as Columns in JSF?

    I am using dataTable component to get data for my Menu, i have one column in it which returns me the data, because its automatically adding <tr> and <td> tags to it, its showing data in tabular form.
    I want to show output Horizontally instead of Vertically the way its showing.
    Is their any way i can display Rows as Columns?
    Code:
    ==============================================
    <div class="bodyarea">
    <div id="location">
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <f:verbatim><ol></f:verbatim>
    <h:column>
    <f:verbatim><li></f:verbatim>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}"/>
    </h:outputLink>
    <f:verbatim></li></f:verbatim>
    </h:column>
    <f:verbatim></ol></f:verbatim>
    </h:dataTable>
    </div>
    </div>
    Thank you

    Table is not the html element for you, in this situation.
    I would use a dataList component (distributed with myfaces implementation).
    dataList is able to return a list of item, and using css you will be able display in a horizontal grid. (otherwise you can use layout="grid" in dataList).
    Anyway...my impression is that who made JSF was not really understanding how a html programmer like to write his code.
    Why do JSF gives us only the possibility to write list of items throught tables?
    Why do JSF prints error messages throught tables?
    Why div is not a standard component?
    This is an incredible lack...
    I see also other incredible lasks...but they don't concern html ;) .

  • How to hide row column on condition in report

    Hello everyone,
    Can its is possible to hide a Column of a row in report.
    For one customer i am having Opening Balance n Closing Balance data.....i m breaking my report on customer wise (First Column). So I can see Customer only one time not 5..... now i want to see Opening Balance Data only in first row n Closing Balance Data only in last row.
    How can i achieve this, pls help!
    regards,
    UKJ

    Hi,
    I have no idea but try this:SELECT  SEGMENT1,
            VENDOR_NAME,
            VENDOR_SITE_CODE,
            INVOICE_NUMBER,
            INVOICE_DATE,
            INVOICE_TYPE_LOOKUP_CODE,
            PAY_DATE,
            DESCRIPTION,
            CHECK_DATE,
            CHECK_NUMBER,
            VOUCHER_NUM,
            SUM(debit) debit,
            null credit,
            op_bal,
            cl_bal
    from (
    SELECT  SEGMENT1,
            VENDOR_NAME,
            VENDOR_SITE_CODE,
            INVOICE_NUMBER,
            INVOICE_DATE,
            INVOICE_TYPE_LOOKUP_CODE,
            PAY_DATE,
            DESCRIPTION,
            CHECK_DATE,
            CHECK_NUMBER,
            VOUCHER_NUM,
            SUM(debit) debit,
            null credit,
            op_bal,
            cl_bal
            row_number () over (partition by VENDOR_NAME order by INVOICE_DATE) rnk
    from (
    SELECT  SEGMENT1,
            VENDOR_NAME,
            VENDOR_SITE_CODE,
            INVOICE_NUMBER,
            INVOICE_DATE,
            INVOICE_TYPE_LOOKUP_CODE,
            PAY_DATE,
            DESCRIPTION,
            CHECK_DATE,
            CHECK_NUMBER,
            VOUCHER_NUM,
            SUM(debit) debit,
            null credit,
            op_bal,
            cl_bal   
        FROM (   
    SELECT POV.SEGMENT1,
           POV.VENDOR_NAME,
           pov.vendor_id,
           POVS.VENDOR_SITE_CODE,
           hou.SET_OF_BOOKS_ID,
           API.INVOICE_NUM INVOICE_NUMBER,
           API.INVOICE_DATE,
           API.INVOICE_TYPE_LOOKUP_CODE,
           APPL.ACCOUNTING_DATE PAY_DATE,
           API.DESCRIPTION DESCRIPTION,
           TO_CHAR(APC.CHECK_DATE, 'dd-MON-yyyy') CHECK_DATE,
           APC.CHECK_NUMBER,
           APC.DOC_SEQUENCE_VALUE VOUCHER_NUM,
           API.INVOICE_AMOUNT,appl.amount,
           DECODE(API.INVOICE_TYPE_LOOKUP_CODE,'CREDIT',API.INVOICE_AMOUNT ,appl.amount) debit,
           null credit,
           jai_ap_rpt_apcr_pkg.compute_credit_balance(API.INVOICE_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) cr_amt,
           jai_ap_rpt_apcr_pkg.compute_debit_balance(API.INVOICE_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) dr_amt,
           jai_ap_rpt_apcr_pkg.compute_credit_balance(:P22_FROM_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) -
           jai_ap_rpt_apcr_pkg.compute_debit_balance(:P22_FROM_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) op_bal,
           jai_ap_rpt_apcr_pkg.compute_credit_balance(:P22_TO_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) -
           jai_ap_rpt_apcr_pkg.compute_debit_balance(:P22_TO_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) cl_bal
        FROM AP_INVOICES_ALL API,
             AP_INVOICE_LINES_ALL APIL,
             AP_INVOICE_DISTRIBUTIONS_ALL APD,
             PO_VENDORS POV,
             PO_VENDOR_SITES_ALL POVS,
             AP_INVOICE_PAYMENTS_ALL APPL,
             AP_CHECKS_ALL APC,
             hr_operating_units hou
       WHERE API.INVOICE_ID = APIL.INVOICE_ID
         AND API.INVOICE_ID = APD.INVOICE_ID
         AND API.VENDOR_ID = POV.VENDOR_ID
         AND API.VENDOR_SITE_ID = POVS.VENDOR_SITE_ID
         AND API.INVOICE_ID = APPL.INVOICE_ID
         AND APPL.CHECK_ID = APC.CHECK_ID
         AND APIL.line_number = apd.invoice_line_number
         AND APD.match_status_flag='A'
         AND API.org_id=hou.ORGANIZATION_ID
         AND APIL.LINE_TYPE_LOOKUP_CODE='ITEM'
         AND api.org_id = nvl(:p22_org_id,api.org_id)
         AND TRUNC(API.INVOICE_DATE) BETWEEN NVL (:P22_FROM_DATE,API.INVOICE_DATE)AND NVL(:P22_TO_DATE,API.INVOICE_DATE)
    GROUP BY SEGMENT1,
             VENDOR_NAME,
             VENDOR_SITE_CODE,
             INVOICE_NUMBER,
             INVOICE_DATE,
             INVOICE_TYPE_LOOKUP_CODE,
             PAY_DATE,
             DESCRIPTION,
             CHECK_DATE,
             CHECK_NUMBER,
             VOUCHER_NUM,
             op_bal,
             cl_bal
    UNION
    SELECT SEGMENT1,
           VENDOR_NAME,
           VENDOR_SITE_CODE,
           INVOICE_NUMBER,
           INVOICE_DATE,
           INVOICE_TYPE_LOOKUP_CODE,
           PAY_DATE,
           DESCRIPTION,
           CHECK_DATE,
           CHECK_NUMBER,
           VOUCHER_NUM,
           debit,
           SUM(credit) credit,       
           op_bal,
           cl_bal
         FROM (  
    SELECT POV.SEGMENT1,
           POV.VENDOR_NAME,
           POVS.VENDOR_SITE_CODE,
           API.INVOICE_NUM INVOICE_NUMBER,
           API.INVOICE_DATE,
           API.INVOICE_TYPE_LOOKUP_CODE,
           NULL PAY_DATE,
           API.DESCRIPTION DESCRIPTION,
           NULL CHECK_DATE,
           NULL CHECK_NUMBER,
           NULL VOUCHER_NUM,
           DECODE(API.INVOICE_TYPE_LOOKUP_CODE,'CREDIT',NULL ,abs(API.INVOICE_AMOUNT))  credit,
           DECODE(API.INVOICE_TYPE_LOOKUP_CODE,'CREDIT',abs(API.INVOICE_AMOUNT))  DEBIT,
           jai_ap_rpt_apcr_pkg.compute_credit_balance(API.INVOICE_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) -
           jai_ap_rpt_apcr_pkg.compute_debit_balance(API.INVOICE_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) op_bal,
           jai_ap_rpt_apcr_pkg.compute_credit_balance(:P22_TO_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) -
           jai_ap_rpt_apcr_pkg.compute_debit_balance(:P22_TO_DATE,pov.vendor_id,hou.SET_OF_BOOKS_ID,povs.VENDOR_SITE_CODE,:p22_org_id) cl_bal
       FROM AP_INVOICES_ALL API,
            AP_INVOICE_LINES_ALL APIL,
            AP_INVOICE_DISTRIBUTIONS_ALL APD,
            PO_VENDORS POV,
            PO_VENDOR_SITES_ALL POVS,
            hr_operating_units hou
       WHERE 1=1
        and api.org_id=apil.org_id
        and API.INVOICE_ID = APIL.INVOICE_ID
        AND API.INVOICE_ID = APD.INVOICE_ID
        AND API.VENDOR_ID = POV.VENDOR_ID
        AND API.VENDOR_SITE_ID = POVS.VENDOR_SITE_ID
        and api.org_id =apil.org_id
        and api.org_id=hou.ORGANIZATION_ID
        and apil.line_number = apd.invoice_line_number
        AND apd.match_status_flag='A'
        and apil.LINE_TYPE_LOOKUP_CODE='ITEM'      
        AND api.org_id = nvl(:p22_org_id,api.org_id)
        AND TRUNC(APD.ACCOUNTING_DATE) BETWEEN NVL (:P22_FROM_DATE,APD.ACCOUNTING_DATE) AND NVL (:P22_TO_DATE,APD.ACCOUNTING_DATE)
    GROUP BY SEGMENT1,
             VENDOR_NAME,
             VENDOR_SITE_CODE,
             INVOICE_NUMBER,
             INVOICE_DATE,
             INVOICE_TYPE_LOOKUP_CODE,
             PAY_DATE,
             DEBIT,
             CREDIT,
             DESCRIPTION,
             CHECK_DATE,
             CHECK_NUMBER,
             VOUCHER_NUM,
             op_bal,
             cl_bal)
    where rnk = 1If it doesn't work as required then alter the line row_number () over (partition by VENDOR_NAME order by INVOICE_DATE) rnk
    I've just guessed that you can find a unique record (a persons account) by partitioning by the vendor_name at that point but perhaps you need other things.
    Mike

  • How to display row number in form?

    Hi guys,
    First I fll you in on the story so far..
    I have a database data block named :V_PAYUPLOADHEADER_HP, in the property palette I set order by facility and warehouse.
    I want to display row number for each fetched record, so I make :V_PAYUPLOADHEADER_HP.NUMB, which will contain the row number.
    The following is some methods that I already tried:
    - First I tried to make this field a database item=Y , column name = ROWNUM.
    The result is the number jump around (3, 1, 2, 5, 4 etc. instead of 1, 2, 3, 4, 5) I think it is because of the order by that I set.
    I have to keep this order by setting, so I look for another way to display the rownum.
    - Next I tried to set database item = N, column name = null, calculation mode = formula, formula = :system.trigger_record.
    When I run it all the value of :V_PAYUPLOADHEADER_HP.NUMB is 1. For all the records fetched is 1, 1, 1, 1 instead of 1, 2, 3, 4.
    - I also tried using POST-QUERY trigger attached to the block.
    In the trigger I have this code:
    :V_PAYUPLOADHEADER_HP.NUMB := :system.cursor_record;
    When I run it all the value of :V_PAYUPLOADHEADER_HP.NUMB is 1. For all the records fetched is 1, 1, 1, 1 instead of 1, 2, 3, 4..
    Is there something that I missed?
    What can I do to display the rownum?

    Hi
    You can achieve this by adding new item named 'ROWNUM'. in the Data Block you are working on.
    And it's 'BASE TABLE ITEM' property needs to be set as TRUE'. IN the property ,IN the post-query Trigger use...
    SELECT ROWNUM
    INTO :ROWNUM
    FROM TABLE
    WHERE EMP_ID =EMP_ID;Hope this helps...
    Regards,
    Abdetu...

  • Numbers 3.1 How to get row/column highlight on mouseover?

    Hi, hope someone can help with a query.
    I've just updated Numbers to 3.1 on OSX.
    The Release Notes indicated there is an option to have rows/columns highlighted on mouseover.
    I have looked in Preferences to find this option, without success.
    Does anyone know how to access this option please?
    Many thanks.
    Steve

    Hi Ian,
    Nice catch. I too was wondering about that particular feature, and couldn't find it. 
    What purpose that serves, I have no idea.
    Well, I suppose it's supposed to show you where your cursor is in a vast sea of numbers.
    On my machine when I hold down the option key and hover over a cell I see a pleasant blue cross with a white cell in the middle. Pondering the beauty of it all, for a moment I forgot what I was looking for.
    Actually, I'm finding it a nice touch, helpful for working with largish tables.
    SG

  • How to display nodestamp column in ApplicationsTreeTable -ViewMenu- Columns

    I have ApplicationsTree table on my UI screen with the columns ex: col1, col2, col3, col4.
    col1 is inside node stamp.
    col1 is not displaying under View Menu -> Columns.
    How can I display nodestamp column in ViewMenu -> Columns?
    Thanks,
    Swathi

    select a column, then use the contextual menu for the column and select "Add Column Before" or "Add Column After"
    you can also highlight a column then use the key combination:
    <option> + <right arrow> to add a column after (or to the right) and
    <option> + <left arrow> to add a column before (or to the left)

Maybe you are looking for