"Optional" Paremeter/Prompts in report selection.

Post Author: heathdallison
CA Forum: Crystal Reports
I've been going through the forum looking for someone who has solved my particular problem but I haven't found it. I'm using crystal server XI and crystal reports design tool. I have a report that lists employees who logged in between given dates. So the report has three prompts: start dateend date employee ID.The problem is that the client might want to search for all employees between datesone employee between datesone employee all dates I've tried setting the default values to "" for these prompts and then use an if statement in the select to conditionally determine the use of select criteria as in the following example:(if {?Flight Number} <> "" then ({Flights.FlightNum} = {?Flight Number})) But regardless of whether or not the default value is passed or a flight number is passed the report will run the "then" portion of the if statement. As a result i will always get zero records returned if I don't supply one of the prompt values and allow it to run with the default "" value.  

Post Author: mkotza
CA Forum: Crystal Reports
There is a sample report done in Crystal 8.5 that allows an "All" parameter and the parameters are set up as string types, even the dates.  Link to this sample reports site and download the .zip file. The .rpt that shows this technique is called Allorspecificparameters.rpt. All the sample reports are very good tools to learn from! The site is http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=http--supportbusinessobjectscom-communityCS-FilesandUpdatesNoNav-crparameterssampleszipasp&sliceId=&dialogID=6396253&stateId=1%200%206394227
If the link is too long, you might try going to the http://technicalsupport.businessobjects.com and search for "sample reports" and "parameters". Hope this helps!
Minna

Similar Messages

  • Report select options similar to Query output options : Urgent !!!!!

    Hi All,
    I have developed a custom report . The output options of this report needs to be included in Selection screen like in SQ01 queries, there should be option to output the report results in different formats like List Viewer, ABAP List, Spread Sheet etc.,. 
    If some variant is selected then user will select whatever the format he want .
    the output should display in that format .
    How I can acomodate all these options to output a report .
    How can I do this ..Pls help me its Urgent !!!!
    Points for Sure !!!
    Regards,
    Varma

    Hi,
       Try this code,
       at user-command.
       case sy-ucomm.
       when 'disp'.
       write:.......   "abap list
       when 'buton1'
        call function 'reuse_alv_list_display'.
         endcase.
    i hope it gives ur answer
    Reward if it helps.

  • Select Options use in ALV Report in ABAP Webdynpro

    Hello Experts,
    I Already Done ALV Report In webdynpro with use of view Container UI element.But i do not know ALV  report with help of select option.so
    Kindly Give Me simple Example of Use in select Option In ALV.
    Reply ASAP.
    Regards,
    Ameya Karadkhedkar

    First you need to add the component WDR_SELECT_OPTIONS to the tab "Used components" of your Web Dynpro component and then also in the properties tab of your view. In the layout you need to create another view container and embed the view WND_SELECTION_SCREEN of the new used component to it.
    Then in the WDDOINIT method of your view you can write this code (where SEL_OPT is the given name for the used component) in order to set the select option (This example is a select option for a date):
    DATA: lo_cmp_usage           TYPE REF TO if_wd_component_usage,
          lo_interfacecontroller TYPE REF TO iwci_wdr_select_options,
          lo_r_helper_class      TYPE REF TO if_wd_select_options,
          rt_range_date          TYPE REF TO data.
    * Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
    lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Call method in used controller
    lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
    * Create select option for the date
    CALL METHOD lo_r_helper_class->create_range_table
      EXPORTING
        i_typename    = 'DATS'
      RECEIVING
        rt_range_table = rt_range_date.
    CALL METHOD lo_r_helper_class->add_selection_field
      EXPORTING
        i_id          = 'DATS'
        it_result     = rt_range_date
        i_read_only   = ABAP_FALSE.
    * Hide unnecessary buttons
    CALL METHOD lo_r_helper_class->set_global_options
      EXPORTING
        i_display_btn_cancel  = abap_false
        i_display_btn_check   = abap_false
        i_display_btn_reset   = abap_false
        i_display_btn_execute = abap_false.
    Finally you need to write the following code in the action of the button in order to fetch the range table selected by the user.
    DATA: lo_cmp_usage            TYPE REF TO if_wd_component_usage,
          lo_interfacecontroller  TYPE REF TO iwci_wdr_select_options,
          lo_r_helper_class       TYPE REF TO if_wd_select_options,
          rt_date                 TYPE REF TO data.
    FIELD-SYMBOLS: <fs_date> TYPE table.
    * Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
    lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Call method in used controller
    lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
    * get selected range of inspections date
    CALL METHOD lo_r_helper_class->get_range_table_of_sel_field
      EXPORTING
        i_id          = 'DATS'
      RECEIVING
        rt_range_table = rt_date.
    ASSIGN rt_date->* TO <fs_date>.
    Then you can use the value that is assigned to the field symbol <fs_date> to continue with your ALV.

  • Report selection in the prompt

    Hi Gurus,
    I have to create 3 reports from 3 subject areas and show that reports in a single prompt when i select first report other two reports should hide.
    Can any one help me how to achieve this requirement.
    Thanks,
    Rafi

    Rafi.B wrote:
    Hi Gurus,
    I have to create 3 reports from 3 subject areas and show that reports in a single prompt when i select first report other two reports should hide.
    Can any one help me how to achieve this requirement.
    Thanks,
    Rafi1) Create a prompt like this:
    Grab any CHAR column. In the "Show" window, change to "SQL Results" and enter SELECT CASE WHEN 1=0 THEN table.column ELSE 'name of first report' END FROM "your SA" UNION ALL SELECT CASE WHEN 1=0 THEN table.column ELSE 'name of second report' END FROM "your SA" UNION ALL... etc. and save this to a PV called pv_ReportName
    2) Now create a small report with two columns, one column can be any column, the second column should have in the fx window: '@{pv_ReportName}'
    3) Put a filter on the second column and have the filter equal "the name of the first report."
    This report will produce a record when the user selects the first report in the dashboard prompt.
    4) Now in your dashboard, move the first report in a Section.
    5) Click on the Properties button for the Section and select Guided Navigation.
    6) Point this to the small report you built.
    This section will show only when the first report is selected in the dashboard prompt.
    7) Repeat the above steps for the second, third, etc., reports you have.
    That's how you do it.

  • Reports Select Option

    Hi all,
         I have a task - i have to  use "SELECT-OPTIONS of one program into select statements of another program, Please solve my problem.
    Thanks in advance
                                                 Ranjith

    Hi Ranjit,
    Try using SUBMIT option with the addition SELTAB.
    You can also pass the select options along with the SUBMIT statement. Take a look at the help.
    Code used to populate 'select-options' & execute report 
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    * load each personnel number accessed from the structure into
    * parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    Cheers
    VJ
    Message was edited by: Vijayendra  Rao

  • CR 2008 - Optional parameter prompts

    Hi!
    I sometimes use Optional parameter prompts in Crystal Reports 2008.
    The main reason is to minimise user input in Selection Criteria Screen.
    I have many subreports, and not all prompts are needed for all subreports.
    If the user leaves the prompt blank, then a formula will set a default value for the user.
    I usually put the optional prompt at the top, so that user needs only fill prompts at the bottom.
    Here is an example:
    I have a parameter field called "PreferredSortOrder"
    The Edit screen reads as follows:
    Type: String
    List of Values: Static
    Value:
        Original Order
        Description
    Value Options:
    Show on (Viewer) Panel           : Read Only
    Prompt Text                              : Preferred Sort Order [Optional]
    Prompt With Description Only  : True
    Optional Prompt                        : True
    Default Value                             :
    Allow custom values                 : False
    Allow multiple values                 : False
    Allow discrete values                 : True
    Allow range values                     : False
    Min Length                                  :
    Max Length                                  :
    Edit Mask                                   :
    Show value or Description        : Show Value
    My report works perfectly, even if I leave the parameter field blank
    I now add another parameter field called "WhichWarehouse"
    with exactly the same values as above.
    When I run the Crystal Report, I get this message;
    Error running Crystal Reports
    The report runs only if I type a value in the "WhichWarehouse" prompt
    (The "PreferredSortOrder" prompt remains blank)
    I did exactly the same as before. Why does the 2nd optional parameter not work like the first?
    What has gone wrong?
    Thank you
    Leon Lai
    JUST ADDED
    I just noticed that in the Field Explorer,
    (a) There is a green TICK near the parameter PreferredSortOrder
    (b) But no green Tick neat the parameter "WhichWarehouse"
    What does the green tick mean?
    Could this be the key to the mystery?

    Hi Leon,
    No green tick means that the prompt has Not been used in the report.
    If the report has Subreports, and if the subreport also has a 'warehouse' prompt then it could be this prompt that is causing the issue. You should link both the warehouse prompts to make sure you're only prompted once.
    -Abhilash

  • PS report: multible selection for report selection criteria

    Is there a possibility to define multible selections in the report selection variables of a PS hierarchy report?
    I tried to define them via
    CJE6 -> EDIT -> General data selction
    and entered valiables in the FROM column and the TO column. But when I execute the report it will not show multible selction, but only single selection. Also, I did not find a SAP standard report which has multible selection in the report selection criteria screen.
    I found the multible selections only in the DB profile selection screen and the dynamic selection, but that is not the solution I am searching for.
    Can anybody kindly help me with this?

    E.g. S_ALR_87013532
    here you can see multible selection in the DB profile selection group, but not in the report selection group. I would like to use multible selection in the report selection group, as mentioned above.
    I am aware of the possibility of creating a new DB profile, but this is only my option B.

  • Prompt to Report navigation - OBIEE 11g

    Hello,
    I've three tables (3 different requests) to be displayed in a page. Each of these tables has one identical column eg. project_name (but from different database tables).
    My requirement :
    1.I should have only one prompt to select the project_name at the first page
    2.Only after selecting the project_name, the page should navigate to another page which displays all the three tables
    Kindly let me know how can I get the prompt to report navigation done.
    Thanks!
    Dinesh

    Hi ,
    Only after selecting the prompt you have to show the reports means use the guided navigation.
    Only after selectiing the Project_name , you can show your tables.
    But this can be done on the same page not on other page as you needed.
    Also check the below link may be helpful to you
    OBIEE 11G - Navigation:How to open in New page/new tab.
    Thanks,
    Ananth

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

  • Using @Prompt in the SELECT clause (?)

    Post Author: faltinowski
    CA Forum: Semantic Layer and Data Connectivity
    Product:  Business Objects
    Version:  6.5 SP3 
    Patches Applied:  MHF11 and CHF48
    Operating System(s):  Windows
    Database(s):  Oracle
    Error Messages:  "Parse failed: Exception: DBD, ORA-00903 invalid table name  State N/A"
    Hi!  I'm bewildered -- we have an object that parses but when I try to reproduce this object, it does not.
    We have a universe that's been in production for several years using an object developed by another designer who's no longer with the company.  This object is a dimension, datatype is character, and there's no LOV associated.  The SELECT statement in this object is
    decode(@Prompt('Select Snapshot Month','A','Object Definitions\CY Month Snapshot',MONO,CONSTRAINED),'00-Previous Month',to_number(to_char(add_months(sysdate,-1),'MM')),'01-Current Month',to_number(to_char(add_months(sysdate,0),'MM')),'01-January','1','02-February','2','03-March','3','04-April','4','05-May','5','06-June','6','07-July','7','08-August','8','09-September','9','10-October','10','11-November','11','12-December','12')
    This object parses. The client uses the object in the select clause to capture the "month of interest" for the report.  So the report may be for the entire year's data which is graphed to show trends, but there's a table below the graph which is filtered to show just the month of interest.  Typically they use the value "00-Previous Month" so they can schedule the report and it will always show the last month's data.
    Problem
    The original object parses.
    If I copy the object within the same universe, it parses.
    If I copy the code into a new object in the same universe, it doesn't parse
    If I copy the code into a new object in a different universe, it doesn't parse
    If I copy the object to a different universe, then edit the LOV reference, it doesn't parse
    If I create any new object having @Prompt in the SELECT statement, it doesn't parse.
    If another designer tries - they get the same thing.
    What am I missing?  Obviously someone was able to create this successfully.
    On the brighter side
    The object I created in a new universe (which doesn't parse in the universe) seems to work fine in the report.

    Seems that, the prompt syntax is correct.
    But the condition is not correct.
    You are taking the prompt value and not doing anything. That could be one issue for this error.
    I believe that, you just want to capture the prompt value use it in report level and do not want to apply as a filter.
    So, use the condition as follows.
    @Prompt('Select Grouping','A',{'A','B','C'},mono,constrained) = @Prompt('Select Grouping','A',{'A','B','C'},mono,constrained)
    Hope this helps!

  • Prompts in Reports similar to Pre-built reports??

    Hi All,
    There is a pre-built report called 'Top 10 opportunities' in 'Pipeline Analysis'. When we execute the report, it shows the prompts at the top (Fiscal Quarter, Fiscal year, Region). And depending upon the value user selects in these prompts the report data changes
    I copied this report in different folder and tried to execute it through there. But then it don't give this prompts as in pre-built reports. Do you know how to connect these kind of prompts to the reports??
    I tried to create a Dashboard prompt and link it to the report. But then it only works if I execute it through dashboard and if tried to execute the report from Report Tab then it does not show this prompts.
    Please let me know if you have any input/suggestion on this
    Thanks & Regards
    S

    Hi All,
    I don’t think pre built reports are designed using narrative reports. I think these are designed by using dashboard prompts. We could do the same and design a dashboard page with prompt on top but it will not work in direct report.
    The alternate to do the similar prompts in report is by using the pivot table view (but pivot view will work if you have at least one matrix field). So in pivot view you can define the prompts on top and filter the report by that. But the disadvantage of pivot prompts compare to dashboard prompts is, these will be slow.
    Try out by pivot view. Hope should help
    Dinesh
    CRMIT

  • Object text not coming in report selection screen

    Hi,
    i have an object task type for which text has been loaded.this is included in one reports selection screen.But in F4 only kee is displayed and not text.If check button is pressed text is displayed besides key.Also text doesnt come after report is executed.
    please help.
    Thanks,
    Prasanna N.

    Hi Prasanna,
    In the Query Designer goto the properties of the required object that you want to display key and text for it, Select the Key and Text Display option. Then you can see in report key and text for that object.
    Hope this helps.
    Veerendra.

  • Hiding of Select Options in screen based on selection in selection list box

    Hi People,
             I have a screen where i have put a selection list box, it is pre-filled with values, Now based on the value which user selects, I want to show/hide some select-options fields. I have declared the select options in the top include of my program,
    SELECT-OPTIONS: so_user FOR ls_rsp_user-user_id MODIF ID 222,
                    so_userg FOR ls_rsp_usergrp-user_grp_id MODIF ID 333,
                    so_ccode FOR ls_vdmp-bukrs MODIF ID 444,
    then in the PBO of my screen, I have written a module, set screen in which I loop over screen & check the group id's
    LOOP AT SCREEN.
        IF screen-group1 = '111'.
          IF gv_hier_resp_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
        ELSEIF screen-group1 = '222'.
          IF gv_user_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
        ELSEIF screen-group1 = '333'.
          IF gv_user_group_fields_flag IS NOT INITIAL.
            screen-active = 1.
          ELSE.
            screen-active = 0.
        ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    I am setting some flags based on the value which user selects in the selection list box, When I debugged I found that the flags were being set correctly, but the screen group value never set to '222' or '333', these are id's i have used for select options. Hence I am unable to hide/show the select options fields.  Kindly suggest some solutions for this.
    Thanks & Regards,
    Deepak

    then in the PBO of my screen
    Your SELECT-OPTIONS are defined in a SELECTION-SCREEN so the PBO actions must be maintained in a AT SELECTION-SCREEN OUTPUT block.
    I suppose the selection-screen is a subscreen, if you dont want to get unwanted interactions with a main selection-screen of the report, check sy-dynnr
    AT SELECTION-SCREEN OUTPUT.
       CASE sy-dynnr.
         WHEN '1000'. " main screen of report
         WHEN '0100'. " selection-screen defined as subscreen
           LOOP AT SCREEN.
             CASE SCREEN-GROUP1.
               WHEN '111'.
             ENDCASE.
           ENDLOOP.
       ENDCASE.
    Regards,
    Raymond

  • Currency type option needed for copa report

    Dear Experts,
    Currency type option needed for copa report.I have checked all the possibilities in ke35 as well.
    how to add curreny type in selection screen for COPA reports.
    regards
    RK

    If you want to create your own report with required currency,
    T CODE - KE35 - Click on "Report" (create), next window appears
    Give the name of the report and description
    The u see 2 options
    1. Basic report
    2. Report with Form
    Select which ever you want and press ENTER
    Here you need to prepare the report format and fields which are there in the right side box
    Hope it helps
    Thanks

  • Problen in report selection screen

    Hi ,
    I had a problem in the report.In the report selection screen user asking to keep page no option.So when they select the page no in the selection screen,so from that page number report out put should display.
    how to do this.
    Thanks,

    If you generating the LIST using the classical approch you cah use the SCROLL LIST keyword for this purpose.
    Like:
    DATA: L_PAGENO TYPE I.
    L_PAGENO = 3.
    START-OF-SELECTION.
      DO 100 TIMES.
        WRITE: / SY-ABCDE.
      ENDDO.
      SCROLL LIST INDEX 0 TO: PAGE L_PAGENO.
    TOP-OF-PAGE.
      WRITE: 'Top-of-page'.
    Regards,
    Naimesh Patel

Maybe you are looking for

  • Flatten Fields for Acrobat Reader Users

    I've created a 6 page form in Acrobat Pro 9 with a bunch of fields. I need to send this form to my client who only has Acrobat reader. They need to fill in the form then they need to flatten all fields in order to send it out - basically, the form en

  • My points are not displayed correctly

    Hi, My SDN points are actually 282. But now it's displaying 0. Is it some technical problem or is there some reason behind deleting my points. I request the moderators to look at this once. Thanks, Sri. Problem Solved Edited by: Sri on Dec 7, 2009 11

  • Sbo-common_log.ldf

    running 2007 SBO The above file is now 32GB!!!!! can we take action to delete file and reset back up conditions?

  • Can't uninstall fire fox 34.0.5

    Using windows 7 can not uninstall fire fox I have try many times by restoring at numberous date etc. but can't get out of computer.

  • How do I change the http connection type from close to keep-alive

    I am using a browser that appears as though it needs a connection type of keep-alive. When a page is requested the server sends back a connection type of close. It appears images are not requested from the server when this connection type is requeste