Using date parameters entered by user within Chart

I would like to allow the end user to populate a start date and end date which will be used to generate a Pie Chart. I have been following posting How to Create a Chart from a user's date range input ? and I'm having problems.
I have created two Page Items to allow the user to enter a date range. Both Page Items are set to Date Picker ('DD-MON-RR') The start date has a default value set to the first day of the year by using round(SYSDATE, 'YYYY') The end date defaults to SYSDATE.
The flash chart series is defined as the following:
select null link, trunc((months_between(sysdate, c.DATE_OF_BIRTH))/12) label, count(*) value1
from FAMILY_INTAKE f
, CLIENT c
where f.client_id = c.client_id
AND f.intake_date between nvl(:P19_START_DATE, f.intake_date) AND nvl(:P19_END_DATE, f.intake_date)
group by trunc((months_between(sysdate, c.DATE_OF_BIRTH))/12)
When I run the page, the pie chart works; however, it does not seem to use the values used in the date parameters. It seems to be using the null value of f.intake_date. No matter what I set the date parameters to, the results are always the same.
Any help would be appreciated... Thanks!
Pam

How does one operate the page? Select one or two date values and press Go, or something? Then the page branches back to itself? If so, are the date items showing the selected values or getting reset?
Scott

Similar Messages

  • Error when using Date Parameters...

    Hi everybody,
    I have a little issue.
    Ever since I upgraded my CRXI R2 to SP4 I've had a little problem using date parameters.
    The little calendar icon next to the parameter field no longer works.
    When I click it I get the following error message:
    An error has occurred in the script on this page.
    Line:       79
    Char:      1
    Error:      Object Expected
    Code:      0
    URL:       file://C:\Documents and Settings\jlong\Local Settings\Temp\prompting1.html
    I'm thinking this is probable a quick registry fix, but I have no idea where to start looking.
    Hopefully one of you CR guru's knows the answer.
    Thanks in advance,
    Jason

    It seems you are having a scripting issue.
    Go onto the Internet explorer settings (internet options under control panel)
    click on security and then click on Internet and then Custom tab.
    Scroll right down where it says Scripting and enable it.
    That should resolve the issue.
    Here is the full list of browsers with scripting options:
    Windows Internet Explorer
    (all versions except Pocket Internet Explorer)
    Note To allow scripting on this Web site only, and to leave scripting disabled in the Internet zone, add this Web site to the Trusted sites zone.
    1. On the Tools menu, click Internet Options, and then click the Security tab
    2. Click the Internet zone.
    3. If you do not have to customize your Internet security settings, click Default Level. Then do step 4
    If you have to customize your Internet security settings, follow these steps:
    a. Click Custom Level
    b. In the Security Settings u2013 Internet Zone dialog box, click Enable for Active Scripting in the Scripting section.
    4. Click the Back button to return to the previous page, and then click the Refresh button to run scripts.
    ===========
    Mozilla Corporationu2019s Firefox version 2
    1. On the Tools menu, click Options.
    2. On the Content tab, click to select the Enable JavaScript check box.
    3. Click the Go back one page button to return to the previous page, and then click the Reload current page button to run scripts.
    ===========
    Opera Softwareu2019s Opera version 9
    1. On the Tools menu, click Preferences.
    2. On the Advanced tab, click Content.
    3. Click to select the Enable JavaScript check box, and then click OK.
    4. Click the Back button to return to the previous page, and then click the Reload button to run scripts.
    ===========
    Netscape browsers
    1. Select Edit, Preferences,Advanced
    2. Click to select Enable JavaScript option
    Hope this helps.
    Regards
    Jehanzeb
    Edited by: Jehanzeb Navid on Jul 28, 2008 4:38 PM
    Ok I think I got this totally wrong. this isn't what you are looking for.
    Sorry!!! can't delete this reply arggghh!!!
    Edited by: Jehanzeb Navid on Jul 28, 2008 4:40 PM
    Maybe this might help?
    Remove Web Customization
    If multiple folders are causing the script error, remove Web customization from any folder that generates the error message.
    To remove customization from a folder, use the following steps:
    1. Open the appropriate folder.
    2. On the View menu, click Customize This Folder, click Remove Customization, click Next, and then click Finish.
    3. Close the folder.

  • BEX query runs using parameters entered by user in an Excel spreadsheet

    I'm trying to write a macro to automate certain functions for our users.</br>
    </br>
    Essentially, the users would enter numbers (relating to clients) in column A and e-mail adresses in column B.  A set of reports would run based on the first number entered, then the workbook would be saved and e-mailed to the first address in column B.  This would be repeated for the 2nd number/address and so on...  All Bex reports are in the same workbook.  At this point, I'm having a lot of problems finding code that will fill in the Bex query parameters automatically based on inputs in the spreadsheet.  Here is what I've worked up so far for the macro:</br>
    </br>
    Option Explicit</br>
    </br>
    'Macro step 1 u2013 run workbook for client number input and continue</br>
    'EXAMPLE u2013 cell A3 = 1008, cell A4 = 1240</br>
    'All BW queries should run based on the input given in column A (beginning wth A3).</br>
    </br>
    </br>
    'Macro step 2 u2013 create directory for the new files and save the first file</br>
    '     This step will allow the user to save the new files in a new folder in an existing directory, or even to create a new directory:</br>
    </br>
    Function GetFolderPath() As String</br>
        Dim oShell As Object</br>
        Set oShell = CreateObject("Shell.Application"). _</br>
        BrowseForFolder(0, "Please select folder", 0, "c:
    ")</br>
        If Not oShell Is Nothing Then</br>
            GetFolderPath = oShell.Items.Item.Path</br>
        Else</br>
            GetFolderPath = vbNullString</br>
        End If</br>
        Set oShell = Nothing</br>
    End Function</br>
    </br>
    Sub Testxl()</br>
        Dim FName As String</br>
        Dim WbName As String</br>
        Dim Search As String</br>
        Dim Prompt As String</br>
        Dim Title As String</br>
        Dim MyDir1 As String</br>
        Dim MyDir2 As String</br>
        Dim Passed As Long</br>
         </br>
    On Error GoTo Err:</br>
         </br>
        FName = GetFolderPath</br>
        If FName <> vbNullString Then</br>
            Prompt = "Please Select a FileName"</br>
            Title = "Name"</br>
            Search = InputBox(Prompt, Title)</br>
            If Search = "" Then Exit Sub</br>
        End If</br>
        FName = FName & "\" & Search</br>
        MkDir FName</br>
        ActiveWorkbook.SaveAs FName & "\" & Search & ".xls"</br>
         </br>
         'Test for existence of new folders.files</br>
        Passed = 1</br>
        GetAttr (FName)</br>
        Passed = 2</br>
        GetAttr (FName & "\" & Search & ".xls")</br>
        Passed = 3</br>
        GetAttr (ActiveWorkbook.Path & MyDir1)</br>
        Passed = 4</br>
        GetAttr (ActiveWorkbook.Path & MyDir2)</br>
    </br>
        End</br>
         'Sheets("Sheet1").Range("B1").Value = Search **Add if you require the name to be recorded in your spreadsheet</br>
    Err:</br>
        Select Case Err</br>
        Case 53:           MsgBox "File/Folder not created. Failed at step " & Passed</br>
        Case 75:    MsgBox "Folder already exists"</br>
        End Select</br>
    End Sub</br>
    </br>
    'Macro step 3 u2013 save workbook</br>
    ActiveWorkbook.Save</br>
    </br>
    'Macro step 4 u2013 e-mail workbook</br>
    'EXAMPLE u2013 cell B3 = amay@email, cell B4 = bmay@email</br>
    'The workbook should e-mail based on the input given in column B (beginning wth B3).</br>
    wb.SendMail  u201Ccell B3u201D</br>
    </br>
    'Macro step 5 u2013repeat until no inputs remain</br>
    'EXAMPLE u2013 cell A3 = 1008, cell A4 = 1240</br>
    'Steps 1-4 should repeat for cell A4, then A5 (if necessary) and so on until no more inputs remain.  </br>
    </br>
    </br>
    If anyone has any advice I'd love to try it out.</br>
    </br>
    Thank you for your time.</br>
    Andy
    Edited by: AndyMay on Jul 14, 2009 5:08 PM - I inserted html breaks

    Option Explicit</br>
    </br>
    Sub KeyClient()</br>
    </br>
    'Macro step 1 - filter workbook for client number input and continue</br>
    'EXAMPLE - cell B3 = 1008, cell B4 = 2048</br>
    'All BW queries should run based on the input given in column B (beginning wth B3).</br>
    </br>
    'define x and begin loop</br>
    Dim i, x As Integer</br>
    Dim curCell As Range</br>
        For x = 3 To 22</br>
        Set curCell = Worksheets("Input").Cells(x, 2)</br>
    </br>
    'stop BW from refreshing until we are finished</br>
        Run "SAPBEX.XLA!SAPBEXPauseOn"</br>
        Run "SAPBEx.XLA!SAPBEXsetFilterValue", curCell, "", Sheets("Client Contribution").Range("C9")</br>
    'BW resumes refreshing</br>
        Run "SAPBEX.XLA!SAPBEXPauseOff"</br>

  • Using data tab causes SD users to be black-listed! Why is this happening?

    Several SQL Developer users in our workgroup were recently black-listed by our IT department for submitting queries that ran for hours against large tables. Many of these users emphatically stated that they had not submitted ANY queries. Finally someone theorized that clicking on the data tab to view a few rows of data may be causing SD to to submit a SELECT * query to Oracle. Yikes! There are now hundreds of users out there using SD with more coming on board every week across the enterprise. Can such an innocuous action of clicking on a tab actually be causing this problem and if so how can we globally prevent SD from doing this?

    >
    If what folks on this forum are saying is true, that unbeknownst to the user, clicking on the data tab is, in the background, submitting a SELECT * FROM for the entire table, then the SD software should be smart enough and courteous enough to give the user a warning and choice to continue or limit the number of rows delevered! No ifs, ands, or buts about it.
    >
    The number of rows actually fetched each time from the server uses the 'Sql Array Fetch Size' preference setting. This setting is '50' by default. You access it by 'Tools -> Preferences -> Database -> Advanced.
    The user can choose to scroll through as many rows as desired. If the user performs no scrolling beyond the 50 rows then no more rows will be fetched.
    >
    That is precisely what SQL Developer should do out of the box!
    >
    And that IS what SQL Develper does 'out of the box'.
    >
    Several SQL Developer users in our workgroup were recently black-listed by our IT department for submitting queries that ran for hours against large tables. Many of these users emphatically stated that they had not submitted ANY queries. Finally someone theorized that clicking on the data tab to view a few rows of data may be causing SD to to submit a SELECT * query to Oracle
    >
    A 'SELECT * FROM myTable' query will NOT run for hours. That query will almost always perform a full table scan of the table since rarely will any index contain ALL of the columns of the table including NULL columns (null columns are not indexed by heap indexes; only by bitmap indexes).
    A full table scan (without an ORDER BY to sort the data) simply reads every block of the table. That reading will not prevent any other user/session from doing whatever DML they need to run.
    A user can elect to SORT the data and in that case Oracle will have to sort the ENTIRE table BEFORE it can return any data to the user. A sort can definitely use a lot of resources in the background and can definitely interfere with other users/sessions that need those resources.
    But the SORT issue will apply to ANY tool being used including 'SQL Assistant'. No tool exists that can feed 20 sorted rows to the user BEFORE the data has been sorted. And no tool exists that can exert ANY control over the Oracle sort process. The tool will NOT get any data until the sort is 100% complete.
    Always make sure you are comparing the same use cases when you make comparisons like that.
    1. Basic use of sql developer by selecting a data tab WILL issue a SELECT * FROM . . . query to the backed
    2. If the filter options have NOT been modified to include sorting the query will execute very quickly and fetch the first 50 rows. Additional rows will ONLY be fetched if the user asks for them.
    3. A pure SELECT * FROM query will NOT run for hours on the backend.
    4. ANY tool that issues a SELECT * FROM . . . ORDER BY query will cause Oracle to perform a full table scan.
    5. The likely cause of what appears to be a simple SELECT * FROM query is usually a user that selects the data tab and then goes home for the weekend leaving their machine on. That query will remain the the library cache and the session will remain but there will be no real activity or resources being used.
    If you have ANY evidence that contradicts any of the above please post the specifics.
    As previously mentioned by another responder the user CAN perform

  • Display the date parameters entered in page title

    How to use process to display the date paramaters selected by the user to generate the report in Page title ?
    Sanjay

    user12957777 wrote:
    How to use process to display the date paramaters selected by the user to generate the report in Page title ?Include the parameter item values in the Page Title attribute as substitution strings, for example:
    Sales Figures &P1_FROM_DATE. to &P1_TO_DATE.

  • Using data source to update user defaults

    I have a default entry in my user defaults that is a list. Each item of the list is a list of records. I use the following code to delete an entry.
    on deletePlaylist()
    set tableView to table view "Playlist" of scroll view "Playlist" of window "Schedule Window"
    set selectedDataRows to selected data rows of tableView
    if (count of selectedDataRows) > 0 then
    delete (item 1 of selectedDataRows)
    set contents of default entry "specialList" of user defaults to contents of data source "Specials"
    register
    end if
    end deletePlaylist
    This code seems to work; when I open my plist the entry looks just as it should. The problem is that the next time I open my program, I get a 1728 error when I try to read that default entry.

    I'm not using pipes anyplace in my program.
    I'm reading my user defaults like this
    set theList to contents of default entry "specialList" of user defaults
    tell data source "Specials"
    set update views to false
    delete every data row
    repeat with a from 1 to length of theList
    set theRow to make new data row at end of data rows
    tell theRow
    set contents of data cell "thisDay" to thisDay of item a of theList
    set contents of data cell "thisTime" to thisTime of item a of theList
    set contents of data cell "thisFinalPlay" to thisFinalPlay of item a of theList
    set contents of data cell "thisPlaylist" to thisPlaylist of item a of theList
    end tell
    end repeat
    set update views to true
    end tell
    I'm writing my user defaults like this in my delete routine.
    delete (item 1 of selectedDataRows)
    set theList to content of data source "Specials" --I think this is the problem line
    set contents of default entry "specialList" of user defaults to theList
    When I open my plist in Property List editor, the pipes do not show. The entries are identical to those in the plist before it is screwed up. I think that when my program asks for user default thisList it is actually finding |thsList|. Does that make sense?
    When I add to the data source, I make the changes to theList and then rebuild the data source and write theList to user defaults. This works fine.
    If I could get the line number of the selected data row in the table view, I could use that index to delete the appropriate item from theList and then write theList directly to user defaults like I do when I add to the data source.

  • Grant permission through dynamic parameters entered by user through web app

    This is my code.
    f1=request.getParameter("URL");
    out.println("parameter f1 ===>"+f1);//user name
    f2=request.getParameter("URL1");
    out.println("parameter f2 ===>"+f2);//table name
    f3=request.getParameter("URL2");
    out.println("parameter f3 ===>"+f3);//privilege name
    sql="GRANT f3 to \"" + f1 + "\""+"on \""+f2+"\"";
    st= con.createStatement();
    st.execute(sql);
    out.println("grant succeeded");
    it is giving error that invalid SQL query.please help in writing this code.Any other method for giving dynamic SQL query for granting permission.

    Welcome to the forum!
    >
    Any other method for giving dynamic SQL query for granting permission.
    >
    You should NOT be using dynamic SQL for issuing grants. Security is something that should be taken seriously and grants should ONLY be given to users that need the permission. The necessary grants should be created and reviewed BEFORE they are executed.
    Best practices are to create scripts containing your DDL and place those scripts in a version control system.
    The scripts can then be executed in sql*plus, sql developer or another tool and the results reviewed to ensure that they executed properly.
    If dynamic SQL is needed you:
    1. create a sql statement manually and test it to make sure it works properly
    2. create the code to assemble similar statements and VIEW the output DDL to make sure that it is valid
    3. add exception handling and security handling to the code so that is can only be used for the intended operations and is not subject to SQL injection.
    4. manually execute the DDL produced by the code to make sure there are no syntax errors.
    Clearly you did not even test your SQL before trying to write code to produce it or you would have known your syntax is invalid.
    >
    sql="GRANT f3 to \"" + f1 + "\""+"on \""f2"\"";
    >
    >
    it is giving error that invalid SQL query.
    >
    Of course it is. That code might try to produce the equivalent of:
    GRANT select to "scott" on "hr.employees";There are SEVERAL errors in that code.
    1. You are enclosing the SCHEMA in double-quotes. That means the actual user name will be treated as case-sensitive. So if someone provides 'scott' it will be considered lower-case. There is NO user "scott" in Oracle unless you created that user yourself and used double-qoutes to preserve the case.
    ALL of the schemas created by Oracle, and most users, are UPPER case. So your code will not find any name if the user supplies a LOWER case or mixed-case value.
    2. You are enclosing the target schema and object name in double quotes. There are two things wrong. The same case issue applies again. And the string "hr.employees" will be treated as ONE value. The proper way to quote such a value is:
    "HR"."EMPLOYEES"3. You have the DDL components in the wrong order, hence it is invalid. The ON clause comes BEFORE the target schema.
    GRANT select to on hr.employees to scott;See the SQL Language doc for the GRANT statement
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9013.htm
    All of the issues you have demonstrate why you should NOT be using dynamic SQL to do DDL. You don't understand the syntax so you can't write code to implement that syntax.
    The syntax is much more complex than the siimple code you are trying to use.
    Grant statements often need to include "SCHEMA.OBJECT" syntax and your code makes no provision for that.
    DDL needs to be tightly controlled and doing it in code can create huge, gaping security holes.
    Abandon your method and use prepared scripts for the DDL commands you need to execute.

  • CUP - Using several Parameters ID in User Default

    Hello everybody,
    I have a problem with using User Default section in CUP.
    In fact I want to use the User Default Mapping to define two different parameter ID in the SU01.
    For example: the Company Code (BUK parameter) and the Cost Center (KOS parameter).
    If I define two different User Default (one for the company code and the other for the cost center) with two different User Default Mapping Condition (Custom fields Company code with the good value for the first one and cost center custom fields for the second one) it doesn't works.
    It seems to use only one User Default even if the both User Default Mapping Conditions are different.
    Does anyone know how to define two different User Defaults that works together?
    Thanks in advance.
    BMW

    BEN,
       I have never tried this scenario. It seems to me that this might not work.
    Regards,
    Alpesh

  • Date Parameters in Data Templates..

    Mornin all..
    How are you using date parameters in your Data templates..?
    I'm trying to run a Conc Program that has a date parameter. in ORACLE Con Program the value set is setup to retrieve the format dd-MON-yyyy.
    I also have this format specified in the Data Template..
    <parameter name="p_paydate_from" dataType="character" />
    <parameter name="p_paydate_to" dataType="character" /> ..and then again in the SELECT statement..
    <![CDATA[
    SELECT DISTINCT.......
    TO_CHAR(ip.creation_date, 'dd-MON-yyyy') Paid_Date, sfc.faculty_code Faculty, etc..
    FROM
    WHERE
    AND TRUNC(ip.creation_date) BETWEEN NVL(:p_paydate_from, '01-JAN-1999') AND NVL(:p_paydate_to, '31-DEC-2299')...
    ]]>..yet when I run the report it just ignores the data parameter and returns all records..
    I know that if that this was done in ORACLE Reports I'd have to place this in AfterPFormTrigger..
    IF :p_paydate_from is not null then
    :lp_paydate_from := 'and ip.accounting_date >= to_date(:p_paydate_from, ''YYYY/MM/DD HH24:MI:SS'')' ;
      ELSE      :lp_paydate_from := '';
      END IF;
        IF :p_paydate_to is not null then
              :lp_paydate_to := 'and ip.accounting_date <= to_date(:p_paydate_to, ''YYYY/MM/DD HH24:MI:SS'')' ;
      ELSE       :lp_paydate_to := '';
      END IF; Question is - do I have to create a trigger and put it into my data template or am I working the date parameter wrongly..? How do you use date parameters in your Data templates..?
    Many thanks for Looking..
    Steven
    Edited by: JackyWhite on May 14, 2010 12:20 PM

    Thanks for the comments.
    I am able to return records when using the code in the SELECT statement via TOAD.
    I've tried specifying dates in the parameter section but it was just the same error.
    The error message given when I include these date parameters when in run the Conc Program is..
    [051410_022803764][][STATEMENT] 8: p_paydate_from:2010/01/01 00:00:00
    [051410_022803764][][STATEMENT] 9: p_paydate_to:2010/01/21 00:00:00
    --SQLException
    java.sql.SQLException: ORA-01861: literal does not match format string
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)I know what the problem is, I just done know how to fix it. I'll try to explain. In ORACLE reports
    In the Conc Program (running the report) The date can be entered in the format 'DD-MON-YYYY'
    In the Report Oracle sends this date to the report in the format 'YYYY/MM/DD HH24:MI:SS'. To accept this date in the report the easiest method is to.....
    1. Create the date parameter as a varchar(20) instead of a date type
    2. In the After Parameter Trigger convert the date either into a local variable or into a lexical variable (used in the SQL query) by using the code
             to_date(:p_date_parameter_name, '''YYYY/MM/DD HH24:MI:SS'')
         srw.message(10, 'P Date from ' ||:p_date_from);
          if :p_paydate_from is not null then
              :Lp_paydate_from := 'and trunc(...............) >= to_date(:p_paydate_from,''YYYY/MM/DD HH24:MI:SS'')';
           :disp_date_from := to_char(to_date(:p_paydate_from,'YYYY/MM/DD HH24:MI:SS'),'DD-MON-YYYY');
              srw.message(10, 'LP Date from ' ||:lp_paydate_from);
          end if; etc etc etc..      end if;I know that if I can convert it somewhere somehow using that 'to_date(:p_paydate_from,...' thing then I reckon it should work..
    I'm currently trying to figure out (a tad rusty at PLSQL now) how can I create an afterpform trigger to be called in the data template that does the above (basically just to convert the date format)..
    PLease tell me there is an easier way!
    Thanks!
    Steven

  • How to get useful data from request?

    Hello.
    I am looking for creating a management tool for a web site. All I want is that is there any ready to use API or package or open source project for retrieving user�s information? I just mean that is there any easy to use way in java to get useful data from a client (for example location, his or her system configuration and information �).
    Thanks.

    If you dump all the data from request (see the javadoc, and especially the "header methods" ) you'll see the data you can get are quite simple.
    The only thing you can try to rely on are ;
    - the IP address from the sender (when reversed to DNS, you can sometime use the tld to locate the country it comes from. Yet, you'll get many .com name, so it's not that significant. it may also give you the IAP used). Note that if the user is using a proxy, it's the proxy IP that you'll collect
    - the User-Agent header : from this, you can guess the OS and the browser used
    - the Referer header : usefull to get where your user comes from (where they found a link to your site)
    - the Cookie header : if you're using a servlet container with session id stored in cookie, you should see the Cookie header appear on the second request to your site. That helps finding out wether your user accep cookie or not (from a server point).
    Besides these, i don't think you can get any other useful data without asking your users on a form. Note that it's the client that decides to send Referer, User-Agent or Cookie headers. Those are not mandatory to the Http Protocole and some browser allow their user to fool their content (butmore than 90% of the widespread browsers don't)

  • Default date parameters with timestamps

    Hi everyone!
    I have an user request that I thought should be fairly simple, but I cannot quite get it working.
    We have a concurrent request with beginning and ending date parameters. The users have requested that these dates default to the beginning/end of the current day.
    For example:
    20-MAR-2009 00:00:00
    20-MAR-2009 23:59:59
    I thought this would be a simple sql statement, but Apps does not seem to agree.
    The parameters are of type FND_STANDARD_DATE.
    What we have tried:
    select to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01' p_beg_date
    , to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59' p_end_date
    from dual
    -- did not work, said looking for DATE format --
    select to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE
    , to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE
    from dual
    -- works for beg date, but not end date, both display time as 00:00:01 ( I believe i was having issues in TOAD trying to get it as 00:00:00) --
    Any ideas?
    Thanks!
    Janel
    (apologies for the double post - what exactly is the difference between the 2 EBS forums?!?!?)

    Your second code snippet is correct - it works in my instance :-)
    SQL> alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
    Session altered.
    SQL> select to_date(to_char(sysdate, 'DD-MON-YYYY') || '00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE,
      2  to_date(to_char(sysdate, 'DD-MON-YYYY') || '23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE from dual;
    P_BEG_DATE                 P_END_DATE
    20-MAR-2009 00:00:01       20-MAR-2009 23:59:59HTH
    Srini

  • Default date parameters

    Hi everyone!
    I have an user request that I thought should be fairly simple, but I cannot quite get it working.
    We have a concurrent request with beginning and ending date parameters. The users have requested that these dates default to the beginning/end of the current day.
    For example:
    20-MAR-2009 00:00:00
    20-MAR-2009 23:59:59
    I thought this would be a simple sql statement, but Apps does not seem to agree.
    The parameters are of type FND_STANDARD_DATE.
    What we have tried:
    select to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01' p_beg_date
    , to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59' p_end_date
    from dual
    -- did not work, said looking for DATE format --
    select to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE
    , to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE
    from dual
    -- works for beg date, but not end date, both display time as 00:00:01 ( I believe i was having issues in TOAD trying to get it as 00:00:00) --
    Any ideas?
    Thanks!
    Janel

    Thank you amox!!
    This gives me 3/20/2009 12:00:24 AM for p_beg_date and 3/20/2009 11:59:36 PM for p_end_date.
    Do you think there is anyway to get the seconds to be 00 for p_beg_date and 59 for p_end_date?
    Also, the concurrent program parameters are actually FND_STANDARD_DATETIME, not FND_STANDARD_DATE as I thought earlier.
    Thanks,
    Janel

  • Saving parameters entered in a gui dialog to be used in the main panel

    Hi,
    I'm having a nightmare at the moment.
    I've finished creating a program for my final year project, that is all comand line at the moment.
    i'm required to design a GUI for this. i've started already and have a main panel that has a few buttons one of which is a setParameters button. which opens up a file dialog that allows the user to enter parameters that will be used by the main panel later on.
    I'm having trouble imagining how these parameters will be accessed by the main Panel once they are saved.
    At the moment, without the GUI i have get and set methods in my main program which works fine. Is this the kind of thing i'll be using for this?
    my code for the parameters dialog
    public class Parameters  extends JDialog
         private GridLayout grid1, grid2, grid3;
         JButton ok, cancel;
            public Parameters()
                    setTitle( "Parameters" );
                    setSize( 400,500 );
                    setDefaultCloseOperation( DISPOSE_ON_CLOSE );
              grid1 = new GridLayout(7,2);
              grid2 = new GridLayout(1,2);
                    JPanel topPanel = new JPanel();
                    topPanel.setLayout(grid1);
              JPanel buttonPanel = new JPanel();
                    buttonPanel.setLayout(grid2);
              ok = new JButton("OK");
                  ok.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent e) {
                  //when pressed i want to save the parameters that the user has entered
              //and be able to access these in the RunPanel class
              cancel = new JButton("Cancel");
                 cancel.addActionListener(new ActionListener() {
                          public void actionPerformed(ActionEvent e) {
                        //when pressed just want the Jdialog  to close
              buttonPanel.add(ok);
              buttonPanel.add(cancel);
              JTextArea affinityThresholdScalar = new JTextArea();
              JTextArea clonalRate = new JTextArea();
              JTextArea stimulationValue = new JTextArea();
              JTextArea totalResources = new JTextArea();
              JLabel aTSLabel = new JLabel("affinityThresholdScalar");
              JLabel cRLabel = new JLabel("clonalRate");
              topPanel.add(aTSLabel);
              topPanel.add(affinityThresholdScalar);
              topPanel.add(cRLabel);
              topPanel.add(clonalRate);
                    Container container = getContentPane();//.add( topPanel );
              container.add( topPanel, BorderLayout.CENTER );
              container.add( buttonPanel, BorderLayout.SOUTH );
         }the main panel class is:
    public class RunPanel extends JPanel implements ActionListener
         JButton openButton, setParametersButton, saveButton;
         static private final String newline = "\n";
         JTextArea log;
             JFileChooser fc;
         Data d = new Data();
         Normalise rf = new Normalise();
         Parameters param = new Parameters();
        public RunPanel()
            super(new BorderLayout());
            log = new JTextArea(5,20);
            log.setMargin(new Insets(5,5,5,5));
            log.setEditable(false);
            JScrollPane logScrollPane = new JScrollPane(log);
            fc = new JFileChooser();
            openButton = new JButton("Open a File...")
            openButton.addActionListener(this);
         setParametersButton = new JButton("Set User Parameters");
            setParametersButton.addActionListener(this);
         saveButton = new JButton("save");
            saveButton.addActionListener(this);
            JPanel buttonPanel = new JPanel(); //use FlowLayout
            buttonPanel.add(openButton);
         buttonPanel.add(setParametersButton);
         JPanel savePanel = new JPanel();
         savePanel.add(saveButton);
            add(buttonPanel, BorderLayout.PAGE_START);
            add(logScrollPane, BorderLayout.CENTER);
         add(savePanel, BorderLayout.SOUTH);
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == openButton) {
                int returnVal = fc.showOpenDialog(RunPanel.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = fc.getSelectedFile();
                    log.append("Opening: " + file.getName() + "." + newline);
              Vector data = d.readFile(file);
              log.append("Reading file into Vector " +data+ "." + newline);
              Vector dataNormalised = rf.normalise(data);
             else {
                    log.append("Open command cancelled by user." + newline);
                log.setCaretPosition(log.getDocument().getLength());
         else if (e.getSource() == saveButton) {
                int returnVal = fc.showSaveDialog(RunPanel.this);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File file = fc.getSelectedFile();
                    log.append("Saving: " + file.getName() + "." + newline);
                } else {
                    log.append("Save command cancelled by user." + newline);
                log.setCaretPosition(log.getDocument().getLength());
         else
              if (e.getSource() == setParametersButton)
                    log.append("loser." + newline);
                          param.show();
        private static void createAndShowGUI() {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JDialog.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("AIRS");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new RunPanel();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }Can anybody offer any suggestions?
    Cheers

    What you need is my ParamDialog. I think it could be perfect for this sort of thing. There are a few references in it to some of my other classes namely
    StandardDialog. Which you can find by searching for other posts on this forum. But if you'd rather not find that you could just use JDialog instead
    WindowUtils.visualize() this is just a helper method for getting things visualized on the screen. You can just use setBounds and setVisible and you'll be fine.
    You are welcome to use and modify this code but please don't change the package or take credit for it as your own work.
    If you need to bring up a filedialog or a color chooser you will need to make some modifications. If you do this, would you mind posting that when you are done so that myself and others can use it? :)
    StandardDialog.java
    ================
    package tjacobs.ui;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    import java.awt.*;
    import java.util.HashMap;
    import java.util.Properties;
    /** Usage:
    * *      ParamDialog pd = new ParamDialog(new String[] {"A", "B", "C"});
    * pd.pack();
    * pd.setVisible(true);
    * Properties p = pd.getProperties();
    public class ParamDialog extends StandardDialog {
         public static final String SECRET = "(SECRET)";
         String[] fields;
         HashMap<String, JTextField> mValues = new HashMap<String, JTextField>();
         public ParamDialog(String[] fields) throws HeadlessException {
              this(null, fields);
         public ParamDialog(JFrame owner, String[] fields) {
              super(owner);
              setModal(true);
              this.fields = fields;
              JPanel main = new JPanel();
              main.setLayout(new GridLayout(fields.length, 1));
              for (int i = 0; i < fields.length; i++) {
                   JPanel con = new JPanel(new FlowLayout());
                   main.add(con);
                   JTextField tf;
                   if (fields.endsWith(SECRET)) {
                        con.add(new JLabel(fields[i].substring(0, fields[i].length() - SECRET.length())));
                        tf = new JPasswordField();
                   else {
                        con.add(new JLabel(fields[i]));
                        tf = new JTextField();
                   tf.setColumns(12);
                   con.add(tf);
                   mValues.put(fields[i], tf);
              this.setMainContent(main);
         public boolean showApplyButton() {
              return false;
         public void apply() {
         private boolean mCancel = false;
         public void cancel() {
              mCancel = true;
              super.cancel();
         public Properties getProperties() {
              if (mCancel) return null;
              Properties p = new Properties();
              for (int i = 0; i < fields.length; i++) {
                   p.put(fields[i], mValues.get(fields[i]).getText());
              return p;
         public static void main (String[] args) {
              ParamDialog pd = new ParamDialog(new String[] {"A", "B", "C"});
              WindowUtilities.visualize(pd);     
         public static Properties getProperties(String[] fields) {
              ParamDialog pd = new ParamDialog(fields);
              WindowUtilities.visualize(pd);
              return pd.getProperties();          

  • Data entered by user in the front end is lost when ever their is an error

    Hi,
    I am working for an internal tool aplication which is used to enter/manipulate employee details.
    We are using ORACLE APEX for this.
    We have completed most of the application wr.t Master detail page
    But when we are testing we had this problem as below:
    The user enters a new record with some details as Employee name,DOJ,Salary etc
    When the user has entered correct details the data is loaded in to database,
    But when the data entered is wrong at any stage say Salary after entering say 10 fields, an error is popped up as per the code. And when the user getss back to the eneterd fields to change the data suddenly eneterd fileds are disappeared.
    Can anyone please help us in understanding this with a solution
    Thanks,
    Eshwar Prasad

    Hi Vishnu,
    I created One Report region (tabular form) to validate the row entered by user, creating page level validation using apex_application..here it is not possibe to create the item level validation.If there is any possibilty plz send the process how to create item level validation..
    Thanks
    Eshwar Prasad

  • How to generate a report from data entered by users in XML forms

    hi,
      i have a requirement to generate report from xml forms which are created using XML forms Builder and stored in Km folders. management want to see in a single report all the activities of all the users in the xml form in such a way that one row in the report presents data blongs to each user.  i have no idea regarding this.
    can any one help me in detail.
    Thanking you in adavance
    sajeer

    Hi Sajeer,
    You have given quite few information what data should be collected / showed in detail. Anyhow, it sounds as if you want to provide data which isn't provided within the standard portal so far (see http://help.sap.com/saphelp_nw2004s/helpdata/en/07/dad131443b314988eeece94506f861/frameset.htm for a list of existing reports).
    For your needs you probably have to develop a repository service which reacts on content / property changes and then you would have to log these changes somewhere, for example in a DB. On the other side, you then could implement a report iView which accesses this data and displays it as whished.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

Maybe you are looking for