Discoverer - passing value into Parameter Field.

I would like to pass sysdate into a parameter I have created called "Start Date" and sysdate+30 into another one called "End Date" but have been unsuccessful.
Any ideas folks?
I have tried by putting in different combinations in the defaul value - including SQL etc but to no avail.
I am relatively new to Discoverer so apologies if its a stupid question and the functionality isnt there.
Thanks!
Sam

Hi,
The functionality isn't really there to do this, but there are a number of workarounds. The most frequently used workarounds are:
1. Create a list of values containing CURRENT_DATE as a text value using for example a custom folder containing:
SELECT 'CURRENT_DATE' date_field FROM DUAL
UNION ALL
SELECT TO_CHAR(other_dates) FROM another_table
Then in a condition decode CURRENT_DATE back to sysdate, e.g.
select_date = DECODE(:date_param, 'CURRENT_DATE', TRUNC(sysdate), TO_DATE(:date_param))
2. Use a NULL parameter to mean current date. The user will be prompted to enter NULL for the current date then you can decode this out in the condition:
select_date = DECODE(:date_param, NULL, TRUNC(sysdate), :date_param)
3. Use a date offset as the parameter, so that 0 is the current date, -1 is yesterday etc. You then use a condition like:
select_date = TRUNC(SYSDATE) + :date_param
Hope that helps,
Rod West

Similar Messages

  • Loading Values into Parameter Fields

    Good Morning,
    I have a traditional crystal 2008 report (not inside of VB .Net) that prompts the user for Parameter Fields when it starts up.  In some cases the user does not want this.  Instead they would like Crystal to be able to prefill these Parameter Fields from a file; when this happens the user would not see the parameter fields screen and would be taken directly to the crystal report.
    Have anyone done anything like this?  It is possible?

    No, you could save the report with default values or save it with data but it won't change unless someone resaves the report.
    Another way would be to save the Parameter values in a database and then remove the parameters from the report and add record selection based on that field. How you get the new values in is again up to you.
    Stand alone CR doesn't have the ability.
    Thank you
    Don

  • Passing value to a field of SAP Program which do not have "Parameter ID"

    Dear Experts,
    My requirement is that i need to pass a value from my dialog program to a field of SAP Program which do not have "Parameter ID" attached to it.
    For example: If you run SAP Transaction CS14, it has two sections viz., Primary BOM and Secondary BOM. I need to copy and create own screen using Dialog program. The screen appears in custom screen would be similar to that of the SAP Transaction CS14. If you check the fields, all the fields have "Parameter ID" attached to it, except for the following fields which do not have Parameter IDs are "Alternative", "Valid From" and "Required Qty".
    Hence how do i pass value to those fields? Kindly help me
    To those fields where "Parameter IDs" are attached, i can use below two statements:
    Set parameter id <par> field <field>.
    call transaction 'CS14' and skip first screen.
    Regards,
    Ramesh Manoharan

    Hi Harald Boeing,
    Thanks you very much. My problem is solved.
    Rewarded Points.
    Regards,
    Ramesh Manoharan

  • Pass value to a field dynamically..

    Hi Experts,
    Can any one solve this issue?.
    I want to pass value to different fields dynamically..
    Egu2026
    I have work are having fields
    lwa_table-var1,
    lwa_table-var2,
    lwa_table-var3,
    lwa_table-var4,
    u2026.. up to lwa_table-var100.
    My logic is I have to pass l_tot value .. based on the last letter like below.
    if l_tot value is 1 we have pass to lwa_table-var1
    if l_tot value is 2 we have pass to lwa_table-var2
    if l_tot value is 3 we have pass to lwa_table-var3
    if l_tot value is 100 we have pass to lwa_table-var100.
    <removed_by_moderator>
    Thanks in advance.
    Regards,
    Kumar.
    Edited by: Julius Bussche on Aug 12, 2009 8:41 AM

    Hi Friend,
    U can do Following.....
    data:  text(12) type c.
    data : num type n.
    data: int type i.
    data: begin of wa_test,
          var1,
          var2,
          var3,
          var4,
          end of wa_test.
    FIELD-SYMBOLS <fs_wa> TYPE ANY.
    do 4 times.
      int = int + 1.
      num = int.
      CONCATENATE 'wa_test-' 'var' num into text.
      ASSIGN (text) to <fs_wa>.
    <fs_wa> = num.
      UNASSIGN <fs_wa>.
    enddo.
      write : wa_test-var1 , wa_test-var2 , wa_test-var3 ,wa_test-var4 .
    ouput will be :     1 2 3 4.
    Lets take Your Scenario----
    >>>>>>>>>>>>>>>>>
    Data: begin of lwa_table,
    Var1,
    Var2,
    Var3,
    u2026..
    u2026u2026
    Var100,
    End of lwa_table.
    Data: l_tot type i.
    u2022     For example l_tot = 36.
    u2022     Then u want to pass the same to lwa_table36.
    For this do followingu2026..
    Now Define-->>>
    data: text(13) type c.
    data : num type n.
    FIELD-SYMBOLS <fs_wa> TYPE ANY.
    *Now till now we done all the data definitions now u have to do following to pass it dynamically,
    l_tot = 36.
    Num  =  l_tot.
    CONCATENATE lwa_table-' 'var' num into text.
    ASSIGN (text) to <fs_wa>.
    <fs_wa> = num.
    UNASSIGN <fs_wa>.
    Write : lwa_table-var36.
    Output will be 36.
    Hope this resolves ur issue,
    Regards,
    Akash Rana
    Edited by: AKASH RANA on Aug 12, 2009 8:53 AM

  • How to put the SQL-statement returned value into the field (as a default)

    Hi,
    I am using Developer/2000 (Forms Designer) under windows 98.
    Please tell me how to put the SQL-statement value (as a default value) into the field before enter-query mode. Noted that I have tried the following ways but still some problems:-
    1) Place the SQL-statement into PRE_QUERY trigger in the form/block level.
    There is a message box which ask 'Do you want to save the changes?'.
    2) Place the SQL-statement before execute enter_query. There is still a
    message box which ask 'Do you want to save the changes?'.
    Any hints? Thanks. Urgent.

    solved it!
    1) Suppress DEFAULT save message
    if form_failure then
    raise form_trigger_failure;
    end if;
    2) Place the default value before enter-query.
    Ref: Title='Default value in query field in ENTER_QUERY mode' in designer forum by CVZ
    form level trigger
    ============
    WHEN-NEW-ITEM-INSTANCE
    =======================
    if :system.mode = 'ENTER-QUERY' then
    :block.item := 'default waarde';
    end if;
    3) Suppress the changes whenever leaving the default field.
    if :block.item is null then
    -- assign statement
    end if;

  • How to pass values in dynamic fields in LX03

    HI ,
    i  want to pass values for dyanmic fields in lx03 program by calling this in my own program through  call transction or submit report .

    LX03 is the report program so you have to use Submit report.
    See the simple example :
    REPORT ZTEST_98 .
    DATA: t_param LIKE rsparams OCCURS 10 WITH HEADER LINE.
    parameters p_LGNUM like lagp-lgnum obligatory.
    start-of-selection.
          t_param-selname = 'S1_LGNUM'.
          t_param-kind = 'P'.
          t_param-low  = p_lgnum.
          APPEND t_param.
    *-- Period
    SUBMIT RLS10030 VIA SELECTION-SCREEN
                              WITH SELECTION-TABLE t_param
                              AND RETURN.
    Just press F1 on submit and you get good documentation.
    Thanks
    Seshu

  • To populate values into single field in an internal table

    Hi Friends,
    How we need to populate values into single field in an internal table.
    E.g itab consits of single field ( name)
           i need to assign values to this field name .like
          peter,
          john,
          abrahm,
          daneyal
    Pls tell me i how i need to code for this
    Thanks ,
    Parnith

    Hi,
    Please look at the below code :
    DATA : BEGIN OF itab OCCURS 0 ,
             name(20) TYPE c,
           END OF itab.
    START-OF-SELECTION.
      itab-name = 'Peter'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'John'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Abrahm'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Daneyal'.
      APPEND itab.
      CLEAR itab.
      LOOP AT itab.
        WRITE : / itab.
      ENDLOOP.
    Thanks,
    Sriram Ponna.

  • How can we prevent a user from entering a value in Parameter Field?

    how can we prevent a user from entering a value in Parameter Field and Select-options Field?

    make it invisible, make it inactive, make it display only.
    if the field is not there or not to be seen the user WILL have problems inputting data.
    BUT once the field is there you can NOT prevent that the user fills it with data.
    all you can do is on PAI check if the data the user inputted was good or bad, and clear his inputs, but you can NOT prevent him inputting something.

  • How to passing value into Captivate from html?

    How to passing value into Captivate from html?
    Or
    How to communicate between objects in one slides?

    Hi czhao0378 and welcome to the forums!
    Captivate does not natively allow you to communicate your own
    data, either internally or externally. The only way to make this
    happen is to create your own functionality, either via custom-built
    Flash objects or JavaScript code executed in the browser or a
    combination of both.
    The only example I've seen of any "data passing" inside
    Captivate is a custom text input/output solution that was posted on
    the Captivate Developer Exchange:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1253 021
    This solution consists of an input box that takes information
    from the user on one slide and a second box that displays that
    information on another slide. The functionality was built in Flash
    and is embedded in Captivate as a Flash "animation". Unfortunately,
    since this is a custom functionality, the information is not
    included in the user completion results Captivate can pass to a
    Learning Management System.
    Since the solution mentioned above relies on a Flash
    Actionscript variable to hold the information that is displayed,
    you can also pass the information from HTML to Captivate using the
    "SetVariable" command in JavaScript. This would at least allow you
    to display your own HTML-based data inside Captivate.
    Beyond that, I'm not aware of any other way to gather and
    pass data in Captivate.

  • Multiple Checkbox Values Into One Field

    Hopefully someone can help me with this issue I'm having.
    I'm trying to save the values of multiple selected checkboxes into one field separated by commas through ADDT's Insert Transaction code. I can do this easily with DW's standard insert record wizard by using the PHP implode() function but I haven't been able to figure it out with ADDT's code.
    <form>
    <input type="checkbox" value="1" name="program[]" /> Program One
    <input type="checkbox" value="2" name="program[]" /> Program Two
    <input type="checkbox" value="3" name="program[]" /> Program Three
    <input type="checkbox" value="4" name="program[]" /> Program Four
    </form>
    THIS IS ADDT'S CODING
    $ins_quoteManager->addColumn("programs", "STRING_TYPE",  "POST", "programs");
    THIS WORKS VIA DREAMWEAVER'S INSERT RECORD WIZARD
    Original: GetSQLValueString($_POST['programs'], "text"),
    Modified: GetSQLValueString(implode(',',$_POST['programs']), "text"),
    Anyone know how to modify the ADDT code with the implode function to get this to work?

    Have you tried ADDT´s "comma-separated checkboxes" form control, which will also store the values into a field of your choice (and of course retrieve them from there on update record - pages) ? The only possible drawback might be, that the checkboxes can´t be defined statically, means that the array of value/label - pairs will be retrieved from another table by establishing an additional recordset.
    Cheers,
    Günter

  • Set default value for parameter fields

    Good day!
    Situation:
    1. I have 2 parameter fields in reports (dateFrom and dateTo)
    2. Before running report in ASP.NET I change value this fields (dateTo = today, dateFrom = today - 3 days)
    3.I use for this source:
    foreach (ParameterField crParam in CrystalReportSource1.ReportDocument.ParameterFields)
                            CrystalDecisions.Web.Parameter crParametr = new CrystalDecisions.Web.Parameter();
                            string ParametrName = crParam.Name;
                            crParametr.Name = ParametrName;
                              crParametr.DefaultValue = ActionReportParameter.GetParametrValue(ReportName, ParametrName);
                             CrystalReportSource1.Report.Parameters.Add(crParametr);
    4. And repurt run without request value parameter fields.
    5. BUT!!! now I need request value parameter fields before report start running - I want set default values for filelds and offer user change its before report start run.
    How do this?
    Thanks

    I believe you need to create your own parameter promt screen. Capture what the user entered and pass that to the report(?).
    slv

  • Authorisation - Pasting of values into AUTH fields

    Hi Friends,
    I am working on 4.6c version - Authorisation under PFCG (Role maintenance). Is it possible to paste >8 values into the AUTH fields of an authorisation object in a single shot?
    If so, kindly share the solution.
    Regards,
    Vijay

    >
    vj vijay wrote:
    > Hi Friends,
    >
    > I am working on 4.6c version - Authorisation under PFCG (Role maintenance). Is it possible to paste >8 values into the AUTH fields of an authorisation object in a single shot?
    >
    > If so, kindly share the solution.
    >
    >
    > Regards,
    > Vijay
    Hey Vijay,
    you sound like a man on the mission - want everytihng done in a SINGLE SHOT
    I am not sure if i understand your requirement correctly, but my infernce is that you want to copy data from clipboard to the object values with little / no effort........(prime criteria )
    Well, have the values listed one below the other in a notepad, copy them ctrl+C and in SAP have the quick cut and paste option active.
    Now go to the object values and right click - you will have 7 rows of data copied, if you want more - repeat the exercise
    If you want to reach the moon, you have to pass-by some stars as well (Dumb and in-appropriate quote - I KNOW)
    If my understanding of the discussion is wrong - Blame it on the Monday morning Blues...............and have fun

  • Passing values to hidden fields in screens

    Hi ,
    I have designed a screen which has i field which is output only, and two fields which are hidden.. the output only field gets populated when i select value from an alv tht pops up on the screen based on certain conditions.. the hidden fields should also be populated than.. but the hidden fields are not getting populated i think..
    i have assigned a t-code to this screen,
    and i need to call this transaction from another program passing values to all the fields.. i used parameter id for all teh fields, but values are not getting populated in the hidden and display fields. i gets in when i make it input enabled.. but i cannot let users enter values in 1 field, and i do not want users to see the other field.. What do i do???? please give your valuable suggestions. .a ny idea how to correct the issue?
    Regards,
    Suzie

    Hi,
    If you want one of the fields to be grey mode you can do that statically in the screen painter or dynamically in the progarm
    in PBO
    loop at screen
    if screen-name = 'TO_BE_GREY_MODE'.
    SCREEN-INPUT = 0
    ENDIF
    endloop
    for hidden fields if the screen name and the variable name in the program are same the data transfer takes place but the users cannot see this.
    Regards
    Ramchander Rao.K

  • Popup2 in SQL report not passing values of table fields

    Hello All,
    Can some one help me with this popup 2 case statement.
    Instead of the values behind the fields being passed the literal text of "A.Metric" & "A.Month" is beaing passed into the new page instead.
    A.Metric has a value of 10 and A.Month has a value of '01/May/2008'
    CASE WHEN ANALYSIS IS NOT NULL THEN
    '<a href="javascript:popUp2('''
               || 'f?p=&APP_ID.:305:&SESSION.::&DEBUG.::'
               || 'P305_METRIC_TYPE,P305_METRIC_MONTH:A.METRIC_TYPE,A.MONTH'
               || ''', 890, 460);style="text-decoration:underline;color:black; font-size: 90%">'
    || '<img src="#APP_IMAGES#notes.jpg">'
    || '</a>' END "Analysis"
    Frank

    Species 5618 wrote:
    Hello All,
    Can some one help me with this popup 2 case statement.
    Instead of the values behind the fields being passed the literal text of "A.Metric" & "A.Month" is beaing passed into the new page instead.
    A.Metric has a value of 10 and A.Month has a value of '01/May/2008'
    ----------------------------------------------------------------------------------------------------------------------<font face="Arial">CASE WHEN ANALYSIS IS NOT NULL THEN
    '&lt;a href=&quot;javascript:popUp2('''
               || 'f?p=&amp;APP_ID.:305:&amp;SESSION.::&amp;DEBUG.::'
               || 'P305_METRIC_TYPE,P305_METRIC_MONTH:'
               ||  A.METRIC_TYPE,A.MONTH
               || ''', 890, 460);&quot;style=&quot;text-decoration:underline;color:black; font-size: 90%&quot;&gt;'
               || '&lt;img src=&quot;#APP_IMAGES#notes.jpg&quot;&gt;'
               || '&lt;/a&gt;' END &quot;Analysis&quot;</font>
    Franksorry did not realise that my text was being changed by this forum's application edit tool
    Here is the SQL statement again
    Frank
    Edited by: Species 5618 on Apr 15, 2009 10:03 AM
    I also Tried this with no success (&
    <font face="Arial">CASE WHEN ANALYSIS IS NOT NULL THEN
    '&lt;a href=&quot;javascript:popUp2('''
               || 'f?p=&amp;APP_ID.:305:&amp;SESSION.::&amp;DEBUG.::'
               || 'P305_METRIC_TYPE,P305_METRIC_MONTH:'
               ||  &A.METRIC_TYPE.,&A.MONTH.
               || ''', 890, 460);&quot;style=&quot;text-decoration:underline;color:black; font-size: 90%&quot;&gt;'
               || '&lt;img src=&quot;#APP_IMAGES#notes.jpg&quot;&gt;'
               || '&lt;/a&gt;' END &quot;Analysis&quot;</font>
    Edited by: Species 5618 on Apr 15, 2009 10:10 AM

  • Populate a value into a field on a screen using userexit

    Hi all,
      I am using a standard program 'RIPLKO10' and a user exit include 'ZXAD2U04' to update a field to the screen. When i run the program the userexit gets triggerred, but i do not know how can i update the field value. Can anyone please tell me how can i achieve this.
    Thanks,
    Rajesh,

    Hi,
    Check if there is an export parameter, through which u can pass/update the field value and most of the exits will have a flag --> is_exit_active , pass 'X' to this field if available, so that the values do not get overwritten in the standard program.
    Rgds,
    Hema

Maybe you are looking for

  • How to conver a BINARY Table in specific format Documento to send by e-mail

    Hello all i am trying to send a file that is located in application server, this file was created in BINARY MODE, so now i need to download from this server and then send it by e-mail, i haver already download in BINARY MODE but when i send it and i

  • Am I able to use Sockets in applets

    I developed a server-client application in java using datagrams, and decided to try to convert the client application into an applet. The problem was that the applet wouldn't run in a browser but it worked if I used javas appletviewer! Tryed both JDK

  • Consideration of factory calender in threshold values

    Hi, I need to consider the factory calender in the threshold values to check the due date of a task or a checklist item. For example: The task/or checklist item is due in 11 days (and the factory calender should be condsidered) Does anybody know how

  • DB13 SQL error -942  after homogenous system copy

    Dear all, I've performed hpmogenous system copy from the productiion system running on ECC 6.0 Oracle 10.2.0.4 and HP-UX 11.31. Then after finishing all post homogenous system copy activites I've tried to start check db in DB13 and I got this error m

  • Photo Libraries (in iPhoto 2.0.1)

    I am trying to help transfer photos to an external drive to free up start-up disk space. To open iPhoto, it had to create a new Library which is Library_2. There is also a Library_1 and Library_10 that seems to have the most folders by years (going b