How to display 3 month columns and YTD column

Hello,
I need a help. My report layout requires to display the data in 3 dynamic month columns and one Fiscal year Year-to-date column for a period of time. For example, ending month is FEB:
Items : DEC : JAN : FEB : FY YTD
A     : $10     : $11     : $12     : $100     
B     : $1     : $2     : $3     : $10
(Note: FY YTD is the total sum from OCT to FEB (5 months), not 3 months to be displayed)
I tried to create a query and use Matrix with group, but the report always display five (5) month columns
from OCT to FEB instead of displaying three (3) month columns. If the query is limited to display
three months as desired, then the total sum will be 3 displayed months only (instead of 5 months).
How to create a query or how to display three months and FY YTD or do anything else with Oracle Builder9i?
Thanks,

You could use the DECODE function and variables
i.e. have a four column report
in your query use somthing like
, decode(period,:P_PERIOD1,1,0)* amount as period1
, decode(period,:P_PERIOD2,1,0)* amount as period2
, decode(period,:P_PERIOD3,1,0)* amount as period3
, amount as ytd
In your before report trigger poulate the variables with your required values

Similar Messages

  • How to display the value of a column in a chart at the top of each column

    How to display the value of each column in a chart at the top of each column?

    Like this?
    Done using chart Inspector.
    For details, see Chapter 7,  Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
    Regards,
    Barry

  • How to fetch the junk values of a column and the column name in oracle

    Hello,
    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
    Thanks in advance..

    Try this, I'm not sure if it'll help... and get some idea...
    try to modify it as per your requirement -
    select * from junk_vals;
    1     ranit1
    2#     ranit2
    3     ranit3
    4$     ranit@4
    5     ranit5
    6     r^anit6
    select 'ID', id, val from junk_vals
        where regexp_like(id,'[^a-zA-Z0-9]')
    UNION
    select 'VALUE', id, val from junk_vals
        where regexp_like(val,'[^a-zA-Z0-9]');
    -- "Output :"
    ID     2#     ranit2
    ID     4$     ranit@4
    VALUE     4$     ranit@4
    VALUE     6     r^anit6
    NOTE - I've considered anything other than Alphabets and Numbers as a Junk Value
    Edited by: ranit B on Jan 4, 2013 5:07 PM
    -- o/p added

  • How to add one date column and charecter column

    hi all,
    i have 3 column start_date(date),end_date( date),duration (varchar2)
    i am trying to add start_time and duration like this
    end_date := to_char(start_time) + duration;
    but its showing value_error
    how to add one date column and charecter column.
    Thanks

    you need something that does:
    end_date (DATE) := start_date (DATE) + <number of
    days> (NUMBER)Not necessarily, because if the duration is just a string representation of a number then it will be implicitly converted to a number and not cause an error
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select to_date('01/07/2007','DD/MM/YYYY') as start_dt, '3' as duration_days from dual)
      2  -- END OF TEST DATA
      3  select start_dt + duration_days
      4* from t
    SQL> /
    START_DT+
    04-JUL-07

  • How to display number of rows as columns in a select statement? This is on

    How to display number of rows as columns in a select statement? This is on 10g R2.
    Thanks,
    R

    For the current (ie. row 1 of 100)
    row_number over (order by -pick_a_column_set) as rnfor the total number of columns returned in your query
    count(*) over() as total_count

  • How to fetch Junk values and its columns dynamically

    Hello,
    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
    Thanks in advance..

    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..1. define "junk" values.
    2. usually it does not matter what values are in ID, because it is used internally by application, to maintain uniqueness or relations, not having any semantical meaning. End users usually should not see IDs, such IDs are generated automatically. There is no need to cleanse them from "junk" values.
    3. If you made a typo, and you are looking for "junk" values in Name column, it is a different story. You can use TRANSLATE to search such values, as already advised, translating all "junk" characters to one "junk" character and searching for the latter.
    select id, name from T where translate(name,'?@#$%^<>','~~~~~~~~~') like '%~%';
    Edited by: Mark Malakanov (user11181920) on Jan 4, 2013 11:40 AM

  • ALV: how to display only subtotals and total rows in the output

    ALV: how to display only subtotals and total rows in the output
    i am getting output
    i am getting subtotals for respective fields
    but i want to display only subtotals and totals rows in the output
    i have tried the
    totals_only   parameter in slis_layout_alv
    but it is not working.

    hi,
    For TOTAL
    For the amount field / quantity field in the field catalog give DO_SUM = 'X'    for WHOLE total
    For SUBTOTAL
    For subtotal you will have to create an internal table sort..Let's say you want to do subtotal for each customer..
    DATA: lt_sort type SLIS_T_SORTINFO_ALV,
    ls_sort type slis_sortinfo_alv.
    CLEAR ls_sort.
    ls_sort-spos = 1.
    ls_sort-fieldname = 'Give the field name that you do the sum'.
    ls_sort-up = 'X'.
    ls_sort-subtot = 'X'.
    APPEND ls_sort TO lt_sort.
    fieldcatalog-do_dum = 'X'.
    for subtotals
    WA_SORT-FIELDNAME = 'ERSDA'.
    WA_SORT-SPOS = '2'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOTAL = 'X'.
    APPEND WA_SORT TO IT_SORT.
    Refer
    http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e056d52611d2b468006094192fe3/content.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/doesnt-function-event-subtotal_text-in-alv-713787
    regards,
    Prabhu
    reward if it is helpful

  • I want to know the difference between Days column and Day1 Column

    Hi All,
    I used this query:
    SELECT to_char(return_date_time,'dd/mon/yyyy hh24:mi:ss') Test,
    DECODE ('I', 'I', DECODE (1, NULL, NULL, 0, NULL, SYSDATE + 1)) Days,
    DECODE ('I', 'I', SYSDATE + 1) Day1
    FROM fm_curr_locn
    WHERE patient_id = 'DU00002765'
    output: 
    Test
    Days
    Day1
    26/oct/2013 00:00:00
    26-OCT-13
    10/26/2013 3:06:59 PM
    I want to know the difference between Days column and Day1 column and why the days column didnt show the time
    Please anyone help.....
    Regards
    Shagar M

    Pleiadian wrote:
    It is the decode statement that is doing this.
    The format of decode is:
    decode(expression, search1, result1, search2, result2, searchn, resultn, default)
    All result fields must be of the same datatype and will be of the datatype of the first result (result1 in this example)
    In your example (the decode for the field Days) the first result is a NULL. I suspect (gurus? anyone?) that Oracle will use the varchar2 overload of the decode statement, and the date field will be converted to varchar2 using your NLS_DATE_FORMAT settings.
    In the second decode statment (Day1) the first result is of datatype date, so the result of the decode statement will be a date field (and will be parsed as such by your sql development tool)
    I agree, as NULL is the first result returned the datatype is undetermined, so Oracle is picking VARCHAR2 over others, and causing an implicit datatype conversion on the resultant date value, whereas the other which is returned as a date will use the local settings of the client tool being used.
    I can replicate the 'issue' in Toad, and it's rectified if we cast the first returned value of the decode statement...
    SELECT DECODE ('I', 'I', DECODE (1, NULL, CAST(NULL AS DATE), 0, NULL, SYSDATE + 1)) Days,
           DECODE ('I', 'I', SYSDATE + 1) Day1
    FROM dual

  • How to display your email and a message to finder on the lock screen of an iPhone?

    Hi,
    I loose things, including phones and keys...
    To prevent a worst case scenario: How to display your email and a message to finder on the lock screen of an iPhone? (6 plus, current iOS)
    That is, I assume most people finding an iPhone would want to try to contact me to give it back to me, if they know how: how can leave my contact information in the phone? This needs to be on the lock screen, naturally, as this is the only view the finder can see. It would be useful to be able to add a message of sorts a la "if found please call my wife ### or email me ###".
    How can this be done other than editing the JPG of the wallpaper, or sticking a business card to the back of the phone (these are the only solutions I came up with, there must be something better).
    Cheers!

    Greetings _daniel_, 
    Thank you for contributing to the Apple Support Communities. 
    It seems like you'd like to display a message on your iPhone 6 Plus in the event it is lost. Good news--you can do this with the Find my iPhone feature of iCloud.
    Check out these links for more information:
    iCloud: Set up iCloud
    iCloud: Use Lost Mode
    If you can’t find your device, use Lost Mode right away to lock it with a passcode, display a custom message on the screen, and keep track of its location.
    Cheers, 
    Jeremy

  • Change URL of Edit column and Title column link that appear on AllItems.aspx

    Hi there,
    In the below snapshot. I am trying to change the URL of the Edit column and Title Column. By default when click on Edit Icon on each item, it opens the EditForm.aspx for that item. Similary by clicking on title of an item, it opens DispForm.aspx.
    I need to change it to my custom forms, CustomEditForm.aspx and CustomDispForm.aspx . Could anybody please suggest if it can be done by any Jquery or using SPD
    I know I can change the default forms from SPD.
    I don't want to change the default forms. Because for some users I need to show them default forms. for some users I need to show custom forms.
    Many Regards,
    Khushi
    Khushi

    Hi Alex - I understand that I need to identify users. I have the following script for that. But Where should i write so that redirection applies to all the condition items in AllItem.aspx 
    function IsGroupMember(GroupName)
    var isGroupMember = false;
    $().SPServices({
    operation: "GetGroupCollectionFromUser",
    userLoginName: $().SPServices.SPGetCurrentUser(),
    async: false,
    completefunc: function(xData, Status) {
    if($(xData.responseXML).find("Group[Name='" + GroupName + "']").length == 1)
    isGroupMember = true;
    else
    return isGroupMember;
    Khushi

  • How to display RTF file and .doc file in JTextPane

    How to display RTF file and .doc file in JTextPane??

    Duplicate post
    http://forum.java.sun.com/thread.jsp?forum=57&thread=567029&tstart=0&trange=30

  • How to display a empty (non-existing) column and info in LAST row

    Hello!
    I´m trying to create the code that diplays all authors (author.name), empty COLUMN, NR_OF_BOOK_PER_AUTHOR.
    I want the LAST ROW to display: (column1) the word 'Sum:', (column2) nr of authors, (column3) total sum of all books
    Headache: How do I display the EMPTY column and how do I get the LAST ROW to display column1) 'Sum:', (column2) nr of authors, (column3) total sum of all books
    It should look like this:
    AUTHOR EMPTY NR_OF_BOOKS_PER_AUTHOR
    I can list all authors and NR_OF_BOOKS_PER_AUTHOR using this code:
    SELECT A.NAME, COUNT(B.ROWID)
    FROM AUTHOR A, BOOK B
    WHERE B.AUTHOR_ID = A.ID
    GROUP BY A.NAME
    ORDER BY COUNT(B.ROWID)
    I can count the numbers of authors (should be displayed in last row column2) using:
    SELECT COUNT(name)
    FROM author
    and I can list the total amount of books (should be displayed in last row column3) using:
    SELECT COUNT(title)
    FROM book
    But I come up short with how to display the EMPTY column and the last row containing (column1) the word 'Sum:', (column2) nr of authors, (column3) total sum of all books
    Any suggestions?
    Best regards,
    Daniel

    I want the LAST ROW to display: (column1) the word 'Sum:', (column2) nr of authors, (column3) total sum of all booksHave a look at GROUP BY with CUBE or ROLLUP.
    Cheers, APC

  • How to display the rows in to columns and columns into rows?

    DES:- I know by using pivot and unpivot you can convert rows into columns and columns into rows but i don't know how to write the syntax?

    Hi,
    Besides the places Martin mentioned above, there are many examples in the forum FAQ:
    https://community.oracle.com/message/9362005#9362005
    For an example of both PIVOT and UNPIVOT in the same query, see
    http://forums.oracle.com/forums/thread.jspa?threadID=920854&tstart=0

  • How to display Current Year and Month in Drop Down list

    Hi Dear friends,
    I am devloping a report. It has got 2 pages--input and output(Report) page.
    IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
    Now, my problem is:
    HOw to display current month and year by default in the dropdown list...........
    I hope my question is clear.
    Please help.
    Regards,
    ASh

    NO da,
    it is not working.
    First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
    So, i posted the question.
    I tried your code. It is giving following error.
    A Servlet Exception Has Occurred
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
    first.set(Calendar.YEAR, 2003)
    ^
    An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
    out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
    ^
    4 errors
    Pls. Help.
    Regards,
    Ashu

  • How to display images in a table column?

    Hi,
    In a VC model, I have to display images in a table column for each record found.
    How can this be done?
    Regards,
    Nitin

    Hi Nitin,
    It can be done by adding to the table the Image control (can be found under Advanced Controls in the Compose panel).
    In the URL property (in the Configure panel of the Image control) you can define any expression that will return the image URL. For example:
    ="http://hosting.site.url/"&@ImageNameField
    Regards,
    Udi
    Edited by: Udi Cohen on Jun 11, 2008 1:39 PM

Maybe you are looking for

  • How do I make a Table in iWeb?

    How make a table in iWeb?

  • MIGO - EXCISE TAB NOT DISPLAYED

    Hi Experts In MIGO, Excise Invoice tab is displayed during the Creation Mode, but in the MIGO display mode the Excise Invoice tab is not displayed, what could be the reason pls suggest me. Thanks in advance. Regards Rajaram

  • Networking iMac intel(OSX4.4), iMac CRT(OS9.2), printer, scanner, and cable

    I am trying to set up a network with my new iMac Core Duo and my old iMac CRT and a printer and a scanner. I want the printer and scanner to work with both computers, and for the Core Duo to be the one connected with the internet via cable. (My ISP w

  • Dynamic AS State Creation with SetProperty not working...

    I am trying to create a website that dynamically creates multiple states for content, download links, and contact info.  The reason I am using AS3 to create these states is because, in addition to reformatting/moving the UI/navigation elements, the s

  • Oracle VM and faxing

    Hi all, did a quick search and couldn't find anything - so if I've missed it I apologise. Has anyone ever gotten network faxing working with OVS? That is - with something like Hylafax or similar. How would I go about attaching a fax modem to a specif