Getting data of next 4 months in Webi

Hello Experts,
I have data of next  4 years in my database.  I have created one date object in universe and I have created prompt on this date object. My requirement is as follows :
User will enter the date through prompt and my report should pull data for next 4 months  from entered date  and display in report as follows:
e.g If user enters date as 17/02/2011, then report should pull data of next 4 months as follows:
      March                          Apr             May           Jun     
Records for March       Records for April     ........          .......
I think this should be achivable using Crosstab. But I am not getting exact way to do this.
Any help in this regard is greatly appreciated.
Regards,
Chinmay

Other approach is:
1. Go to Universe Designer
2. Create a filter named "Prompt Date + 4 months"
In the 'Where' textbox write something like this:
dateDimension between @Prompt('Enter date','D',,mono,free) and dateadd ( Month ,4, @Prompt('Enter date','D',,mono,free) )
(I am using Sybase database syntax that's why I can use dateadd function.  You have to use the equivalent function depending on the database you are using).
3. Back to WebIntelligence, in Query Editor, Pane Filter use this filter "Prompt Date + 4 months", instead of the condition you were using before
4. Then you can use a function like
=NumberOfMonth([Date Dimension])
in the headers of your crosstab.

Similar Messages

  • How to calculate age based on current month and over the next 12 months in Webi 4.1

    Hi,
    I am working on a report where I need to show employees who turned 65 from the time the report is run to over the next 12 months.I have the 'Date of Birth' field available. I am using Bex Query as a data source and webi 4.1. How do I calculate this in Webi 4.1. I appreciate any help.
    Thank you,
    Charvi.

    Hi Charvi,
    Get the all employees who are all in 64 age bucket till yesterday.  Keep indicator for these employees.
    Then obviously these employees will be falling in 65 age in coming 12 months/365 days.
    Same you can get at Bex level also. Create formulae :
    if employee age = 64 then 1 else 0.
    (AGE = 64 * 1 + 0)
    Then create condition on this formulae as Value = 1.
    Revert back your feedback.
    Regards, Vijay

  • Financial Report to get data of previous 2 months

    Hi,
    I got a requirement to create a report to show the data of previous 2 months based on the prompted month and year. Suppose if user selects March and year as *2009* then my report should show data for Mar followed by Feb and Jan of *2009*. I am able to create that correctly for the current year if the prompted month is from March to December.
    But if user prompts Jan and Year as *2009* then I should retrieve the report of data*Jan* of *2009* followed by Dec and Nov of previous year that is *2008*. Similarly if user prompts Feb then my report should show the data of Jan of this year 2009 and Dec of *2008*. I have YEAR and PERIOD dimensions in the Column. Could anybody please help me how can I provide such functionality. Thanks in advance.
    Regards,
    Sravan

    Hi Sravan,
    Check the below thread...hope it will help you.
    Very Urgent FR Report
    Regards,
    Mars

  • Get data from a specific month?

    I have this code:
    <h1><cfoutput>#self#</cfoutput></h1>
    <cfquery datasource="Intranet" name="month_data">
      select * from CSEReduxResponses where status=1 and execoffice_status=0
       AND MONTH([approveddate]) = MONTH(GETDATE())
       </cfquery>
    <cfquery datasource ="Intranet" name="GetDeptSubmissions">SELECT * FROM CSEReduxResponses</cfquery>
    <cfquery dbtype="query" name="GetApproved">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 1</cfquery>
    <cfquery dbtype="query" name="GetDenied">SELECT * FROM GetDeptSubmissions WHERE status = 1 AND execoffice_status = 2</cfquery>
    <cfif month_data.RecordCount gt 0>
    <cfoutput>
              <h2>Comments / Ratings Administration</h2>
              <div>
                        <div class="display_count pending_outer">
                                  <div class="display_count_desc pending_inner">Pending</div>
                                  <cfif month_data.RecordCount gt 0><a href="cse_execoffice_pending.cfm"></cfif>
                                            <span class="display_count_number">#month_data.RecordCount#</span>
                                  <cfif month_data.RecordCount gt 0></a></cfif>
                        </div><!--- /div class="display_count" --->
                        <div class="display_count approved_outer">
                                  <div class="display_count_desc approved_inner">Approved *</div>
                                  <cfif GetApproved.RecordCount gt 0><a href="cse_execoffice.cfm?approved"></cfif>
                                            <span class="display_count_number">#GetApproved.RecordCount#</span><br>
                                  <cfif GetApproved.RecordCount gt 0></a></cfif>
                        </div><!--- /div class="display_count" --->
                        <div class="display_count denied_outer">
                                  <div class="display_count_desc denied_inner">Denied</div>
                                  <cfif GetDenied.RecordCount gt 0><a href="cse_execoffice.cfm?denied"></cfif>
                                            <span class="display_count_number">#GetDenied.RecordCount#</span><br>
                                  <cfif GetDenied.RecordCount gt 0></a></cfif>
                        </div><!--- /div class="display_count" --->
              </div>
    </cfoutput>
    </cfif>
    Right now it display the the output if the 'month_data.recordcount gt 0' , but this would be for all the
    data from the current month because of the query 'month_data'
    What I want to do display_count for each month.
    for example right now it display the data from April, but once its May I would like to display another
    'display_count' from the month of March, even if the other Pending from April still has not hit zero(0).
    any help/advice will help, not sure if there is a better way to do this.
    this is a example of what i have right now, this has 3 peding in the month of April

    Carl Von Stetten wrote:
    It looks like you've posted this same or related question twice on StackOverflow (http://stackoverflow.com/questions/22970021/how-can-i-show-a-output-fr om-a-specific-date and http://stackoverflow.com/questions/23092245/how-to-output-different-da ta-from-different-months).  If you're going to cross-post to multiple forums, then mention that and provide links to your posts on other forums so people can see what others are suggesting and not duplicate efforts.
    Plus http://forums.adobe.com/message/6295752#6295752
    @No_name_123
    As I suggested elsewhere, I hope you will spend more time doing the code than explaining your requirements for fellow developers to do the code for you. I would avoid saying things like these:
    ... What I want to do display_count for each month....
    ... I would like to display another 'display_count' from the month of March...
    Instead, I would write some code, or even pseudocode, and then ask for suggestions on it.
    Message was edited by: BKBK

  • How to get data passed back to server from Web Start client ?

    dear experts,
    my web application allows users to launch a web start window from the jsp page, after users enters some data in the web start page and press "OK", the data entered should be passed back server for process. i just have not much clue how to do this....
    thanks.

    Use the java networking library to send a request to a url that takes the arguments you want to pass in.
    Example:
    URL url = new URL("http://yourserver/yourhandler.do?arg1=foo&arg2=bar");
    HttpURLConnection conn = (HttpURLConnection) URL.openConnection(url);
    ... any output testing, etc...
    conn.disconnect();It's not the prettiest, but it ought to get the job done.
    You should probably (at least) use the BasicService to get the codebase back to the server that served up the jnlp file.
    -Mike

  • In an alv report how to get data in next and previous pages.

    in my alv report i require the output such that
    when i will press the next button in the application tool bar the alv report will be displayed for the next inventory document number in the next page. like wise previous
    would anybody please help me out.
    thanks and regards
    papps

    In your servlet you could set the arraylist into the HttpRequest object so that it is visible in the JSP you are forwarding to.
    RegistrationDAO rdao=new RegistrationDAO();
    ArrayList arr1=rdao.getsearchresults(af);
    request.setAttribute("someArrayList",arr1);Then in the JSP you could use JSTL 1.1 and jsp:useBean tag to access the ArrayList like this
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <jsp:useBean id="someArrayList" class="java.util.ArrayList" scope="request"/>
      <c:forEach var="currentRecord" items="${someArrayList}">
        Some property of the AddressForm object: ${currentRecord.propertyName} <br/>
        Another property of the AddessForm object : ${currentRecord.someOtherPropertyName} <br/>
        <hr/> 
      </c:forEach>I guess you are using struts, so instead of JSTL there might be some struts tags that do the same as above JSTL tags. You can research further on that.
    If you can't use struts tags or JSTL tags then you could write it with JSP scriptlets (highly discouraged option).

  • Why so much code getting data out of DB & into web services

    I am new to Java and I am experimenting with web services.
    I am trying to get data out of a database and into a web service
    This is the code I had to build just to get a little bit of data out of a DB and into a web service.
    // Open a database connection and statement.
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
    Statement statement = dbConn.createStatement();
    // Build the message.
    SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
    try {
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement elem =
    body.addBodyElement(env.createName("ns1:getEmployees"));
    elem.addNamespaceDeclaration("ns1",
    "http://www.abc.com/SampleApplication/Employee.wsdl");
    elem.addNamespaceDeclaration("ns2",
    "http://www.abc.com/SampleApplication/Employee.xsd");
    SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
    // Execute the query.
    String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
    ResultSet result = statement.executeQuery(sql);
    Isn't there a way with less code to get data out and stick into a web service?

    I left the part of the code out that is bugging me - I was talking about all of the code to get the data into XML..
    here's the whole code..
    // Open a database connection and statement.
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    Connection dbConn = DriverManager.getConnection("jdbc:db2:sample","myuser","mypass");
    Statement statement = dbConn.createStatement();
    // Build the message.
    SOAPMessageContext ctx = (SOAPMessageContext) messageContext;
    try {
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement elem =
    body.addBodyElement(env.createName("ns1:getEmployees"));
    elem.addNamespaceDeclaration("ns1",
    "http://www.abc.com/SampleApplication/Employee.wsdl");
    elem.addNamespaceDeclaration("ns2",
    "http://www.abc.com/SampleApplication/Employee.xsd");
    SOAPElement elem1 = new SOAPElementImpl("Response", null, null);
    // Execute the query.
    String sql = "SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, HIREDATE FROM EMPLOYEE";
    ResultSet result = statement.executeQuery(sql);
    SOAPElement employee = new SOAPElementImpl("Employees", "ns2", "http://www.abc.com/SampleApplication/Employee.xsd");
    employee.addChildElement("ns2:EMPNO").addTextNode(result.getString("EMPNO"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("FIRSTNME"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("MIDINIT"));
    employee.addChildElement("ns2:LASTNAME").addTextNode(result.getString("LASTNAME"));
    employee.addChildElement("ns2:FIRSTNME").addTextNode(result.getString("HIREDATE"));
    elem1.addChildElement(employee);
    elem.addChildElement(elem1);
    ctx.setMessage(m);
    dbConn.close();
    } catch (Throwable e) {
    weblogic.utils.Debug.say("(hbs):e " + e);
    e.printStackTrace(System.out);
    putting the data in the node seems excessive to me.
    thanks
    AP

  • Need to get data for month entered in  user prompt to prior 12months.

    Hi,
    I have a report where i need to display total amount for current month  to prior  12 months data...first column will be current month, second column is (current month-1),3rd col: (current month-2)....( current month-12).
    Is there any way I could use current date to get previous 12 months in  variables?
    For example: if  current date is 02/15/2010, I need get  data for 01/2010, 12/2009, 11/2009,....01/2009.
    For example: if I entered Month: 03  and year:2010 in prompt , then I need to get data for prior 12 months to that in the prompt for month:03?.

    The only way to do this is using restrictions on Universe... here you can have the restrictions for every month or a range using the user prompt and the system date.
    Regards

  • Date function Retirement in due next 8 month

    Dear I am developing report and developed all query,
    Infact i want to display all employee records who has only 8 month remain to retirement age (AFTER 60 YEAR EMPLOYEE WILL BE RETIRE).
    Please guide me how can i do this
    Please find query :
    SELECT DISTINCT DECODE (SUBSTR (hou.NAME, 1, 1),
    'C', 'Central Region',
    'M', 'Mehran Region',
    'H', 'Head Office',
    'L', 'Head Office',
    'N', 'Northern Region',
    'S', 'Southern Region'
    ) regions,ppt.USER_PERSON_TYPE,st.USER_STATUS,
    hou.NAME branch, ppd.segment2 department, pgd.segment2 grade,
    pf.PERSON_TYPE_ID ,pf.employee_number emp_num, pf.full_name emp_name,
    pf.date_of_birth dob, pf.sex,
    ppd.segment1 designation,
    pgd.segment2 grade2, hla.location_code LOCATION,
    pps.date_start joining_date,
    TRUNC(months_between(substr (sysdate,1,10),add_months(pf.date_of_birth,720))) RETITEMENT_NEXT_MONTH,sysdate,
    round (months_between( sysdate,pf.date_of_birth)) months_between_all,
    substr (sysdate,1,10) s
    FROM hr_organization_units hou,
    per_people_f pf,
    per_person_types ppt,
    per_all_positions pap,
    hr_locations_all hla,
    per_position_definitions ppd,
    per_all_assignments_f paaf,
    per_assignment_status_types st,
    per_grade_definitions pgd,
    per_periods_of_service_v pps
    WHERE pap.position_definition_id = ppd.position_definition_id --(+)
    AND pap.position_id = paaf.position_id
    and paaf.ASSIGNMENT_STATUS_TYPE_ID = st.ASSIGNMENT_STATUS_TYPE_ID
    and pf.PERSON_TYPE_ID = ppt.PERSON_TYPE_ID
    AND hla.location_id = pap.location_id
    AND paaf.primary_flag = 'Y'
    AND paaf.position_id IS NOT NULL
    AND pps.final_process_date IS NULL
    and st.USER_STATUS NOT like '%Resigned%'
    AND pf.person_type_id IN (6, 7, 1118)
    AND paaf.employment_category ='PERMANENT'
    AND hou.organization_id = paaf.organization_id
    AND pf.person_id = paaf.person_id
    AND paaf.grade_id = pgd.grade_definition_id
    AND paaf.effective_end_date > SYSDATE
    AND pf.person_id = pps.person_id
    --and round (months_between( sysdate,pf.date_of_birth)) <= 6
    AND DECODE (SUBSTR (ppd.segment3, 1, 1),
    'C', 'Central Region',
    'M', 'Mehran Region',
    'N', 'Northern Region',
    'S', 'Southern Region',
    'H', 'Head Office'
    ) LIKE :p_region
    AND hou.NAME LIKE NVL (:p_branch, '%')
    AND pgd.segment2 LIKE NVL (:p_grade, '%')
    AND ppd.segment2 LIKE NVL (:p_department, '%')
    AND hla.location_code LIKE NVL (:p_location, '%')
    AND ppd.segment1 LIKE NVL (:p_designation, '%')
    AND TO_CHAR (paaf.effective_start_date, 'YYYY/MM/DD') <= SUBSTR (:p_date, 1, 10)
    Regards
    Edited by: Shahid on Dec 31, 2011 4:02 AM

    Hi,
    Shahid wrote:
    Dear I am developing report and developed all query,
    Infact i want to display all employee records who has only 8 month remain to retirement age (AFTER 60 YEAR EMPLOYEE WILL BE RETIRE)So the retirement date will be
    ADD_MONTHS ( pf.date_of_birth
               , 720     -- 720 = 60 * 12
               )and if the person is due to retire within the next 8 months (that is, if the retirement date falls between now and 8 months later than now), then the following condition will be true:
    pf.date_of_birth  BETWEEN  ADD_MONTHS (SYSDATE, -720)     -- 720 =  12 * -60
                AND        ADD_MONTHS (SYSDATE, -712)     -- 712 = (12 * -60) + 8
    Please find query :
    substr (sysdate,1,10) s ...The first argument to SUBSTR is supposed to be a VARCHAR2. Don't use a DATE (such as SYSDATE) where a VARCHAR2 is expected. Whatever you're trying to do here, I'll bet you can do it just as easily, more efficiently, and more reliably without using SUBSTR or VARCHAR2s.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.

  • Get date from portal in a web dynpro?

    hi all,
    how get date from portal in a web dynpro???
    thanks.

    new Date(System.getTimeInMillis());
    Good luck, Roelof

  • To get first date and end date after entering any month and year

    Hi,
    I need to to get first date and end date of a month and year in yyyyMMdd format. I am reading month and year from a properties file. But I don't know how to get the first date and End date in given format. The properties file gives me just text. But I don't know how to get the date format using this. I need this urgently. Can anyone help me to get code for this?
    I am reading the fields as,
    Properties props = new Properties();
    props.load(new FileInputStream("AnyMonthVolume.properties"));
    String date_month = props.getProperty("date_month");
    String date_year = props.getProperty("date_year");
    Thanks.

    I know this has been posted a while ago but incase someone looking for it, here is the code to get the end of current month date.
    Calendar cal = Calendar.getInstance();
         cal.setTime(new java.util.Date());
         cal.set(Calendar.DATE, 1); //set the date to start of month
         cal.add(Calendar.MONTH,1);
         cal.add(Calendar.DATE,-1);
    System.out.println(cal.getTime());

  • Re; Getting data from a live web site, based on geo-location.

    re; Getting data from a live web site, based on geo-location.
    Approx 4 minutes 25 seconds into this YouTube Adobe ELearning video for Common JavaScript Interface in Adobe Captivate 8, the topic of extracting data from a live web site http://api.openweathermap.org
    Is there anywhere we can download this Adobe Captivate weather ticker project? or get some more complete tutorial on setting it up?  I tried to copy some of the code shown in the video, but can't get it to work, so I suspect I'm missing something somewhere.
    I would like to try it out.
    Video Here:   https://www.youtube.com/watch?v=u1ZfG47k24k

    Could windows Firewall be stopping this geo-location weather ticker app from working? When I start Captivate 8, I get the message indicating the the firewall is blocking some features of the program. When I check the geo var it seems empty.
    Name: AdobeCaptivateWS
    It then refers to some temp folder such as
    Path: C:\users\{username}\appdata\local\temp\cp3320604394session\cptrustfolder3320604659\adobec aptivatews
    Network Location: Public, private, domain networks
    etc...

  • Unable to email a document.  Keep getting error message:  Invalid Date Enter 2-digit month

    Unable to email a document.  Keep getting error message:  Invalid Date Enter 2-digit month
    Does not happen with all forms which emante from same USG webpage
    Any adivice?

    If i am using 11G andrtp is 11g but on rtp side if they configure SSL, is it mandatory to do it from our side also?No it not mandatory to enable SSL at your end however you have to configure identity and trsut at your end.
    Any update on my regular question(The main forum question)?You mentioned that you are posting message from 10g to 11g and as per log you are sending it to URL - https://dev-nog.server:443/b2b/transportServlet
    So few things which I see as a problem are-
    1. You should use URL https://hostname:soa_server_ssl_port/b2b/httpReceiver instead of https://dev-nog.server:443/b2b/transportServlet
    2. SOA server SSL port should be enabled (SSL should be enabled on SOA server)
    3. You should configure wallet at 10g side to contain trust cert of 11g server
    Regards,
    Anuj

  • Anyone help me ...I am writing to get Date, Month and Year...I got errors

    Could some body help me:
    I am try to get Date, Month and Year
    I got stuck, Anyone help me this:
    public class DateMonth
    public static void main(String[] args)
    toDay = new toDay("February 21, 2002");
    dayofWeek = today.getDay();
    System.out.println("Current month is " + toDay.getMonth());
    System.out.println("Current day is " + getDate());
    System.out.println("Current year is " + toDay.getYear());
    toDay.setDate(toDay.getDate()+60)
    System.out.println("Sixty days from now is ");
    System.out.println(toDay);
    }

    Try something like this:
    import java.util.*;
    public class DateMonth {
         public static void main(String[] args) {
              // Note: 0 = January
              Calendar calendar = new GregorianCalendar();
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
              System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
              System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
              System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
              // 60 days from now
              calendar.add(calendar.DATE, 60);
              System.out.println("\nSixty days from now");
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
    }Remember that January is 0!
    Take a look at the GregorianCalendar class:
    http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html
    Hope this helps!
    DesQuite

  • Oracle Web Forms - need a method to get data from a Form to Excel

    I am running Oracle Forms 6i for the web.
    I need a way of using the old DDE or OLE implmentation to get
    data to an Excel spreadsheet. Ideally opening an existing
    spreadsheet and inserting new data.
    Anyone been able to do this ?
    Thanks in advance
    Dave.

    If you have EXcel on your application server (the one where forms
    is), you can still use OLE2 calls to create or modify the excel
    sheet on the server. Then you can use web.show_document to get
    the excel file back to the client machine.

Maybe you are looking for

  • Teamwork still a factor?

    I just wondered through how much hassle and flaming some Java students are willing to suffer just to get an answer to problems like recursive method creations. It especially makes me wonder because if I don't know something, I ask my pals or my co-wo

  • Formatting error in table footer in smartform

    hi in the footer of table in smartform currency field vbrp-cmpre and quantity field vbrp-fkimg  are cuming with leading spaces as follows:                     32.000 copies @ Rs.                       7.00= 2.24 this should come as : 32 copies @ Rs.

  • What are the specifics of the Facebook malware reported in NYT of August 26, 2013 Bits column?

    Here is a link to the article: http://bits.blogs.nytimes.com/2013/08/26/malicious-software-poses-as-video-from-a-facebook-friend/?nl=todaysheadlines&emc=edit_th_20130827 According to this, Firefox can be infected and typical virus/malware programs ar

  • How to show cfm, html, js, css, and browser tab in coldfusion builder 3?

    On Coldfusion Builder 2, I see these tabs are available when I create a new page, but not on Coldfusion Builder 3. What should I do to show them on CFB 3?

  • Conversion rate between AUD5 and USD not found

    Hi, In a classic scenario, I created a shopping card. And created P.O at the back end. And trying to do the Confirmation of goods. I am seeing this error. "Conversion rate between AUD5 and USD not found " I check the Organization unit Currency its US