This discussion is archived
1 2 Previous Next 19 Replies Latest reply: Feb 19, 2013 2:34 PM by n_shah18 RSS

Flash chart issue on onload

n_shah18 Newbie
Currently Being Moderated
Hi
apex 4.1.1 , oc4j , linux , oracle 11g

I am using a flash pie chart which depends on date entered by end user. I also gave default date as sys-1 as more accurate data is based on COB sys-1.
I also have a report parallel to flash chart which is also depended on date entered by end user(same as flash chart), report loads(shows data) on page load or refresh but flash chart does not load until i hit submit button or press enter in date form.
All i get is big yellow round circle on page load, which might be confusing for end user.
can you guys help me with this .

your input is much appreciated .

NS
  • 1. Re: Flash chart issue on onload
    fac586 Guru
    Currently Being Moderated
    Hunk09 wrote:

    apex 4.1.1 , oc4j , linux , oracle 11g

    I am using a flash pie chart which depends on date entered by end user. I also gave default date as sys-1 as more accurate data is based on COB sys-1.
    I also have a report parallel to flash chart which is also depended on date entered by end user(same as flash chart), report loads(shows data) on page load or refresh but flash chart does not load until i hit submit button or press enter in date form.
    How is the default date set?

    How do the chart and report queries handle the initial absence of a user entered date/the default value?
  • 2. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    Hi
    Thank you for response.

    there are two input parameter of date format ,which has a default value as to_char(sysdate-1,'MM/DD/YYYY')
  • 3. Re: Flash chart issue on onload
    fac586 Guru
    Currently Being Moderated
    Hunk09 wrote:
    Hi
    Thank you for response.

    there are two input parameter of date format ,which has a default value as to_char(sysdate-1,'MM/DD/YYYY')
    That answers one question, but raises another: Why two inputs? Do the chart and report use different parameters?

    What about:
    How do the chart and report queries handle the initial absence of a user entered date/the default value?
  • 4. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    Here is my flash chart query
    select null link, (case when count(*) > 0 then 'Phone' else null end) label, (case when count(*) = 0 then null else count(*) end) total
    from vernote, verreceive
    where trunc(whendate) between to_date(:P27_DP_TTF_START_DATE, 'MM/DD/YYYY') and to_date(:P27_DP_TTF_END_DATE, 'MM/DD/YYYY')
    and vermethodkey =ANY (1,5,6)
    and verreceive.colresponse = 1
    and vernote.verreceivekey = verreceive.verreceivekey
    union
    select null, to_char(vermethod.descr), count(*) total
    from vernote,vermethod,verreceive
    where trunc(whendate) between to_date(:P27_DP_TTF_START_DATE, 'MM/DD/YYYY') and to_date(:P27_DP_TTF_END_DATE, 'MM/DD/YYYY')
    and vernote.vermethodkey not in (1,5,6)
    and verreceive.colresponse =1
    and verreceive.verreceivekey = vernote.verreceivekey
    and vermethod.vermethodkey = vernote.vermethodkey
    group by vermethod.descr
    and here is report query
    select * from (
    select userhdr.descr as "fullname", vermethod.descr 
    From Vernote, Verreceive, Vermethod, Userhdr
    Where Trunc(Whendate) Between To_Date(:P27_Dp_Ttf_Start_Date, 'MM/DD/YYYY') And To_Date(:P27_Dp_Ttf_End_Date, 'MM/DD/YYYY')
    And  Verreceive.Colresponse = 1
    
    --added by neel 1/24/13 after finding that 2 is related to collections
    
     AND vernote.CONTACTTYPE      = 2 
    and vernote.verreceivekey = verreceive.verreceivekey
    and vermethod.vermethodkey = vernote.vermethodkey
    and userhdr.userkey = vernote.userkey
    )  
    pivot
    ( 
        Count(*) 
        for descr in ('email'as email,'phone' as phone,'voicemail' as Vmail,'Fax' as fax,'Online/Internet' as Internet,'No Message' as "No Msg",'letter' as letter , 'Email IN' as "Email IN" , 'Fax IN' as "Fax IN")
        )
    #2 :P27_DP_TTF_START_DATE and :P27_DP_TTF_END_DATE are two parameter whos dfault value is set to to_char(sysdate-1,'MM/DD/YYYY')
    hope it helps

    Edited by: Hunk09 on Feb 19, 2013 10:55 AM
  • 5. Re: Flash chart issue on onload
    fac586 Guru
    Currently Being Moderated
    Hunk09 wrote:

    #2 :P27_DP_TTF_START_DATE and :P27_DP_TTF_END_DATE are two parameter whos dfault value is set to to_char(sysdate-1,'MM/DD/YYYY')
    Item source/default values affect the items as rendered on the page, but are not saved in session state where they can be accessed in region source SQL until the page is submitted. (You can see this by using the Session viewer when the page is first rendered.) To get values in both the rendered items and session state, create Before Header computations to set <tt>P27_DP_TTF_START_DATE</tt> and <tt>P27_DP_TTF_END_DATE</tt>. Make each computation conditional on the value of the item being null.

    The report presents data without parameters because the pivoted counts will always return 0 if the query returns no rows.
  • 6. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    Thank you for your help
    To get values in both the rendered items and session state, create Before Header computations to set P27_DP_TTF_START_DATE and P27_DP_TTF_END_DATE. Make each computation conditional on the value of the item being null.
    i tried with computational same issue .let me explain the issue. it pass the value on page render/load to P27_DP_TTF_START_DATE but chart still does not render on it own , untill i hit submit button.


    from debug.

    *...Perform computation of item: P27_DP_TTF_START_DATE, type=PLSQL_EXPRESSION*

    *...Execute Statement: begin wwv_flow.g_computation_result_vc := to_char(sysdate-28,'MM/DD/YYYY'); end;*



    *......Result = 01/22/2013*


    Does it have to do anything with submit button?
  • 7. Re: Flash chart issue on onload
    fac586 Guru
    Currently Being Moderated
    Hunk09 wrote:
    Thank you for your help
    To get values in both the rendered items and session state, create Before Header computations to set P27_DP_TTF_START_DATE and P27_DP_TTF_END_DATE. Make each computation conditional on the value of the item being null.
    i tried with computational same issue .let me explain the issue. it pass the value on page render/load to P27_DP_TTF_START_DATE but chart still does not render on it own , untill i hit submit button.


    from debug.

    *...Perform computation of item: P27_DP_TTF_START_DATE, type=PLSQL_EXPRESSION*

    *...Execute Statement: begin wwv_flow.g_computation_result_vc := to_char(sysdate-28,'MM/DD/YYYY'); end;*



    *......Result = 01/22/2013*


    Does it have to do anything with submit button?
    Suggest you try to reproduce the problem on apex.oracle.com.
  • 8. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    http://apex.oracle.com/pls/apex/f?p=62896:4:


    sample app

    test /test123

    Edited by: Hunk09 on Feb 19, 2013 1:47 PM
  • 9. Re: Flash chart issue on onload
    fac586 Guru
    Currently Being Moderated
    Hunk09 wrote:
    http://apex.oracle.com/pls/apex/f?p=62896:4:


    sample app

    test /test123
    Can I take a look at the app in your workspace? If that "test" user has developer privileges, then just post the workspace name. If not, create a guest developer account and post the credentials with the workspace name.
  • 10. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    surely sir ,workspace is SORS

    Edited by: Hunk09 on Feb 19, 2013 1:58 PM
  • 11. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    surely sir , workspace is SORS
  • 12. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    workspace is SORS
  • 13. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    workspace is SORS
  • 14. Re: Flash chart issue on onload
    n_shah18 Newbie
    Currently Being Moderated
    surely sir , workspace is SORS
1 2 Previous Next

Legend

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