This discussion is archived
7 Replies Latest reply: Feb 22, 2013 9:00 PM by pravish RSS

Interactive report form

pravish Newbie
Currently Being Moderated
Hello,
I have an interactive report form. Page1>Report>clicking on edit button>takes user to "form",page2. On page 2 the form is divided into 2 halves in 2 regions(business requirement). One half is editable.The other half is in display mode,but can be editable by clicking on edit button(which has this setting as,redirect to page(number =x,example).my problem is............

first half form>entered values for few fields(please note,i didn't save them).>navigated to second half of the form>clicked on edit button>the page is redirected to same place but all the values that i entered in the first half of form disappears. Is there a way to make them not to disappear?

Details
APEX Version : 4.2


Thanks
  • 1. Re: Interactive report form
    scott.wesley Guru
    Currently Being Moderated
    You have a couple of options off the top of my head
    1) don't redirect with the button - just apply a dynamic action that refreshes/adjusts your second region as per your needs
    2) instead of redirect, submit the page, thereby storing your values in session state and handle branching accordingly
    3) hybrid - use a dynamic action to save your data, then when your page refreshes, source items from session state.

    Scott
    blog: [url grassroots-oracle.com]grassroots-oracle.com
    twitter: [url twitter.com/swesley_perth]@swesley_perth
  • 2. Re: Interactive report form
    pravish Newbie
    Currently Being Moderated
    Hi,
    How do i store values in session state.

    Thanks
  • 3. Re: Interactive report form
    scott.wesley Guru
    Currently Being Moderated
    If you're not familiar with session state
    a) start by reading this section "managing session state values"
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_ses_val.htm#BEIFIHFH
    b) then attempt option 2 - get the button to do page submit - not redirect.

    This should get you on your way.

    From there you may need to play with source settings for your items, and once you have a better understanding of session state, you can start working with dynamic actions
  • 4. Re: Interactive report form
    pravish Newbie
    Currently Being Moderated
    Hi Scott,

    I cannot do page "submit" the reason is as below

    Like I said earlier, i have 2 regions(region 1 and region 2) on the same page. I filled the first half(region1), clicked edit button on the region2(before clicking edit button,all the item values in the form are in display mode.Soon after clicking edit button,it turns into editable mode where i can modify the item values.This is the reason why EDIT=redirect to page x).
    After clicking the EDIT button all the item values entered in the first region disappears.


    I understand the tip you suggested but i cannot give "SUBMIT" action for "EDIT" button. Its because if i give submit action then the page won't be redirected to page x and the items will be in display mode only thus i cannot modify region2.

    Hope i am clear

    Thanks
    Pravish
  • 5. Re: Interactive report form
    scott.wesley Guru
    Currently Being Moderated
    I get what you mean, but there's always more than one way to skin a cat.

    You can go the redirect option, I've described the exact functionality here
    http://www.grassroots-oracle.com/2011/09/apex-tutorial-adding-read-only-option.html

    But you will need to also pass the values of your fields edited so far - either within the "Set these items" "with these values" options, and if you have a few this might be a pain...

    ... or you can submit the page, and have some hidden value or use the REQUEST value under the Edit button to indicate that's what you're doing instead, and handle your page render accordingly. In fact, what do you use in the Edit button now to indicate what happened?

    Scott
  • 6. Re: Interactive report form
    pravish Newbie
    Currently Being Moderated
    Thanks a lot Scott.I resolved the issue. I also have another issue.


    Issue description: I have an interactive report form.I opened the report>form>edited the form>Saved the data by hitting Apply button. Now i navigated to report trying to open the row which i editedbefore. I got this ORA-06502: PL/SQL: numeric or value error: character to number conversion error I checked my columns data type(the ones that are causing the issue) they are correct, varchar2(which i want).Not sure why its throwing above error. Are there any other places that i am missing to look?

    Thanks in advance
  • 7. Re: Interactive report form
    pravish Newbie
    Currently Being Moderated
    Hi Scott, I am good.Thanks for all the help.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points