Validate numeric in updatable report

What is the best way to handle a user placing a $ sign in a numeric field. The numeric field(unit_cost) exists in an updatable report. When a $ sign is entered, the following error occurs:
Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Found invalid number value, please verify number format., insert into "PURCHASEREQ_DEV"."PRM_REQ_ITEMS"
The options I have tried aren't working probably due to syntax. I am looking for the quickest and easiest way to do this. 1. Is there a way to intercept the oracle error and handle it gracefully for the end user? 2. I have attempted some javascript solutions to manipulate the field with no avail. 3. I am also aware of Denes example of validation on updateable reports.
Shelly

Dan,
The first example you provided was good and it worked. Of course I want my cake and eat it too.
It gave an error message on the same page (did not give a row by row breakdown). Also when comma's
were placed in the numeric field(which the oracle table doesn't complain about) I get the error. I would like to
be able to just check for $ signs. I tried this
DECLARE
l_error VARCHAR2 (4000);
BEGIN
FOR i IN 1 .. apex_application.g_f02.COUNT
LOOP
IF instr(apex_application.g_f10 (i),'$') > 0
THEN
l_error :=
l_error
|| '</br>'
|| 'Row '
|| i
|| '** Please remove the $ sign**';
END IF;
END LOOP;
RETURN LTRIM (l_error, '</br>');
END;
This works, to some degree. It shows the error message at the top of the page and specifies which row the error occurred on , but when I scroll down to the updatable report region, it did not keep the values that had been entered. So I routed the error to a new page and that worked. When I closed the page, the data was still there with the $ sign waiting to be changed. It would be nice if I could keep it on the same page.
I also tried the second example you sent. I receive the error everytime, even when a valid number with no $ sign or comma is in the field.
Shelly

Similar Messages

  • Numeric or value error in updatable report

    report error:
    ORA-06502: PL/SQL: numeric or value error
    This is the error I get when I run my updatable report.
    Here the query:
    select
    IDS,
    CPY_IDS,
    PU_IDS,
    START_DT,
    END_DT,
    IDS AUDIT_BUT,
    IDS EDIT_BUT,
    CREATED_BY,
    CREATION_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATE_DATE
    from GOM_PROD_UNIT_COMPANIES
    where CPY_IDS = :P47_IDS
    for column cpy_ids i use a select list (named lov) with next query:
    select nm d, ids r
    from gom_prod_units
    order by 1;
    When I run the page the error is shown.
    When I use display as text (based on lov, does not save state), it does work...
    The application was exported from dev to test, and in dev it did work without any problem...

    This is the output in toad:
    select
    a.IDS,
    a.CPY_IDS,
    a.PU_IDS,
    a.START_DT,
    a.END_DT,
    a.IDS AUDIT_BUT,
    a.IDS EDIT_BUT,
    a.CREATED_BY,
    a.CREATION_DATE,
    a.LAST_UPDATED_BY,
    a.LAST_UPDATE_DATE
    from GOM_PROD_UNIT_COMPANIES a
    where a.CPY_IDS = 4;
    IDS;CPY_IDS;PU_IDS;START_DT;END_DT;AUDIT_BUT;EDIT_BUT;CREATED_BY;CREATION_DATE;LAST_UPDATED_BY;LAST_UPDATE_DATE
    163;4;16;9/29/2004;;163;163;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:50 PM
    166;4;537;10/15/2004;;166;166;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:50 PM
    340;4;13;10/13/2008;;340;340;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    372;4;14;10/13/2008;;372;372;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    414;4;15;10/13/2008;;414;414;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    445;4;12;10/15/2007;;445;445;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    446;4;8;10/15/2007;;446;446;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    482;4;9;5/21/2003;;482;482;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    493;4;7;10/13/2008;;493;493;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    498;4;11;10/13/2008;;498;498;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    499;4;10;10/13/2008;;499;499;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM
    549;4;485;5/21/2003;;549;549;GOM3;10/13/2008 11:00:37 AM;GOM3;11/3/2008 4:51:51 PM

  • Error in updatable report

    Hi All,
    I need to add validation to updatable report.
    As the report doesnot have items, I am using collection package.
    eg:
    select
    htmldb_item.select_list_from_query(9,em_agent,'select em_agent, em_agent from IBM_MANAGED_DATABASES') em_agent,
    htmldb_item.select_list_from_query(10,em_in_scope,'select em_in_scope, em_in_scope from IBM_MANAGED_DATABASES') em_in_scope
    from "#OWNER#"."IBM_MANAGED_DATABASES" d, ibm_servers s
    where d.server = s.server
    When I run the page, I am getting an error
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    The same thing I implemented on emp ,dept tables in apex training instance and it works.
    Can anyone please address where I am going wrong in actual implementation.
    Thanks.

    Sarvani,
    I am sorry I did not get you "or change your handle to show it".I mean go to the Control Panel link (top right of on my page) and make your handle something like "Sarvani". While you are there click "Show" for your name and put at least your first name there. Messages are a lot easier to track when they are associated with human-sounding names.
    Is that you are pointing to the way I explained the problem.I don't know what you mean by that.
    My report has 1045 columns...1045 rows
    and as you suggested I used apex_item.popupkey_from_query...I first suggested that you try select_list_from_query_xl. Did you try that? I don't think it will help because you are returning so many rows but you could try it.
    Then you tried the popupkey_from_query. I am not clear if the page doesn't run and gives a 404 or if the page runs and the popup page gets a 404.
    When you put the test case on apex.oracle.com, we will be debugging the popup item but it will be much easier if you can first check your Apache logs on your system and get the error message.
    Scott

  • How to add a row-selector to an existing SQL Query (updatable report)

    Hi,
    I screwed up an extensive updatable report in Apex 4.2 region by one time indicating the page may be parsed at run time.
    After setting this back (to validate query) a lot of the columns setting were gone, and also the row-selector
    I actually don't kno how to simply add this row-selector back into place.
    Anyone who can point me in the right direction?
    Thanks a lot
    Wim

    Wim,
    >
    Hi,
    I screwed up an extensive updatable report in Apex 4.2 region by one time indicating the page may be parsed at run time.
    After setting this back (to validate query) a lot of the columns setting were gone, and also the row-selector
    I actually don't kno how to simply add this row-selector back into place.
    Anyone who can point me in the right direction?Have you been able to recover all your other configuration and this is the last thing you need to fix? Or are all those other things needing to be fixed as well?
    The reason I ask is that you may want to consider just starting from scratch, if you haven't put lots of effort into recovering everything else just yet.
    On the other hand, if you just want to add a checkbox back into the SQL statement then you can add this, substituting your column name for empno of course:
    APEX_ITEM.CHECKBOX2(1,empno,'CHECKED') "Select"When you do this you'll get a warning that you're changing the interactive report, which you should accept. Then you need to make sure that the column is actually shown in the interactive report by making sure it's in the displayed columns list. And you may also need to change the display type of the column to "Standard Report Column"
    Hope that helps.
    Earl

  • Self Updating Report of Open Sales Orders (Maybe Crystal )

    I want a self updating report of Open Sales Order. I want it to refresh constantly. I know that it could be an alarm but it would be executed every # minutes and dont want to. Any ideas ? I dont know Crystal Reports enough but is it posible ?

    Hi ,
    If I were you , I will not be crazy looking at my sales order in every 1 minutes ..I would train my users to check at least 15 minutes.
    I understand what u are trying to do;you  want that customer will see the latest open SO created ..but 15 minutes is good enough time .
    I think you have to check if database size grows up big time ..so far no report has come to me from my clients for this set up .
    make sure you  are not saving an alert into database
    If you are using multiple alerts , I will atleast monitor my database for a while to see i encounter performance issue ..
    So far for one alert at every 15 minutes ..i think u should be fine ..
    Hope this helps
    Bishal

  • Navigate to the first item in a updatable report

    on my page i have a master/detail form. When a new detail - record is created, the cursor navigate to the first item on the page => it is the first item of the master! What I have to do, that the cursor navigate to the first item in the new detail-record ??
    Thanks
    Robert

    Hi Andy,
    thank you for your answer.
    When the program start, I can not find the cursor. I think, I have a problem to reference the item in the updatable report. I wrote the following lines:
    <script language="JavaScript1.1" type="text/javascript">
    alert('Vor Cursor Navigation');
    first_field('#FKOM_RUFNR#');
    </script>
    (FKOM_RUFNR is a column of the select statement in the report!!)
    A second problem: The cursor navigate to the field - first_field('FIELD_NAME') - every time. But the cursor should navigate to the field in the updatable report, if the button "ADD" in the region of the updatable report was clicked. If the page was displayed without clicking the ADD - button, the cursor should navigate to the first item in the master form ( like => Cursor focus: first item on the page). How can I do that ??
    Thanks
    Robert

  • Insert not working in updatable report

    I have created an updatable report using the htmldb_item function with the facility to display an extra row (in order to create a new row).
    I have then created a Create button that branches to the same page as the updatable reportn and a Branch.
    I then created an after submit process that makes the insert of the data.
    But apparently the process is not fired when I click the create button.
    How do I have to do to fire a Submit on the page in order for my process to be run?
    Thanks.

    Just to amplify MtD's explanation, if you start to move a SINGLE clip and THEN hold down the Option key, the arrow will change form so that it has a 90 degree bend in it.  Then when you release the clip in a new position by letting go of the mouse button, not only will it "insert" into the timeline at that position, but the gap in the timeline (where you pulled it from) will close.
    It's really helpful when you are rearranging sound bites and don't want to have to manually close up the holes in the timeline.  Unfortunately this only works when you are grabbing a single clip.  If you do it with multiple clips it will still insert, but will leave an open hole in the timeline where you pulled the group from.  Having Snapping (N) turned on is very helpful for this operation, by the way.

  • Using multiple LOV popups in a multi-row updatable report but save to 1 col

    Hi,
    I'm trying to generate a multirow updatable report, which has only 1 writeable column. There is a read-only column that indicates the type of value that the writeable column should contain (it's a varchar2). The second column will be a LOV popup.
    I can create the report by setting the 2nd column to a LOV and it's fine, however I really want the LOV to be different, depending upon the value of the first column for the row.
    For example, if the first column is "list" then I want the popup to show all my "lists"
    If the first column is "role" then I want to the popup to show all my "roles".
    There will be a mixture of values within the entire rowset.
    I've so far managed to use a case statement to generate different LOV popups, which are displayed as required but the returned data isn't written back to the correct field.
    If I use the same p_idx value then there is only one javascript function created and it always stores the data in the first rows column.
    If I use unique p_idx values, then it works better but selecting a value for the 2nd row will store it there but also overwrite the 1st rows value as well.
    My SQL for the report currently looks like this (cut down for clarity)
    SELECT RULACTPRMIDD, /* PK */
    CASE PRMNME /* type */
    WHEN 'list' THEN
    APEX_ITEM.POPUPKEY_FROM_QUERY(2,rulactprmval,
    'SELECT LSTNME r, LSTNME d FROM LSTLST', 0)
    WHEN 'role' THEN
    APEX_ITEM.POPUPKEY_FROM_QUERY(2,rulactprmval,
    'SELECT ROLNME r, ROLNME d FROM PDRROL', 0)
    END dynamic_popup
    FROM CPNRULACTPRM
    I can't think of an example where i've seen this done within the Apex development environment otherwise I would refer you to that.
    An alternative option would be to pass the type of value required to the same LOV and then get the LOV query to only show the appropriate values - i'll look into this as a workaround option.
    thanks

    User478832,
    I didn't look thru all the code but I have a feeling your problem is the 9th line in the On Demand process. (the 9th line in this post anyway)...
    htp.prn('<option value="' || rec.cpc_name|| '">' || rec.cpc_name|| '</option>');
    You modified your query to get a different column but your returning the same column later: rec.cpc_name x2
    I assume you want to display NAME and return ID so change it like this...
    htp.prn('<option value="' || rec.cpc_id || '">' || rec.cpc_name|| '</option>');
    Let me know if that helps...
    Dan

  • How to add a new record in updatable report using apex_item

    Hi,
    i am using an updatable report using the following select
    select
    aPEX_ITEM.POPUP_FROM_QUERY(2,emp_code,
    ' SELECT emp_surname, emp_code FROM hrm_employee ' ,null,null,null,null,null,'onchange="f_set_multi_items_tabular(this.value ''#ROWNUM#'''
    || ')"',null,null,null) PF_No,
    apex_item.text (32,
    NULL,
    80,
    100,
    'style="width:190px" ',
    'f11_' || '#ROWNUM#'
    ) Name,
    " REST_DATE",
    "REMARKS",
    from "roster"
    when i click on the button add row , only the column rest_date and the remarks are enable.
    why is the apex_item.text and apex_item_popup_from_query is disable ? and how i can make it enable.
    thanks
    regards
    jerry

    I could see that you are using the addRow() function to generate new blank row.
    I guess, this function(used by the builtin tabular form s) , identifies editable columns when they are marked so at the report column attributes.
    When you use apex_item API, it expects the columns to be standard report column and hence render the new rows as such.
    Some one from the development team might be able to give a better answer on that.
    As for avoiding this issue
    <li>One method , would be to define the columns editable(and display types) in report column attributes.
    <li> You can duplicate the last row using jQuery( *$('tr.highlight-row:last).after( $('tr.highlight-row:last).clone() )* ) and removing the field values, but events(for example datepicker) would remain attached to the original row , so it isn't very straightforward either.
    <li>If you want to use apex_item you would have to use a pseudo union to DUAL for generating a blank row and re-render the report either by a page load or a Dynamic Action. Sounds like a nice idea for a plugin.
    Now , if you want to add rows multiple times without saving them, then you would need to store the values in a collection at load and update the collection before adding the row.

  • More than one updatable report on one page.

    I hope someone can help me with this.
    I've spend a long time looking for the best way to do this but keep running into APEX constraints.
    My problem is that I have two tables;
    1) an 'object' table with static attributes (that can change value but keep no history).
    2) an 'object attributes' table with attributes that can change over time (i.e. keep a history).
    Some of the attributes are optional and some mandatory irrespective of whether they are static or timestamped.
    I want to design a screen that shows both tables on one page - preferably both updatable on the same screen.
    Selecting/clicking a row in the top table (object) will select the appropriate object attribute rows in the table below (I've got that covered - no help needed there).
    If I create a new object record I also need to create an initial object attributes record.
    This first initial attributes record cannot be deleted while the object exists.
    The start date of the object itself and its first object attributes record should remain in sync.
    I cannot separate the object table and attributes tables on different pages as all static and timestamped attributes form one collection that needs to be visible and maintainable from one screen.
    The problem is APEX will not allow more than one updatable (or interactive) report on one page.
    I need a solution where both tables are maintained in a uniform way for the user.
    Not, for instance, one table an updatable report and the other a report with detail form.
    Anybody struggle with a similar problem and found a solution to this problem?
    Any pointers are most welcome.
    Ruud.
    PS. I have a joined view on both tables with an INSTEAD trigger that can process insert/update/delete's on the combined data however I would not like to use that if I can avoid it. It would mean a repetition of static attributes in the one updatable report.

    Andy,
    Apologies for the late reply - Forums have been out for a while :-(
    Thanks for the suggestion. I've had a look at Denes' example and
    at least now I know it is possible.
    I've asked for access to his workspace but have not been given that
    yet so can't look at the details yet but I can make some educated
    guesses as to how it was done.
    I will give it a try.
    I'm still not certain whether having 2 updatable tabular reports is the
    right way to go though....
    Currently I'm working on a page with 2 navigator reports - one for selecting
    the object and another to select the start date of the timestamped attributes.
    Next to that I have an updatable detail form that shows the selected object
    and attributes as one whole set using the joined view I mentioned earlier.
    Inserts, updates & deletes are then done in the form.
    Ruud.

  • Opening updated report fails because record selection filter is invalid

    I am trying to update a report stored in BOE XI.  The report has been modified and the main part of the report has been moved to a subreport.   I first replace the .rpt file with the updated report.  Then I attempt to open the report using the code below it, but it throws an error and complains about an unknown field being mentioned in the filter
    oReportAppFactory = (IReportAppFactory) es.getService("", "RASReportService");
    oReportClientDocument = oReportAppFactory.openDocument((IInfoObject) oReport, 0, Locale.ENGLISH);
    ERROR MESSAGE: Cannot open report document. --- This field name is not known.
    Details: errorKind
    Error in File /opt/bobje/bobje/tmp/{F395AC11-26FC-11DF-A70C-00065B8B38B5}.rpt:
    Error in formula  <Record Selection>.
    '// Filter on desired date range
    This field name is not known.
    Details: errorKind
    If I manually delete the record selection filter in CMC before upgrading the report all works fine.  So, do I need to remove the filter before attempting to open the report or is there another step I'm missing to refresh the report using the newly updated .rpt file? 
    thanks,
    Brett

    The relevant part of the stacktrace is below.  
    java.lang.UnsupportedOperationException
            at com.crystaldecisions.sdk.properties.internal.AbstractSDKList.remove(Unknown Source)
            at java.util.AbstractList$Itr.remove(AbstractList.java:436)
            at com.crystaldecisions.sdk.plugin.desktop.common.internal.i.do(Unknown Source)
            at com.crystaldecisions.sdk.plugin.desktop.report.internal.e.f(Unknown Source)
            at com.crystaldecisions.sdk.plugin.desktop.report.internal.e.f(Unknown Source)
            at com.crystaldecisions.sdk.plugin.desktop.report.internal.e.refreshProperties(Unknown Source)
    The context is the same as the original post...
    An existing report is being updated.  The original report uses a single view and has a record selection filter.  The updated report uses the same view in a subreport, and the main report has no record selection filter.
    .rpt file is updated using IReport.replaceUnique(int, File).  
    Changes are committed to IInfoStore -> iStore.commit(IReport)
    Refresh options are enabled
    IReportRefreshOptions refreshOptions = oReport.getReportRefreshOptions();
    refreshOptions.removeOption(IReportRefreshOptions.CeRefreshOption.TITLE);
    refreshOptions.removeOption(IReportRefreshOptions.CeRefreshOption.DESCRIPTION);
    refreshOptions.addOption(IReportRefreshOptions.CeRefreshOption.PROMPT_VALUES);
    refreshOptions.addOption(IReportRefreshOptions.CeRefreshOption.RECORD_SELECTION_FORMULA);
    refreshOptions.addOption(IReportRefreshOptions.CeRefreshOption.GROUP_SELECTION_FORMULA);
    refreshOptions.addOption(IReportRefreshOptions.CeRefreshOption.PRINTER_OPTIONS);
    refreshOptions.addOption(IReportRefreshOptions.CeRefreshOption.DEFAULT_LOGON_INFO_VALUES);
    Properties are then refreshed using IReport.refreshProperties() which throws the UnsupportedOperationException
    changes are again committed.
    thanks,
    Brett

  • Software Update reports bundled apps cannot be updated because they are associated with a different Apple ID

    New MacBook Pro 15" Retina arrived today.
    Software Update reports that updates are available for iPhoto and iMovie, bundled with purchase.
    However, when UPDATE is selected, the error message
    "You have updates available for other accounts.
    To update this application, sign in to the account you used to purchase it."
    I am the initial user and have no other account.

    Any chance you had a different Apple ID with an earlier Mac and then it got migrated to your new MBP?
    When you registered new MBP did you use the same Apple ID?

  • How to display more than 10 rows in an Auto Updating Report

    I followed Carl Backstorm's example, http://htmldb.oracle.com/pls/otn/f?p=11933:40:525653462286833::NO:RP:: to create a page with an auto update report/region. It's working fine (thanks, Carl) but I can't have the report display all rows (38 rows in total). Everytime I press the "Manual Refresh" button, it shows 10 (the first 10) rows only.
    When the report displays at the first time, it shows all the rows (38 rows). Number of Rows and Maximum Row Count are set to 999999 and "No Pagination Selected" in the report region. But after I press the "Manual Refresh" button or specifiy an update time value (like 1 second) to have it auto update, then it only display the first 10 rows.
    Is there a way to display more than 10 rows in an Auto Updating Report using Carl's example auto update report/page? Anyone can help? Thank you.
    -Michele
    Edited by: 106451 on Jun 30, 2010 10:12 AM

    Yes, I changed it to:
    function table_object(pId){
         this.id = pId;
         this.start_record = 1;          //optional
         this.num_record = 50; //optional
         this.num_record2 = 50;          //optional
    I don't quite understand how these vaiables are used for though. Thanks.

  • Carl's Auto Updating Report example with Apex 3.0

    Hi,
    I'm try to develop a page very similar to Carls' "Auto Updating Report" page and been very new to Apex I find it very hard to work out all the things I need to do from the example pages.
    Is there anywhere I can download a sample application so I can explore the code through APEX to see how everything works and fits together.
    Any help would be most appreciated.
    Anthony

    Carl,
    Thanks I have it working.
    Just one more question is it possible to have two reports on same page to auto update?
    If I simply add another html_PPR_Report_Page with the second report_id I get an Error : "gNode is null or not an object". using IE.
    function mon_Refresh()
    setTimeout("mon_Refresh()",5000);
    html_PPR_Report_Page (null,'R1736701112358007',$x('r_R1736701112358007').getAttribute('htmldb:href'))
    works fine but
    function mon_Refresh()
    setTimeout("mon_Refresh()",5000);
    html_PPR_Report_Page (null,'R1736701112358007',$x('r_R1736701112358007').getAttribute('htmldb:href'))
    html_PPR_Report_Page (null,'R1738006943370690',$x('r_R1738006943370690').getAttribute('htmldb:href'))
    raises an error.
    Anthony

  • Updated Report Selection Criteria doesn't show in Publication

    Hi,
    This is my first post in this forum and I'm relatively new to Crystal Reports Server.
    We have Crystal Reports Server 2008 V1 SP3.
    I have two independent reports that I've put together in a report publication. The report is saved to the file system.
    I made a change to one of the report's selection criteria. I viewed the report thru the Crystal Reports Program and Infoview/CMC to confirm the additional records I wanted showing were showing. They were and everything worked.
    A week went by and I noticed that the saved report didn't have the additional records.
    I've contacted SAP support and we were able to get everything working by doing the following
    1) Remove the updated report from the publication's Source Documents list. Save and Close
    2) Re-add the report to the publication's Source Documents list.
    3) Delete the old recurring schedule (so we don't have two instances doing the same thing).
    4) Re-create a new schedule for the delivery (not reschedule and replace an existing nor reschedule and create new, but a brand new one).
    These changes were compounded by the fact that I had 4 different scheduled instances, each with a different parameters, so these 4 steps were actually closer to 8.
    In my own testing I was able to confirm something similar happens with a single report (not part of a publication) when you change the selection criteria. I had to create a new scheduled delivery in order to get the selection criteria change to flow thru.
    My questions to all you is
    Is there some other way to distribute 2 reports in way that making a change the criteria of the report doesn't require doing anything else?
    Thanks.
    Edited by: David Steven on Feb 13, 2012 9:58 PM

    Hi RobbinsFam!
    Here is an article that describes the issue you are seeing, and can provide you with some helpful troubleshooting steps:
    iOS: Unable to import photos to computer
    http://support.apple.com/kb/ts3195
    Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

Maybe you are looking for