How to display the week of the year in a report

Hi,
I am doing a report, that needs to break down the information, according to month and then week.
The week of the year isn't stored anywhere in the database, so i guess it would have to be calculated.
How would i go about doing this in report?

hi, yes thats what i mean.
So if i run my report for 01-feb-2008 to 30-march-2008
it needs to group the data according to weeks.
eg. week5 (data)
week6 (data)
etc....
i got this code: select to_char(sysdate, 'IW') from dual;
will it allow me to do this?

Similar Messages

  • How to display the year

    Hi All
    How can i display the year from the following query:
    select
    case when to_number(to_char(NTPACT,'mm'))<4 then 'Q1'
    when to_number(to_char(NTPACT,'mm'))<7then 'Q2'
    when to_number(to_char(NTPACT,'mm'))<10 then 'Q3'
    else
    'Q4'
    end quarter
    from testtbl
    output is
    Q1,Q3,Q4,Q2...............
    Desire out put is:
    YYQ1,YYQ3,YYQ4,YYQ2..............
    Please advice me
    thanks

    SQL> create table testtbl (ntpact)
      2  as
      3   select add_months(trunc(sysdate,'mm'),-level)
      4     from dual
      5  connect by level <= 24
      6  /
    Table created.
    SQL> select ntpact
      2       , case when to_number(to_char(NTPACT,'mm'))<4 then 'Q1'
      3         when to_number(to_char(NTPACT,'mm'))<7then 'Q2'
      4         when to_number(to_char(NTPACT,'mm'))<10 then 'Q3'
      5         else 'Q4'
      6         end quarter
      7    from testtbl
      8  /
    NTPACT              QU
    01-06-2008 00:00:00 Q2
    01-05-2008 00:00:00 Q2
    01-04-2008 00:00:00 Q2
    01-03-2008 00:00:00 Q1
    01-02-2008 00:00:00 Q1
    01-01-2008 00:00:00 Q1
    01-12-2007 00:00:00 Q4
    01-11-2007 00:00:00 Q4
    01-10-2007 00:00:00 Q4
    01-09-2007 00:00:00 Q3
    01-08-2007 00:00:00 Q3
    01-07-2007 00:00:00 Q3
    01-06-2007 00:00:00 Q2
    01-05-2007 00:00:00 Q2
    01-04-2007 00:00:00 Q2
    01-03-2007 00:00:00 Q1
    01-02-2007 00:00:00 Q1
    01-01-2007 00:00:00 Q1
    01-12-2006 00:00:00 Q4
    01-11-2006 00:00:00 Q4
    01-10-2006 00:00:00 Q4
    01-09-2006 00:00:00 Q3
    01-08-2006 00:00:00 Q3
    01-07-2006 00:00:00 Q3
    24 rows selected.
    SQL> select ntpact
      2       , to_char(ntpact,'yy"Q"q') quarter
      3    from testtbl
      4  /
    NTPACT              QUAR
    01-06-2008 00:00:00 08Q2
    01-05-2008 00:00:00 08Q2
    01-04-2008 00:00:00 08Q2
    01-03-2008 00:00:00 08Q1
    01-02-2008 00:00:00 08Q1
    01-01-2008 00:00:00 08Q1
    01-12-2007 00:00:00 07Q4
    01-11-2007 00:00:00 07Q4
    01-10-2007 00:00:00 07Q4
    01-09-2007 00:00:00 07Q3
    01-08-2007 00:00:00 07Q3
    01-07-2007 00:00:00 07Q3
    01-06-2007 00:00:00 07Q2
    01-05-2007 00:00:00 07Q2
    01-04-2007 00:00:00 07Q2
    01-03-2007 00:00:00 07Q1
    01-02-2007 00:00:00 07Q1
    01-01-2007 00:00:00 07Q1
    01-12-2006 00:00:00 06Q4
    01-11-2006 00:00:00 06Q4
    01-10-2006 00:00:00 06Q4
    01-09-2006 00:00:00 06Q3
    01-08-2006 00:00:00 06Q3
    01-07-2006 00:00:00 06Q3
    24 rows selected.Regards,
    Rob.

  • How to display the items in a Report Region

    Is it possiable to have the fields in a report region based on an sql query be display in somthing other than a row? For example if I have a Report Region with four columns it will look something like:
    <Field 1, row 1 value> <Field 2, row 1 value> <Field 3, row 1 value> <Field 4, row 1 value>
    <Field 1, row 2 value> <Field 2, row 2 value> <Field 3, row 2 value> <Field 4, row 2 value>
    <Field 1, row 3 value> <Field 2, row 3 value> <Field 3, row 3 value> <Field 4, row 3 value>
    etc
    Is it possiable to tell ApEx to display the Report Region like:
    <Field 1, row 1 value> <Field 2, row 1 value>
    <Field 3, row 1 value> <Field 4, row 1 value>
    <Field 1, row 2 value> <Field 2, row 2 value>
    <Field 3, row 2 value> <Field 4, row 2 value>
    <Field 1, row 3 value> <Field 2, row 3 value>
    <Field 3, row 3 value> <Field 4, row 3 value>
    etc
    Maybe there is a nother way to do this that uses somthing other than an sql based report region. Thanks very much for the help.

    This can be done using a SQL query report region with a [custom report template|http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/themes.htm#sthref1744].
    Unfortunately the documentation is not particularly helpful on this topic, and as use cases tend to be very specific, reusable solutions are rarely shared in the community ("custom" reports after all...) See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=1569996] for a good discussion of the technique, with a link to an example on apex.oracle.com.
    A response to [another recent thread|http://forums.oracle.com/forums/thread.jspa?threadID=1012690] showed another example on page 1 of the [Online Store demo app|http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#STORE], which you can download, install and examine. This uses a custom report template in conjunction with the report HTML Expression feature.
    (I'm not totally clear on the display you're after: it might help to repost it using some example data rather than the abstract <Field 2, row 1 value> approach. Wrap the sample in \...\ tags to get fixed width characters that can be made to align, if that will help.)

  • How to display the Image in PDF report by using iText Report

    Hi
    Im trying to display the image which is very big one.
    This is my code
    Document document=new Document();
    PdfWriter.getInstance(document,new FileOutputStream("imagePDF.pdf"));
    document.open();
    Image image = Image.getInstance ("1.bmp");
    document.add(new Paragraph("Images in PDF"));
    document.add(image);
    document.close();
    But the image "1.bmp" is displayed partially. Its not spanning to the next page.
    Can anyone help me to solve this one?
    Thanks in Advance
    dhilip

    Do you actually want the image to span multiple pages? I am not sure that will be possible without splitting the image; the itext mailing list would be the place to ask.
    You could make the the page size big enough for the image using Document.setPageSize()

  • How to display the comparision values in reporting?

    Hi,
    As per my requirement , this was the scenario
    -> INCREASE IN CURRENT LIABILITIES
    -> DECREASE IN CURRENT LIABILITIES
    Here i need to take all the G/L's of current Liabilities of previous fiscal year and current Fiscal year Current Liabilities amount , Based on the amount comparison i should display if amount is more , the amount should be in Increase liabilities else the amount should display in Decrease Liabilities.
    And more the amount should display in month i mean based on period wise.
                                                                April09    may09    june09       Total  -
    Mar
    INCREASE IN CURRENT LIABILITIES 
    DECREASE IN CURRENT LIABILITIES

    Vasu,
    Display current and previous year liabilities.
    create a calculated keyfigure(diff) to find out difference(increase or descrease).
    Create 2 more CKF for increase and decresase in liabilities.
    INCREASE IN CURRENT LIABILITIES : ( diff > 0 ) * diff " use boolean to calculate same
    DECREASE IN CURRENT LIABILITIES: ( diff < 0 ) * diff " use boolean to calculate same
    Srini

  • How to display the output of a reports called from forms in the same window

    Hi all.
    I have installed Forms / Reports 11g Rel2 developer only installation on my windows 7 box.
    I can successfully call a reports from forms using RUN_REPORT_OBJECT and WEB_SHOW.document, but the report is opened in a new window.
    I'd like to open it in the same widow, in a new tab, similar to ctrl-t and make a call.
    How is that possible?.
    I'm using Chrome 25.0. Could this be done through browser settings?.
    Thanks in advance ...!
    Edited by: myluism on 14-mar-2013 6:09

    Don't know for Chrome, so Google for it.
    One more thing, though. what is the 2nd parameter in web.show_document? Is it '_blank'? If not, try that.

  • How to display the variable screen with report in the same page together

    our customers want to design a web application use BEx
    they want the variable screen can be displayed with the report result in the same web page together
    so they can modify the variable filters any time and refresh the report with new variable filter
    i have tried the navigation area,but it seems only use new filter to the data athough get,we can't change the filter we input in the variable screen.
    is there any way to display these together?
    even I can use BSP.

    I think to display var screen with the report is not possible.(At least it will not be static). You need to refresh the report and choose the varibale at that time.
    Other option could be to bring all the possible value in the report and provide your user with the filter value. But this will make your report slow as you may have to bring more data in the filter.
    Thanks...
    Shambhu

  • How to display the Previous years

    Hi
      CJE0 - 12KST1A costs:budget/actual/commt/rem.plan/assd
    How to display the previous years budget in above mentioned report. at present the report is showing only cumulative value of previous years,2009 and 2010.....
    My requirement is from 2005 to 2009 i want display the value in this report, please through some light on this.
    Thanks
    S.Murali

    Hi
    But i want check the previous years budget for some number of projects not one by one, because the number of project are more.
    The above mentioned solution is for one by one i can check the pervious years budget. But my requirement is collective.
    Thanks
    S.Murali

  • How to display the data from database(MS access) to a textbox

    anyone know ?

    how to display the data from database(MS access) to a
    textboxThe reply hasn't changed over these years. Read the tuutorial on how to fetch the data. You can display it anywhere you feel like. :)
    http://java.sun.com/docs/books/tutorial/jdbc/

  • In sap scripts how to display the driver program

    Hi,
        I Want to know the sap scripts How to display the output to driver program

    Hi,
    Go to NACE Transaction.
    Select application for ex: if sales V1.
    Click on output types.
    Select the output type for ex : BA00
    Double click on Processing routines.
    There you can find the Driver Program name and Script/smart form name.
    Reward if useful.
    Thanks,
    Raju

  • How to display the sort value in the selection screen in the report title

    Dear All,
    How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
    Good day,
    Thanks and regards
    Arun S

    Hi Arun,
    Try this.
    1, Set one dynamic parameter,
    2, Drag and drop that parameter into  your report title.
    3, Pass the value(sort value) dynamically from your application,
    4, Cheers..
    Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then  set the data source from CR designer. and darg and drop that data column into the report.
    Hope this will work,
    Regards,
    Salah
    Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

  • How to change the year in a range of column dates to the new year?

    How to change the year in a range of column dates to the new year?

    Depends on the pattern of the dates. The last procedure will work for any pattern, or no pattern at all.
    For examples.the dates are assumed to be in column A, starting at A2
    Sequential dates?
    Enter first updated date in the first cell.
    Enter =A2+1 in cell A3. Copy the cell.
    Select A3 to the end of the list. Paste.
    With the cells still selected, Copy, then go Edit > Paste Values.
    Evenly spaced dates?
    Same procedure as above, but replace +1 in the formula with + and the number of days between dates in the list.
    Randomly spaced dates?
    Select cell B2. Press option-left arrow to insert a (temporary) column to the left of column B.
    Click on the empty cell B2 in the new column. Enter the formula below:
    =DATE(YEAR(A)+1,MONTH(A),DAY(A))
    Copy the cell, then select B2 - Bn where n is the last ow containing a date to be converted. Paste,
    With the cells still selected, Copy.
    Click on A2, then go Edit > Paste values.
    Click on the column B reference tab to select all of column B.
    Hover the mouse over the right end of the reference tab, and click the black triangle when it appears.
    Choose Delete Column from the menu that appears.
    Regards,
    Barry

  • HOW TO DISPLAY THE TEXT ON A PARTICULAR PAGE IN SAPSCRIPTS

    HI,
       HOW TO DISPLAY THE TEXT ON A PARTICULAR PAGE IN SAPSCRIPTS?

    in ur script main window
    /: IF &TTXSY-PAGE& = 15.              
    ur text or standard text           
    /: ENDIF.                             
    use this.
    hope it helps if any issues revert back

  • How to display the Buyer's signature in PO BI Publisher Report

    Hi,
    How to display the Buyer's signature dynamically in XMLP Purchase Order Report.
    Please anybody help on this.Your help greatly appriciated.

    Hi All once again
    I was able to display the signature on XMLP AP Check Print Report by went through the follwoing Tim's blog http://blogs.oracle.com/xmlpublisher/2006/04/13#a12
    But in Purchase Order report requirement is different. We need to display the Buyer's signature on XMLP PO Report. So, where is the best place to store the buyers signatures.(For example if we have 10 buyers with 10 signatures respectively then after approving the PO, we should display that particular buyer's signature in PO XML Publisher report).We observed that in byuers & User's form there is no attachment feature enabled.
    This is an urgent requiremnt. Please help/guide/suggest to resolve this issue.
    Thanks in advance.

  • How to display the results in order by based on search value

    Hi All,
    how to display the results in the below order.
    CREATE TABLE TEST( SONGID  NUMBER, TITLE   VARCHAR2(200))
    INSERT INTO TEST(SONGID,TITLE) VALUES (10,'AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (11,'CICCONE, MADONNA (CA)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (12,'DALLIN, MADONNA LOUISE/STOCK');
    INSERT INTO TEST(SONGID,TITLE) VALUES (13,'MADONNA');
    INSERT INTO TEST(SONGID,TITLE) VALUES (14,'MADONNA (A)/ AHMADZAI, MIRWAIS (C)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (15,'MADONNA (CA)');
    INSERT INTO TEST(SONGID,TITLE) VALUES (16,'MIRWAIS AHMADZAI, MADONNA');     
    INSERT INTO TEST(SONGID,TITLE) VALUES (17,'MIRWAIS (CA)/ MADONNA (CA),AHMADZAI');
    INSERT INTO TEST(SONGID,TITLE) VALUES (18,'MADONNA (CA),CICCONE');
    SELECT *FROM  TEST WHERE INSTR (TITLE, 'MADONNA') > 0
    output:
    SONGID     TITLE
    10     AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)
    11     CICCONE, MADONNA (CA)
    12     DALLIN, MADONNA LOUISE/STOCK
    13     MADONNA
    14     MADONNA (A)/ AHMADZAI, MIRWAIS (C)
    15     MADONNA (CA)
    16     MIRWAIS AHMADZAI, MADONNA
    17     MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
    18     MADONNA (CA),CICCONE
    Expected output :
    13     MADONNA
    14     MADONNA (A)/ AHMADZAI, MIRWAIS (C)
    15     MADONNA (CA)
    18     MADONNA (CA),CICCONE
    ...if user searches with 'MADONNA' , I have to display the results like title starts with 'MADONNA' first then rest of the records.
    Please let me know is it possible to display the results in that order.
    Regards,
    Rajasekhar

    This may be a bit more accurate:
    SQL> SELECT *
      2  FROM   TEST
      3  WHERE  INSTR (TITLE, 'MADONNA') > 0
      4  ORDER  BY INSTR (TITLE, 'MADONNA')
      5           ,TITLE
      6  ;
                  SONGID TITLE
                      13 MADONNA
                      14 MADONNA (A)/ AHMADZAI, MIRWAIS (C)
                      15 MADONNA (CA)
                      18 MADONNA (CA),CICCONE
                      12 DALLIN, MADONNA LOUISE/STOCK
                      11 CICCONE, MADONNA (CA)
                      17 MIRWAIS (CA)/ MADONNA (CA),AHMADZAI
                      16 MIRWAIS AHMADZAI, MADONNA
                      10 AHMADZAI, MIRWAIS (CA)/ MADONNA (CA)

Maybe you are looking for

  • HP-UX Kernel Params for WLS 6.0SP2 Cluster to Avoid java.lang.outofmemory and/or thread death

              I'm running a WLS 6.0 SP2 clustered application on HP-UX 11i. I'm seeing heap and           thread issues on start-up or invocation of my application as I deploy EJB's and create           DB connection pools. These are fairly trivial tasks

  • Inserting rows in PL/SQl table

    Hi, I have a PL/SQl table which i populated through bulk collect and now i am trying to loop through the table (actually quite a few nested loops) ... Now inside one of my loops i might need to insert a new row by splitting field in the existing row

  • Storing PDF output in Opentext and associating with BP

    Hi -  We have installed Opentext doculink and performed all the BASIS configrations succesffully. I would greatly appreciate any advice on how to proceed with the following: * When a PDF is generated using output determination (emailed to a BP) we wa

  • National Character setting

    DB version Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit using Sql/Developer version 1.5 to test My DB has National character set set to unicode (NLS_NCHAR_CHARACTERSET     AL16UTF16) and character set to US7ASCII (NLS_CHARACTERSE

  • Integration wid MIcrosoft SOLOMON

    Hi All, I have to integrate 200 Solomon system with XI. Data communication will be bidirectional & integration will take place for almost 10 business processess which wil be similar for each Solomon system. My query is can I use webservice to send da