How to display date aggregates in the reports?

Hi, I have a report that contains a date of and a date. How can I view all the dates between them in a report. This can clearly be an example. I have a date of: January 1, 2011 and a date: June 5, 2011. I want to display in my report that this output:

Date from the Date in
January 1, 2011 January 31, 2011
February 1, 2011 February 28, 2011
March 1, 2011 March 31, 2011
April 1, 2011 April 30, 2011
May 1, 2011 may 31, 2011
June 1, 2011 June 5, 2011

How can I do this? Thank you

This?

SELECT ADD_MONTHS(DECODE(LEVEL,1,FM_DT,TRUNC(FM_DT,'MM')),LEVEL-1) FM_DT,
       CASE TO_CHAR(LAST_DAY(ADD_MONTHS(FM_DT,LEVEL-1)),'MM')
       WHEN TO_CHAR(TO_DT,'MM') THEN
       TO_DT
       ELSE
       LAST_DAY(ADD_MONTHS(FM_DT,LEVEL-1))
       END TO_DT
FROM
(
SELECT TO_DATE('28-JAN-2011','DD-MON-YYYY') FM_DT, TO_DATE('31-DEC-2011','DD-MON-YYYY') TO_DT
FROM DUAL
)
CONNECT BY LEVEL<=TRUNC(MONTHS_BETWEEN(TRUNC(TO_DT,'MM'),TRUNC(FM_DT,'MM')))+1

-Clément

Tags: Oracle Development

Similar Questions

  • How to display date / time in the browser console?

    How to display date / time in the browser console?

    You can set through the Options (gear icon) page in the Web Console (Firefox/tools > Web Developer).
    This applies to the browser console and the Web console.

  • How to display certain messages when the report refers to "no data".

    Hello guys

    I have a report that related data when the user select filter conditions specifically, when they are not while the report returns no data. There are columns of the city, and B that users will still have to filter so that the report at least some data.

    I would like to change the "no data" message "Please select A and B" report when the results in "no data". Is it possible to do?

    Your thoughts?

    Thank you

    Go to another and pass the lay composed of the report on the view (s) and then go to "view results" and there, you can view what you ever need it in the text

    It may be useful
    Thank you
    Prash

  • How to display data in an interactive report on the form field?

    Hello

    I've created an interactive report with its form (goal to create and edit).
    Then, I created a new project with its early date and email id that is assigned to the project.
    When I clicked on the edit button, it opens the edit form and displays the same date, I entered but email id is not displayed.
    Instead, it shows the default value of the e-mail ID LOV, which is "- select Email ID -"
    How can I view the identification of email that I entered?

    Thank you
    Guy

    Hello Guy,.

    To discuss your design: why not store the PM_PERSON ID in the PROJECT table? Now, you store addresses several times (in PM_PERSON and in many PROJECT files), what happens if the email address change... (purely hypothetical, of course)...
    And create a foreign key between the PROJECTS and PM_PERSON also...

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • How to display time information in the report and the results?

    Is it necessary to manually calculate the following?

    • Start time of execution

    • Elapsed time since the beginning of the execution

    • Start of stage time

    • Step end time

    If not, where are these results available within TestStand?

    I would like to keep the timestamp sequence absolute (of Windows), execution time and time step at the end of a stage.  What is appropriate to use for this recall?

    I found the engine. Property of SecondsSinceStart, but this is not correlated with the beginning of the run.  This corresponds only to launching the TestStand engine, not when the sequence was started.

    Any advice would be appreciated.

    I did some digging and there's a performance. SecondsAtStart Property that you can link to the StartTime. Maybe what you need to calculate the hours you want.

    -Jack

  • How to display specific records on the form of the ADF

    Dear experts,

    I need to create a form of adf Wizard.

    -If the user is new, this form will show action createInsert.

    -If the user is not new (already have saved data), then this screen displays data based on the user login id.

    I can do the application module class createInsert part but not the specific data display part.

    You have a suggestion how to display specific records based on user login id, and how to filter the old and the new user?

    Kind regards

    Ricky

    You can use a router in a workflow as I've shown here https://tompeez.wordpress.com/2012/12/01/jdeveloper-11-1-1-5-0-use-router-to-create-new-row-or-edit-existing/

    Timo

  • How to display this checkbox at the bottom of table lines.

    Dear friends,

    I created a table and a checkbox element in this region.
    I want to display this item box after rows in a table.

    How to display this checkbox at the bottom of table lines.


    Thank you

    Hello

    OK, sorry.

    Place the checkbox element to declare and report change 'display point"for example"Page Template Body (2. (éléments ci-dessous le contenu de la région) ".

    Kind regards
    Jari

  • How will I know where all the reports of users has access

    Hi gurus,

    We use the Hyperion Financial Reporting 9.3.1 & we have 80 reports & 750 users. How will I know where all the reports of users has access. Where can I find this information. I checked the SSP, it only shows the provisioing details, but not the name of the report. I also checked the Essbase.sec but no use. Where can I get the info. Kindly help me.


    Kind regards
    Kris...

    There is no tool of Hyperion to display easily groups and security filters.

    But it really depends on how you set up your security model.

    Normally, you add users into groups and assign these groups to essbase and reports (via the BEEP groups) cubes, so you can check reports have access to correct group and the users are in a good group.

    There is a security tool to export available here, hosted by Applied Olap, and underground work Olap-based:
    http://www.appliedolap.com/free-tools/Advanced-Security-Manager

    Best regards, Iain

  • I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    I can't have multiple files open at the same time! I need to compare the content from one to the other. How to display two files at the same time?

    Hi sindres79946597,

    Open Acrobat Reader DC, navigate to the Edit-> Preferences-> General-> uncheck "Open Documents in the new tab in the same window.

    Now, reboot your system, when you open multiple PDFs that all will open in a new window so that you can easily compare.

    Kind regards
    Nicos

  • How to display Quick values in the story

    With the help of 11.1.1.6.2

    In a dashboard page, I have a table with a hierarchy of dimension for the organization. If you click on a division he runs a link action to call a script in the browser (javascript in a text on the dashboard section) from the division. If you expand the section, and then click on a market, it calls the function javascript even.

    Then, the Javascript function uses path go to update an analysis in an iFrame on the dashboard page and passes the value of the Division or the market value.

    The analysis of the target has two filters: Division is invited and the market is invited.

    So, after all, my question is how could display two values from the call of the road go into a narrative on the analysis of the target? Or I guess the other question is how to view the filter on the narrative values.

    Sorry for the long explanation, but I hope it makes sense.

    Thanks for any help or suggestion.

    Brad

    Try something using the Div tag
    for ex:
    < div id = filterValues > @{WeekBetween} {Default Value} < / div >
    < script >
    var i = document.getElementById('filterValues').innerHTML;
    document.getElementById('filterValues').innerHTML = aParams ["varDivision"];
    < /script >

    If brand pls help

  • How to display multiple images at the same time in CS6?

    How to display multiple images at the same time in CS6?

    Hello

    If you go to window > reorganize you can choose from several display options. Below, I have chosen two horizontal spaces since I have two images, but you can select other options if you have more than one image.

  • How to display data in the interactive report without colon (:)) column

    Dear gurus of the Apex,

    I am a beginner and you just create an application for the Apex of a worksheet. I created a list of named values and used in a box against a field in the page creation form default 3.

    When I selected several values in my box on the form, the data in the interactive report appear as a single line with a colon separating the values selected as follows: dog: Cat: bird

    What I would like is to have the data appear in the interactive report in a list like this multiline column:

    Dog
    CAT
    Bird

    I can work around this problem by modifying the SQL code in the Source region of the definition of the area of the report (interactive 1 Page by default) to replace the semicolon by < br >

    SELECT replace ("PETS_CHOSEN", ":","< br / > ')"PETS_CHOSEN", OF"MYAPP"Note: this is not format correctly in the display. I have replace the colon with a html br

    This works, but there seems to be a hack to me. I guess I missed an option simple setting somewhere, but I can't.

    The other problem with this solution is that when I export the report to Excel, that ship's dog < br > cat < br > Bird, which is seems worse than the colon.

    Thank you

    -Morgan

    Published by: mnrussel on February 16, 2009 04:13

    Hi Morgan,.

    I think you have at least two possibilities:

    1. replace the colon with "," (comma and space) - kind of reasonable on the screen and export

    2 create a second page that has the same report but use it "export: csv" model. Create a manual link to this page to replace the standard export binding. When these pages of the report are requested, they download immediately instead of display. So you can use commas in this one and < br > tags in the report to the screen version

    Andy

    ch - to display the tags in a post, use and lt; for < and & gt; for >

  • How to display different text for the labels in group above report Oracle report

    Hello

    Is there a way to change the text that is displayed in the labels in a report over the Group? For example, I have a report above group with my columns of data and above the columns, I have my column labels, but I would like to be able to display various text, i.e. different labels according to requirement. In other words, Column1 label could say column 1 or it's Column1, based on a condition. This is Oracle Report Builder 10.1.2.0.2.
    Thank you.

    If you use the wizard the column headers are created as fixed text elements. No way to change that.
    So, you have to delete text and replace by fields that use some of the columns in your data as the source model. This is how I create reports all the time. There is never any fixed text, all the text is retrieved in the data model.

    You can also use the format trigger. Simply place the elements of different text on top of the other and return TRUE or FALSE to display the correct label.

  • How to display data to decrease as Jan to Dec data in a report.

    Hi all

    I have a situation where I need a report that shows something like below.

    The data for Dec - CDA - (other points on the side) = 3500.

    Now, I need the report script to display the same value of Jan to Dec for CDA with all other items of the same size.

    Is this possible? If so, how?

    Well want to, help me in this.

    PS: The option to copy the data from December for all other months is excluded.

    TIA,
    Gerard.

    Use the RENAME command.

    Example: If you want to rename "Turnover" as "total sales":

    {RENAME 'Total sales'} "The figure".

    Hope this answered your question.

  • How to display data on the screen and save the data in a file at the same time?

    The code can display acceleration on the screen of the playbook.

    But, when fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ") runs, debug displays no source available.

    ??

    Does anyone know how to solve the problem, which writes data to a file?

    The code is below.

    /*
    * Copyright (c) 2011 Research In Motion Limited.
    *
    Licensed under the Apache License, Version 2.0 (the "license");
    * You may not use this file except in compliance with the license.
    * You can get a copy of the license at
    *
    www.Apache.org/licenses/license-2.0
    *
    * Unless required by the applicable law or agreement written, software
    * distributed under the license is distributed on an "AS IS" BASIS.
    * WITHOUT WARRANTIES OR CONDITIONS of ANY KIND, express or implied.
    * See the license for the specific language governing permissions and
    * limitations under the license.
    */

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    /**
    The milliseconds between the accelerometer readings. It's the same thing
    * rate in which the accelerometer data will be updated
    * material. The update of material rate is below to help
    * accelerometer_set_update_frequency (FREQ_40_HZ).
    */
    public static const int ACCELEROMETER_MAX_POLL_INTERVAL = 25;

    public static screen_context_t screen_ctx;
    public static screen_window_t screen_win;
    dialog_instance_t main_dialog = 0;

    paused int = 0;

    The forces of the accelerometer
    float force_x, force_y, force_z;

    file elements
    int _logcounter = 0;
    FullName Char [256];
    FILE * f;

    /**
    * Use the PID to set the id of Group window.
    */
    public static char
    get_window_group_id()
    {
    public static char s_window_group_id [16] = "";
    If (s_window_group_id [0] == '\0') {}
    snprintf (s_window_group_id, sizeof (s_window_group_id), "%d", getpid());
    }
    Return s_window_group_id;
    }

    /**
    * Set up a basic screen, so that the browser will be
    * Send window state events when the State of the window changes.
    *
    * @return @c EXIT_SUCCESS or EXIT_FAILURE @c
    */
    public static int
    setup_screen()
    {
    If (screen_create_context (& screen_ctx, SCREEN_APPLICATION_CONTEXT)! = 0) {}
    Return EXIT_FAILURE;
    }
    If (screen_create_window (& screen_win, screen_ctx)! = 0) {}
    screen_destroy_context (screen_ctx);
    Return EXIT_FAILURE;
    }
    use of int = SCREEN_USAGE_NATIVE;
    If (screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_USAGE, & use)! = 0) goto fail;
    If (screen_create_window_buffers (screen_win, 1)! = 0) goto fail;
    If (screen_create_window_group (screen_win, get_window_group_id())! = 0) goto fail;
    buff screen_buffer_t;
    If (screen_get_window_property_pv (screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void *) & buff)! = 0) goto fail;
    buffer_size int [2];
    If (screen_get_buffer_property_iv (buff, SCREEN_PROPERTY_BUFFER_SIZE, buffer_size)! = 0) goto fail;
    int attributes [1] = {SCREEN_BLIT_END};
    If (screen_fill (screen_ctx, chamois, attributes)! = 0) goto fail;
    int dirty_rects [4] = {0, 0, buffer_size [0], buffer_size [1]};
    If (screen_post_window (screen_win, buff, 1, (const int *) dirty_rects, 0)! = 0) goto fail;
    Return EXIT_SUCCESS;
    in case of failure:
    screen_destroy_window (screen_win);
    screen_destroy_context (screen_ctx);
    Return EXIT_FAILURE;
    }

    /**
    * Rotates the screen at the specified angle.
    *
    @param angle angle to rotate the screen.  Must be 0, 90, 180 or 270.
    *
    * @return @c EXIT_SUCCESS on success, to another @c EXIT_FAILURE
    */
    public static int
    rotate_screen (int angle)
    {
    If ((angle! = 0) & (angle! = 90) & (angle! = 180) & (angle! = 270)) {}
    fprintf (stderr, "Invalid Angle\n");
    Return EXIT_FAILURE;
    }
    int rc;
    int rotation;
    RC = screen_get_window_property_iv (screen_win, SCREEN_PROPERTY_ROTATION, & rotation);
    If (rc! = 0) {}
    fprintf (stderr, "error getting the window of the screen rotation: %d\n", rc);
    Return EXIT_FAILURE;
    }
    int size [2];
    RC = screen_get_window_property_iv (screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error getting size memory buffer window screen: %d\n", rc);
    Return EXIT_FAILURE;
    }
    int temp;
    switch (angle - rotation) {}
    case - 270:
    case - 90:
    decision 90:
    case 270:
    Temp = size [0];
    size [0] = size [1];
    size [1] = temp;
    break;
    by default:
    break;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_ROTATION, &angle);)
    If (rc! = 0) {}
    fprintf (stderr, "screen rotation window for parameter error: %d\n", rc);
    Return EXIT_FAILURE;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error creating window screen size: %d\n", rc);
    Return EXIT_FAILURE;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_SOURCE_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error creating window screen size: %d\n", rc);
    Return EXIT_FAILURE;
    }
    RC = screen_set_window_property_iv (screen_win, SCREEN_PROPERTY_BUFFER_SIZE, size);
    If (rc! = 0) {}
    fprintf (stderr, "error creating window buffer size of the screen: %d\n", rc);
    Return EXIT_FAILURE;
    }
    Return EXIT_SUCCESS;
    }

    /**
    To manage an event of navigator.
    *
    * @return @c the value true if the application should shut down, another fake.
    */
    public static bool
    handle_navigator_event(bps_event_t *Event)
    {
    bool should_exit = false;
    switch (bps_event_get_code (event)) {}
    case NAVIGATOR_EXIT:
    should_exit = true;
    break;
    case NAVIGATOR_ORIENTATION_CHECK:
    navigator_orientation_check_response (event, true);
    break;
    case NAVIGATOR_ORIENTATION:
    {
    int angle = navigator_event_get_orientation_angle (event);
    If (rotate_screen (angle) == EXIT_FAILURE) {}
    should_exit = true;
    }
    navigator_done_orientation (Event);
    break;
    }
    }
    Return should_exit;
    }
    /**
    * Display an alert dialog box that contains the location data.
    */
    public static void
    show_main_dialog()
    {
    If {(main_dialog)
    return;
    }
    dialog_create_alert(&main_dialog);
    dialog_set_alert_message_text (main_dialog, "Acceleration to first fix");
    dialog_set_size (main_dialog, DIALOG_SIZE_FULL);
    dialog_set_group_id (main_dialog, get_window_group_id());
    dialog_set_cancel_required (main_dialog, true);
    dialog_show (main_dialog);
    }

    /**
    * Displays geolocation data in the main dialog box.
    */
    public static void
    display_acceleration_data (float force_x, float force_y, float force_z) {}
    char buf [1024];
    snprintf (buf, sizeof buf,
    "\tX: m\n % 7.3.f.
    "\tY: m\n % 7.3.f.
    "\tZ: m\n % 7.3.f."
    force_x, force_y, force_z);
    dialog_set_alert_message_text (main_dialog, buf);
    dialog_update (main_dialog);
    }

    void createafile() {}
    sprintf (fullname, "shared/documents/Raw-%d.txt",_logcounter);
    {if(f==null)}
    file does not exist
    f = fopen (fullname, "r");
    {while(f!=null)}
    file exists
    fclose (f);
    ++ _logcounter;
    sprintf (fullname, "shared/documents/Raw-%d.txt",_logcounter);
    f = fopen (fullname, "r");
    }
    }
    }

    write data to the file
    void writedataintofile() {}
    f = fopen (fullname, "w");
    fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ");
    fprintf (f, "" 7% 7% .3f, .3f, %7.3f\n ', force_x, force_y, force_z ");
    fclose (f);
    }

    /**
    * A sample application shows the native APIs of BlackBerry for accelerometer.
    * The example initializes and reads the accelerometer periodically until one
    * NAVIGATOR_EXIT event is received.
    Enforcement also tuned to changes status window in the browser so that
    * It can stop reading the accelerometer when the application is no longer visible.
    */
    int main (int argc, char * argv {})
    bool exit_application = false;
    /*
    * Until we can listen for events from the BlackBerry Tablet OS platform
    * services, we need to initialize the BPS infrastructure
    */
    bps_initialize();
    /*
    * Once the BPS infrastructure has been initialized, we can save to
    * events of different services of BlackBerry Tablet OS platform. The
    * Browser service manages and provides the life cycle of application and
    * events of visibility.
    For the example, we ask browser events so that we can follow when
    * the system ends the application (NAVIGATOR_EXIT event). This allows to
    * us to clean up resources in the application.
    */
    navigator_request_events (0);
    dialog_request_events (0);
    /*
    * Initialize the screen so that the Windows Id is correctly set, to allow
    * dialogs to display.
    */
    If (setup_screen()! = EXIT_SUCCESS) {}
    fprintf (stderr, "Failed to initialize the screen.");
    Exit (-1);
    }
    /*
    * Once the BPS infrastructure has been initialized, we can save to
    * events of different services of BlackBerry Tablet OS platform. The
    * Browser service manages and provides the life cycle of application and
    * events of visibility.
    *
    For the example, we ask browser events so that we can follow when
    * the system ends the application (NAVIGATOR_EXIT event).
    *
    * We ask events of dialogue so that we can be notified when the service of dialogue
    * answers to our queries/requests.
    */
    If (BPS_SUCCESS! = navigator_request_events (0)) {}
    fprintf (stderr, "error asking navigator events: %s", strerror(errno) (errno));
    Exit (-1);
    }
    If (BPS_SUCCESS! = dialog_request_events (0)) {}
    fprintf (stderr, "error asking dialog events: %s", strerror(errno) (errno));
    Exit (-1);
    }
    /*
    * Create and display the dialog box that displays the data from the accelerometer.
    */
    show_main_dialog();
    /*
    Prior to initialize the accelerometer function, we must ensure the unit
    * takes in charge
    */
    If (sensor_is_supported (SENSOR_TYPE_ACCELEROMETER)) {}
    /*
    * If the device does not support the accelerometer so warn the user,.
    * clean in and out
    */
    public static const int SENSOR_RATE = 40;
    sensor_set_rate (SENSOR_TYPE_ACCELEROMETER, SENSOR_RATE);
    sensor_request_events (SENSOR_TYPE_ACCELEROMETER);

    }
    /*
    * Initialize the accelerometer setting the rate at which the
    * accelerometer values will be updated material
    */
    accelerometer_set_update_frequency (FREQ_40_HZ);

    /*
    Treat browser events and take the accelerometer readings periodically
    * until we receive a NAVIGATOR_EXIT event.
    */
    createafile();
    f = fopen (fullname, "w");

    While (! exit_application) {}
    /*
    * By setting the timeout to bps_get_event to ACCELEROMETER_MAX_POLL_INTERVAL,
    * We assign the maximum duration (in millis) who will wait before
    * release so that we can take a reading of the accelerometer.
    */
    bps_event_t * event = NULL;
    bps_get_event (& event, ACCELEROMETER_MAX_POLL_INTERVAL);

    If {(event)
    If (bps_event_get_domain (event) is {sensor_get_domain()})
    /*
    * We woke up. See if we are in the paused state. If not,
    take a reading of the accelerometer
    */
    If (! pause) {}
    sensor_event_get_xyz (event, & force_x, & force_y, & force_z);
    display_acceleration_data (force_x, force_y, force_z);
    fprintf (f, "X (m/s2), Accel Accel Y (m/s2), Accel Z (m/s2) \n" ");
    fprintf (f, "" 7% 7% .3f, .3f, %7.3f\n ', force_x, force_y, force_z ");
    } //paused
    }
    / * If this is an event of the dialog box, determine the response code and handle
    * the event accordingly.
    */
    {ElseIf (bps_event_get_domain (event) == dialog_get_domain() {)}
    ;
    }
    /*
    * If it's a NAVIGATOR_EXIT event and then set the exit_application
    * indicator so that the application stops processing events, clean and
    * output.
    */
    {ElseIf (bps_event_get_domain (event) == navigator_get_domain() {)}
    exit_application = handle_navigator_event (event);
    }
    } //if event
    } //while
    /*
    * Destroy the dialog box, if it exists.
    */
    If {(main_dialog)
    dialog_destroy (main_dialog);
    }

    fclose (f);

    /*
    * Clean the infrastructure bps and output
    */
    sensor_stop_events (SENSOR_TYPE_ACCELEROMETER);
    bps_shutdown();
    screen_destroy_window (screen_win);
    screen_destroy_context (screen_ctx);
    return 0;
    } //main

    Hello

    As I said on your other thread:

    In order to write in the shared directory/documents, your application should request action "access_shared" and it must be granted by the user. Make sure you have

    access_shared

    in your bar - descriptor.xml.

    Also note that the shared documents folder may not be the best place to write the application log data. There is one connects / in the sandbox to this effect, or the application directory data / directory if the information should be persisted. The documents/shared/folder is designed for documents that the user creates or interacts with.

    HTH,

    Christian

Maybe you are looking for