Date Validation problem in form with report

Hi,
I am stuck on this date validation issue in a form with report that I am working on-
I have an Active_date_start and an Active_date_end field. I want to validate the form in such a way that if the user enters the Active_date_end < active_date_start then it should error out appropriately asking to change the active_end_date . Also another problem is that the changes are made to the active_date_end they should reflect in the table. How do I accomplish this.
Appreciate all the help offered.
Thanks.

Hi,
Thanks for the code.Now the APPLY CHANGES works fine except that it throws an error when I change the end date to a date which is less than the start date . So it does show me my error and does not go further but also shows me the error -
Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number
or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306:
wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I looked up the error number and it says its a generic error type where the error can be found on the line number specified. But in this case how and where do I look for the error line?. This is the code I am using-
DECLARE
vACTIVE_DATE_START DATE;
vACTIVE_DATE_END DATE;
BEGIN
vACTIVE_DATE_START := TO_DATE(:P4_ACTIVE_DATE_START, 'DD/MM/YYYY');
vACTIVE_DATE_END := TO_DATE(:P4_ACTIVE_DATE_END, 'DD/MM/YYYY');
IF vACTIVE_DATE_END < vACTIVE_DATE_START THEN
RETURN 'End date is before start date';
ELSE
RETURN NULL;
END IF;
END;
My base table has the active_date_start as NOT NULL. Now I have the exact same code for APPLY CHANGES
in other form and it works fine not giving the above error. I am at a loss to know how I can get rid of the error.
Any suggestions!.
Thanks in advance,
A

Similar Messages

  • Image upload in  Form with Report

    Hello
    I have created a table FA_CUST_DTL
    Column Name     Data Type     Nullable      Default     Primary Key
    CUST_ID NUMBER      No          1
    CUST_NAME     VARCHAR2(1000) Yes          
    CUST_ADD     VARCHAR2(4000)     Yes          
    MOBILE     NUMBER(12,0)     Yes          
    PHONE     VARCHAR2(15)     Yes          
    EMAIL     VARCHAR2(100)     Yes          
    SIGNATURE_IMAGE     BLOB     Yes          
    MIMETYPE     VARCHAR2(200)     Yes          
    FILENAME     VARCHAR2(400)     Yes          
    IMAGE_LAST_UPDATE     DATE      Yes          
    Then i created a page Form With report with the trigger . After Browsing , images are not showing in my report.
    Can u tell me any idea abt it plz help me its urgent for me.
    Regards
    Geet

    If you need to control height and width of your uploaded images, then you must use the APEX_UTIL.GET_BLOB_FILE_SRC function. Please refer to this documentation:
    [http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_util.htm#AEAPI129]

  • Form with report Related

    Hi,
    I have created form with report.i want to apply the function like initcap,upper or lower apply changes portion of item.
    e.g when i click on pencil image to modify the value.item which holds the value.if i enter value in lower case.i want to make value in initcap format.how can i apply this function.
    Please help me to solve this problem.
    Thanks & regards
    Nisha

    Hi,
    First of all when do you want to make them Initcap? If its after submit, then you can handle it in your DML or at trigger level. If its before submit, you can go with JS.
    for those who prefer recursion over looping...
    <script type="text/javascript">
    function fnInitCap(pStr)
        var vReturn;
        if (pStr.indexOf(" ") != -1)
            // Initcap the first word
            vReturn = pStr.substring(0, 1).toUpperCase() + pStr.substring(1, pStr.indexOf(" ") + 1).toLowerCase();
            // Contains multiple words, call function recursively
            return vReturn + fnInitCap(pStr.substring(pStr.indexOf(" ") + 1, pStr.length));
        else
            vReturn = pStr.substring(0, 1).toUpperCase() + pStr.substring(1, pStr.length).toLowerCase();
            return vReturn;
    </script>and put following in item attributes..
    onChange="javascript:this.value=fnInitCap(this.value);"Regards,
    Hari

  • Reset Select List in Form With Report

    Hi,
    i have Created Form with Report Page. I have three select List on this page.
    1-Market Name Select List with Redirect
    2-Customer Name Select List with Redirect
    3-Contect Person
    when i select market Name then Respective Customer name is select In to select List Customer Name.
    When i select Customer Name Then Contact Person is Select in Select List Contect Person.
    Problem is when i select Customer Name from Select List then Contact Person comes into Contact persion Select List But the value in select List Customer Name and Market Name is not dispaly , Display Only -Select Market - and -Select Customer Name- .
    I want when i select Customer NAme From Select List then value from MArket and customer Select List should not be reset.
    How can i do this.
    Thanks
    Edited by: 805629 on Jan 26, 2011 10:45 PM

    Try 'select list with submit', not "select list with redirect". Redirect usually doesn't save the values in session state so they are lost when the page repaints.

  • Use Formule on FORM with REPORT - result stored at table

    Hi all,
    What is the best solution for?
    I have region with FORM WITH REPORT on the same PAGE.
    Values stored at table INFO with column ID, MYDATE, TIME_START_HOUR, TIME_START_MIN, TIME_END_HOUR, TIME_END_MIN, SUM1, SUM2
    ITEMS on the form:
    P1_ID (hidden)
    P1_MYDATE (date picker)
    P1_TIME_START_HOUR (select list)
    P1_TIME_START_MIN (select list)
    P1_TIME_END_HOUR (select list)
    P1_TIME_END_MIN (select list)
    P1_SUM1 (hidden)
    P1_SUM2 (hidden)
    After user fill in MYDATE, TIME_START_HOUR, TIME_START_MIN, TIME_END_HOUR, TIME_END_MIN then I need proces for calculation SUM1 en SUM2. Result stored (one record) at table INFO.
    Report shows all columns. User had possibility to update the record
    Formule:
    Select
    (CASE
    when to_char(mydate,'DY','nls_date_language=dutch') in ('ZA','ZO')
    THEN substr(to_timestamp (mydate||':'||TIME_END_HOUR||':'||TIME_END_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    to_timestamp (mydate||':'||TIME_START_HOUR||':'||TIME_START_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    (interval '00 00:00:00' day to second)
    ,12,5)
    ELSE '08:00'
    END) SUM1,
    (CASE
    when to_char(mydate,'DY','nls_date_language=dutch') in ('ZA','ZO')
    THEN substr(to_timestamp (mydate||':'||TIME_END_HOUR||':'||TIME_END_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    to_timestamp (mydate||':'||TIME_START_HOUR||':'||TIME_START_MIN ||':00','DD-MM-YY:HH24:MI:SS') -
    (interval '00 04:00:00' day to second)
    ,12,5)
    ELSE '04:00'
    END) SUM2
    FROM INFO
    where id=:ID
    What is the best way for the calculation: computation or processes or etc? The calculation after or before user push button(New:create button of Update:Apply Changes)?
    How to fill the answer (SUM1 and SUM2) at table INFO?
    Thanks Walter

    I have something similar I use:
    DECLARE
      str_day      VARCHAR2(10);
      dt_indx      DATE;
      db_dt_indx   VARCHAR2(20);
      str_st_tm    VARCHAR2(20);
      dt_st_tm     DATE;
      db_st_tm     VARCHAR2(20);
      str_ed_tm    VARCHAR2(20);
      dt_ed_tm     DATE;
      db_ed_tm     VARCHAR2(20);
      shft_flag    NUMBER;
    BEGIN
      str_day    := :P1050_DATE_MM || '/' || :P1050_DATE_DD || '/' ||  :P1050_DATE_YYYY;
      dt_indx    := to_date(str_day, 'MM/DD/YYYY');
      db_dt_indx := to_char(dt_indx, 'MM/DD/YYYY');
      str_st_tm  := str_day || ' ' || :P1050_TIME_IN_HH || ':' || :P1050_TIME_IN_MI || ' ' || :P1050_TIME_IN_AM;
      dt_st_tm   := TO_DATE(str_st_tm, 'MM/DD/YYYY HH:MI AM');
      str_ed_tm  := str_day || ' ' || :P1050_TIME_OUT_HH || ':' || :P1050_TIME_OUT_MI || ' ' || :P1050_TIME_OUT_AM;
      dt_ed_tm   := TO_DATE(str_ed_tm, 'MM/DD/YYYY HH:MI AM');
      --Alter date if night shift
      SELECT NVL(:P1050_NIGHT_FLAG,0) into shft_flag from dual;
      IF dt_ed_tm < dt_st_tm THEN
        dt_ed_tm := dt_ed_tm + 1;
      END IF;
      db_st_tm   := to_char(dt_st_tm + shft_flag,'MM/DD/YYYY HH:MI AM');
      db_ed_tm   := to_char(dt_ed_tm + shft_flag,'MM/DD/YYYY HH:MI AM');
    end;You'll need to modify it for your page variables.

  • Additional fields in report for form with report

    Hello,
    I got the problem, that I want to create a form with report where the form only changes the values of one table but the report is also using additional fields linked from another table. If I take a view with all fields for my form with report, the form is about all fields and not only about those from the first table. So is there a way to have another table linked to the form than to the report and get a link between them by a key?
    I hope that someone has got a great idea and can help me solving this.
    Thanks
    Jochen

    Jochen,
    you can create a form with report on the view and afterwards you change the SQL-query into a query on the view. Take care that the original column names remain the same. You get your extra columns in the report and your link to the form remains,
    good luck,
    DickDral

  • How to make custom data validation on standard form.

    Hi,
    I have some little OAF experience. I have extended VO so far but I am still newbie.
    I need to make custom data validation on standard form.
    I Oracle Credit Management module on "Create Credit Application: Applicant" form I need
    to validate chosen currency against customer setup (whether there is customer profile amount for the currency).
    The page is /oracle/apps/ar/creditmgt/application/webui/ARCMCREDITAPPPAGE
    There are controllers on the page:
    oracle.apps.ar.creditmgt.application.webui.creditAppContentFooterCO 115.14.15104.2
    oracle.apps.ar.creditmgt.application.webui.creditApplicationPageCO 115.6
    oracle.apps.ar.creditmgt.application.webui.creditAppRegion2CO 115.13.15104.2
    oracle.apps.ar.creditmgt.application.webui.creditApplicationCO 115.8.15104.3
    oracle.apps.ar.creditmgt.application.webui.creditAppRegion1CO 115.28.15104.4
    oracle.apps.ar.creditmgt.application.webui.creditAppBusBackCO 115.6
    oracle.apps.ar.creditmgt.application.webui.OCMApplicantInfoRNCO 115.4
    creditApplicationPageCO is pageLayout controller.
    Please direct me how to achieve it.
    Which controller should I extend (if any)?
    How to get values from the page (customer site id, currency) and how to run custom sql in my CO class ?
    Regards,
    Marcin

    Hi Marcin,
    You have to find your GO button is handled in which standard controller, (if you click on the about this page, you should be able to identify the controller,
    or you can download all the controller .class files and decompile and check the logic).
    Then extend that controller(which has the Go button logic, you can see how it has been handled.),
    The usual way to check is
    if(pageContext.getParameter('<Go button name>') !=null)
    Since you want to validate first your custom validation, in the extended controller ProcessFormRequest
    dont call the super.processFormRequest unless your validation is success.
    Call the super at the end.
    Inside your extended controller you have to find your AM and then your required ViewObject to get the user entered values.
    Thanks,
    With regards,
    Kali.
    OSSi.

  • Form with report, where some items in the form have been given values.

    Hi, greetings:
    I have a question that maybe silly but annoying to me. I need to provide a form with report, where some items in the form have been given values automatically, and these items (display only) are supposed to show given values in the form automatically.
    I used the APEX form with report. The update and delete worked well. But I cannot show automatic values when insert. By default APEX insert form makes every item null; I tried to give value for two items: P5212_USERKEY, P5212_DAILY_VER_DATE with process before header, after header, after regions and before footer, and computation, or set values of these two items in the branch when user hit create button (submit). It never worked out, the two items always displayed null value, and when I insert, I got "ORA-01400: cannot insert NULL into ("TBSBI"."DAILYVERPRODNOTE"."USERKEY")", since I have set up constraint in database that these two columns should not be null.
    Could anyone help on this? any suggestion would be appreciated.
    Sam

    If you have made these values 'Display Only' they would by default not save the session state. Accessing the page items will always return NULL. Did you change the 'Save Session State' option to 'Yes'?

  • Form with report, update field in the form = field is not updated in table

    Hi,
    I have a form with report. On Primary Key in the report is a link to the form. I select one row in the form by choosing the link in the report. Then I update a field in the form and press "Save". I see the success message "Action processed" and I'll be back in the report. I see the field in the report with it's old content. It is not updated. I don't understand why. Can anybody help me?
    Thanks Daniela

    Daniela,
    Is the form field source set to the proper database column? It's either not properly defined or your Save button and the builtin update process have somehow become disconnected. Check to make sure that the Save button is set to perform an Update in the database operations setting.
    Earl

  • Form with report question

    Hi,
    I have developed all my forms of type 'Form with report' which after entering values, displays the report page that shows the details entered.
    In the form page definition I have a select list for customer id which diplays 'customer name' as return value. So after the form values are entered it redirects to the report page which displays the details such as customer id etc. How do I make this page to display the customer name instead of customer id. From user's perspective it would make more sense if he can see the customer name for editing/changes.
    Also I wanted to know which kind of report would be the most appropriate if the report is based on a PL/SQL block. Would it be as interactive ?.
    Appreciate all suggestions posted.

    Hi Zahid,
    Yes, That is exactly what I wanted. So now I have my other table (resources ) for getting the resource_name . I do not see any quotes in your query which makes me wonder how your query under – ‘Region source’ of the Region definition looks like. Could you paste you code exactly as seen there. Besides I am not sure if we can join tables in there. I was getting –Unable to parse query error as well as Invalid character. I am not entirely sure of the syntax of the query definition in the report page as it is automatically generated . Any ideas? . I am pasting my query here for you to look at.
    Appreciate your help.
    select "RR.RESOURCE_ROLE_ID",
    "RR.RESOURCE_ID";
    "RE.RESOURCE_NAME",
    "RR.ROLE_ID",
    "RR.PROJECT_ID",
    "RR.CREDITS_PER_HOUR",
    "RR.ACTIVE_DATE_START",
    "RR.ACTIVE_DATE_END",
    "RR.LAST_UPDATED_BY",
    "RR.LAST_UPDATE_DATE",
    "RR.CREATED_BY",
    "RR.CREATION_DATE"
    from "#OWNER#"."RESOURCE_ROLES" "RR",
    "#OWNER#"."RESOURCES" "RE"
    where "RR.RESOURCE_ID" "=" "RE.RESOURCE_ID";
    Thanks,
    A

  • Creating a Form with Report based on View

    Hi All,
    I wanted to create a form with report based on two tables so:
    1. I created a view (called COMBO) based on two tables
    2. I then created a form with report based on the view
    Everything seemed fine thus far until I tried to edit existing records - I got the error:
    ORA-20505: Error in DML: p_rowid=2002082600001172, p_alt_rowid=REPATRIATION_ID, p_rowid2=, p_alt_rowid2=. ORA-01776: cannot modify more than one base table through a join view
    Unable to process row of table COMBO.NB: REPATRIATION_ID is the primary key of the Repatriation table. The other table is Applicant.
    & when I tried to create a new record - I got the error:
    ORA-01776: cannot modify more than one base table through a join view
    Unable to process row of table COMBO.Someone please enlighten me!
    Kind Regards
    Kamo
    Edited by: Kamo on 2009/03/12 2:33 AM

    Hello Kamo,
    You need to create an 'instead of' (update/insert/delete) trigger on your view to process the inserts etc into the 'real' tables.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Question of Form with Report?

    This is great since I can create a form with report.
    For my search on form selection, I can only select one column, can I select more than one columns so I can search column A and B?
    Thank you.

    User,
    What is your name?
    Yes, when you're creating the report it's easy as you should see a list of columns and be able to select the ones you want. Afterward you'll have to manually modify the query which is easy enough.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • As I can send data since a done form with applets to page html?

    A question.
    As I can send data since a done form with applets to page html?
    I thank beforehand its aid.

    Please re-write your English.

  • Vertical Panel per page Problem for Form-type Reports

    I have a notification form-like report consists of 5 pages so I set the vertical panel to 5 (so when it prints, there are actually 5 physical pages, but 1 logical page in the reports builder). Some fields will expand, their datatype is BLOB. And when they expand, there are now 10 physical pages (even if the expansion is caused by a half-page-long data) some with blank pages. What I expect to happen is that there are 5 physical pages (as originally set) and additional pages (let's say another 1 page) for the expansion. But is this possible, that we can limit the number of vertical panels for the expansion? Can anyone help me please...?

    Has anybody experienced the same problem? Thanks in advance!

  • Viewset - active view and data validation problem

    Hey there,
    I've a problem while using a viewset (1 col, 2 rows) and the data-validation in the wdDoBeforeAction() method.
    My application works basically like this:
    The first view is displayed with 2 mandatory input fields. Upon the evaluation result of the entered data in these fields, a corresponding second view will be displayed. The input fields in the first view are set to read only and a button named "Change" appears. This button triggers an action which fires and outbound-plug to an empty view, so that the second view disappears and resets the "read only" properties of the input fields in the first view, so that the user can enter new data.
    The problem is, that the second view contains input fields itself, which are validated in the wdDoBeforeAction() method of this view. The navigation is cancelled if an error occurs. Well, this is fine if i want to submit (pressing the button "Approve" in the second view) this data and proceed, but if i want to go back to the first view (by hitting the "Change" button), i want to discard all information entered in the second view and i dont want this data to be validated. It's quite annoying if u just want to correct the first views data but have to enter correct values for the second view in order to get through the second views checks..
    I hope that's clear enough, otherwise i will upload a screenshot to clarify.
    Thx in advance
    Regards
    Pascal

    Hi Pascal,
    although I wont prefer to do so for reasons of readability, you could use wdDoProcessbeforeAction to control your view-flow.
    Take a look at the example, I have two Buttons with two actions, one is set on "Validate", the other is not (guess which on is the validating ).
    You can get the action triggered inside the doBefore ... method and determine whether or not the checkbox is set.
    So put your code to validate the input in the i(isValidting) branch and your problems are solved.
    Keep in Mind: I would delegate the Validation from the view to the controller, handle the validation myself with custom coding and then check in the view controller if any errors occured.
    hope that helped,
    Jan
      //@@end
      public void wdDoBeforeAction(com.sap.tc.webdynpro.progmodel.api.IWDBeforeAction validation)
        //@@begin wdDoBeforeAction
           IWDAction currentAction = validation.getCurrentAction();
           if (currentAction == null) return;
           String action = currentAction.getText();
           boolean isValidating = currentAction.isValidating();
           if (isValidating) {
                wdComponentAPI.getMessageManager().reportException(action);
           } else {
                wdComponentAPI.getMessageManager().reportSuccess(action);
        //@@end
    Edited by: Jan Galinski (Holisticon) on Sep 8, 2009 3:15 PM

Maybe you are looking for

  • E72 : Unable to hear message tone

    whenever i receive messages on my e72 phone.....at first i will be able to hear the message tone but after a while i wont be able to hear the message tone. Then wen i switch off and switch on my phone, i wil be able to hear my tone back. So i thought

  • Field Bus Area is a required field for G/L 010 191120

    Dear Guru My user going to creta a grn that time he faced some error which is mentioned below " Field Bus. Area is required field for G/L Account xyz yyyyyyy I dont know what is happend please

  • Creation of a new Formula Routine for condition base value calculation

    hello people, i am stuck up in a situation where SAP has itself said that nothing can be done. but i know you all can guide me to some way or the other see, the scenario is like this 1. i have to calculate the base value for a pricing condition. whic

  • JMS Adapter Websphere MQ problem

    Guys, I have a problem with websphere MQ using JMS adapter to send messages to XI. When I send a message with 2 line items to MQ, XI JMS adapter is picking up only the first line item always and second line item just dissapears.  MQ --> XI --> System

  • JMX NotificationListener is never called (Weblogic 10.3)

    Hi folks I'm trying to register a NotificationListener which gets called when the 'HeapSizeCurrent' attribute of the JVMRuntimeMBean has changed. I tried the following code, but the listener is never called. Any ideas? public class Test implements No