LOV depending on value of field in report

I have a report on a query. In one of the fields I want to have a Radio Group, Based on query based LOV. The values in the LOV depends on the value in the field in the report. Is this possible, and how do I define the LOV for it?
Would it be something like:
select disp_val d, id r
from my_table
where field_x = [value_of_this_field_in_my_report]
order by 1What do I fill in for [value_of_this_field_in_my_report]?

Please refer to Metalink note 825603.1.

Similar Messages

  • Multi-record report: content LOV depending on value of current row

    I have a multi-record report based on a query.
    For each row in the report it should be possible to choose a value from lov.
    The content of the lov is depending on a field in the current row.
    Later on I will update a record based on the chosen value but that is not the
    issue right now.
    The problem I am facing is that I don't know how to refer in a list to a value
    from the current row.
    For example.
    In the example below it should be possible to choose (from the lov) a best buddy for
    an employee. The buddy should be an other employee working for the same department.
    So in the lov I must refer to the deptno from the current row. How is this possible???
    select empno
    , ename
    , deptno
    , htmldb_item.select_list_from_query
    ( 1
    , empno
    , 'select ename, empno from emp where deptno = #deptno# '
    ) buddy
    from emp

    Hi Scott,
    I've created this application "TestLov" at the site you mentioned.
    Application ID : 800
    Workspace Name : ANUWKSPC
    The first page has an employee report with the solution as suggested by Raju Mattamal in this thread. That query seems to work fine without any errors...(I'm surprised why I'm getting errors on my application with the same query, even though data appears?! Is it to do with some setting?)
    The second page has the report with my actual query. This is throwing errors.
    On the third page I've tried to implement the solution you've suggested in Tips & Tricks section of HTML DB Studio(Simulating a correlated sub-query in report LOVs)
    http://htmldb.oracle.com/pls/otn/f?p=18326:54:2188928890822530056::::P54_ID:1282
    This doesn't seem to work either.
    I'm unable to figure out the problem.
    Pls look into the application and let me know how I shld go abt this.
    Thanks in advance,
    Anu

  • ALV sums of lines depending on value of field of the line?

    Hi,
    We have an ALV and would like to get the sums depending on the value of a field of each line.
    For example: imagine we have an ALV, and there are two kinds of lines: one have a counter=1, and others have a counter=2. Is it possible to receive two totals in the ALV, one for the lines that have counter=1, and one for the lines that have counter=2? And that when a filter is being applied, the sums change automatically?
    Thx!

    Hi,
    Please the below code which ill help to change the subtotal text, you need do manula total and replace with the wa of the subtotal with you calculated sum. In the below code i replaced a break point where you need to add your coding
    *& Report  Z_ALV_SUBTOTAL
    REPORT Z_ALV_SUBTOTAL.
    *& Table declaration
    TABLES: EKKO.
    *& Type pool declaration
    TYPE-POOLS: SLIS. " Type pool for ALV
    *& Selection screen
    SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.
    *& Type declaration
    *Type declaration for internal table to store EKPO data
    TYPES: BEGIN OF X_DATA,
           EBELN  TYPE CHAR30,  " Document no.
           EBELP  TYPE EBELP,   " Item no
           MATNR  TYPE MATNR,   " Material no
           MATNR1 TYPE MATNR,   " Material no
           WERKS  TYPE WERKS_D, " Plant
           WERKS1 TYPE WERKS_D, " Plant
           NTGEW  TYPE ENTGE,   " Net weight
           GEWE   TYPE EGEWE,   " Unit of weight
           END OF X_DATA.
    *& Internal table declaration
    DATA:
         * INTERNAL TABLE TO STORE EKPO      DATA
    I_EKPO TYPE STANDARD TABLE OF X_DATA INITIAL SIZE 0,
    Internal table for storing field catalog information
    I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    Internal table for Top of Page info. in ALV Display
    I_ALV_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
    Internal table for ALV Display events
    I_EVENTS TYPE SLIS_T_EVENT,
    Internal table for storing ALV sort information
    I_SORT TYPE  SLIS_T_SORTINFO_ALV,
    I_EVENT TYPE SLIS_T_EVENT.
    *& Work area declaration
    DATA:
    WA_EKKO TYPE X_DATA,
    WA_LAYOUT     TYPE SLIS_LAYOUT_ALV,
    WA_EVENTS         TYPE SLIS_ALV_EVENT,
    WA_SORT TYPE SLIS_SORTINFO_ALV.
    *& Constant declaration
    CONSTANTS:
    C_HEADER   TYPE CHAR1 VALUE 'H',                    "Header in ALV
    C_ITEM     TYPE CHAR1 VALUE 'S'.
    *& Start-of-selection event
    START-OF-SELECTION.
    Select data from ekpo
      SELECT EBELN " Doc no
      EBELP " Item
      MATNR " Material
      MATNR " Material
      WERKS " Plant
      WERKS " Plant
      NTGEW " Quantity
      GEWEI " Unit
      FROM EKPO
      INTO TABLE I_EKPO
      WHERE EBELN IN S_EBELN
      AND NTGEW NE '0.00'.
      IF SY-SUBRC = 0.
        SORT I_EKPO BY EBELN EBELP MATNR .
      ENDIF.
    * TO BUILD THE PAGE HEADER
    PERFORM SUB_BUILD_HEADER.
    * TO PREPARE FIELD CATALOG
      PERFORM SUB_FIELD_CATALOG.
    * PERFORM TO POPULATE THE LAYOUT STRUCTURE
      PERFORM SUB_POPULATE_LAYOUT.
    * PERFORM TO POPULATE THE SORT TABLE.
      PERFORM SUB_POPULATE_SORT.
    PERFORM TO POPULATE ALV EVENT
      PERFORM SUB_GET_EVENT.
    END-OF-SELECTION.
      * PERFORM TO DISPLAY ALV REPORT
      PERFORM SUB_ALV_REPORT_DISPLAY.
    *&      Form  sub_build_header
          To build the header
          No Parameter
    FORM SUB_BUILD_HEADER .
      * LOCAL DATA DECLARATION
      DATA: L_SYSTEM     TYPE CHAR10 ,          "System id
      L_R_LINE     TYPE SLIS_LISTHEADER,   "Hold list header
      L_DATE       TYPE CHAR10,           "Date
      L_TIME       TYPE CHAR10,           "Time
      L_SUCCESS_RECORDS TYPE I,           "No of success records
      L_TITLE(300) TYPE C.                "Title
    Title  Display
      L_R_LINE-TYP = C_HEADER.               " header
      L_TITLE = 'Test report'(001).
      L_R_LINE-INFO = L_TITLE.
      APPEND L_R_LINE TO I_ALV_TOP_OF_PAGE.
      CLEAR L_R_LINE.
    * RUN DATE DISPLAY
      CLEAR L_DATE.
      L_R_LINE-TYP  = C_ITEM.                " Item
      WRITE: SY-DATUM  TO L_DATE MM/DD/YYYY.
      L_R_LINE-KEY = 'Run Date :'(002).
      L_R_LINE-INFO = L_DATE.
      APPEND L_R_LINE TO I_ALV_TOP_OF_PAGE.
      CLEAR: L_R_LINE, L_DATE.
    ENDFORM.                    " sub_build_header
    *&      Form  sub_field_catalog
          Build Field Catalog
          No Parameter
    FORM SUB_FIELD_CATALOG .
      *  BUILD FIELD CATALOG
      PERFORM SUB_FILL_ALV_FIELD_CATALOG USING:
                '01' '01' 'EBELN'  'I_EKPO' 'L'  'Doc No'(003) ' ' ' ' ' ' ' ',
                '01' '02' 'EBELP'  'I_EKPO' 'L'  'Item No'(004) 'X' 'X' ' ' ' ',
                '01' '03' 'MATNR'  'I_EKPO' 'L'  'Material No'(005) 'X' ' ' ' ' ' ',
                '01' '03' 'MATNR1' 'I_EKPO' 'L'  'Material No'(005) ' ' ' ' ' ' ' ',
                '01' '04' 'WERKS'  'I_EKPO' 'L'  'Plant'(006) 'X' ' ' ' ' ' ',
                '01' '04' 'WERKS1' 'I_EKPO' 'L'  'Plant'(006) ' ' ' ' ' ' ' ',
                '01' '05' 'NTGEW'  'I_EKPO' 'R'  'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.
    ENDFORM.                    " sub_field_catalog*
    *&     Form  sub_fill_alv_field_catalog
    *&     For building Field Catalog
    *&     p_rowpos   Row position
    *&     p_colpos   Col position
    *&     p_fldnam   Fldname
    *&     p_tabnam   Tabname
    *&     p_justif   Justification
    *&     p_seltext  Seltext
    *&     p_out      no out
    *&     p_tech     Technical field
    *&     p_qfield   Quantity field
    *&     p_qtab     Quantity table
    FORM SUB_FILL_ALV_FIELD_CATALOG  USING  P_ROWPOS    TYPE SYCUROW
                                            P_COLPOS    TYPE SYCUCOL
                                            P_FLDNAM    TYPE FIELDNAME
                                            P_TABNAM    TYPE TABNAME
                                            P_JUSTIF    TYPE CHAR1
                                            P_SELTEXT   TYPE DD03P-SCRTEXT_L
                                            P_OUT       TYPE CHAR1
                                            P_TECH      TYPE CHAR1
                                            P_QFIELD    TYPE SLIS_FIELDNAME
                                            P_QTAB      TYPE SLIS_TABNAME.
      * LOCAL DECLARATION FOR FIELD CATALOG
      DATA: WA_LFL_FCAT    TYPE  SLIS_FIELDCAT_ALV.
      WA_LFL_FCAT-ROW_POS        =  P_ROWPOS.     "Row
      WA_LFL_FCAT-COL_POS        =  P_COLPOS.     "Column
      WA_LFL_FCAT-FIELDNAME      =  P_FLDNAM.     "Field Name
      WA_LFL_FCAT-TABNAME        =  P_TABNAM.     "Internal Table Name
      WA_LFL_FCAT-JUST           =  P_JUSTIF.     "Screen Justified
      WA_LFL_FCAT-SELTEXT_L      =  P_SELTEXT.    "Field Text
      WA_LFL_FCAT-NO_OUT         =  P_OUT.        "No output
    WA_LFL_FCAT-TECH           =  P_TECH.       "Technical field
    WA_LFL_FCAT-QFIELDNAME     =  P_QFIELD.     "Quantity unit
    WA_LFL_FCAT-QTABNAME       =  P_QTAB .      "Quantity table
      IF P_FLDNAM = 'NTGEW'.
        WA_LFL_FCAT-DO_SUM  = 'X'.
      ENDIF.
      APPEND WA_LFL_FCAT TO I_FIELDCAT.
      CLEAR WA_LFL_FCAT.
    ENDFORM.                    " sub_fill_alv_field_catalog
    *&      Form  sub_populate_layout
          Populate ALV layout
          No Parameter
    FORM SUB_POPULATE_LAYOUT .
      CLEAR WA_LAYOUT.
      WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'." Optimization of Col width
    ENDFORM.                    "SUB_POPULATE_LAYOUT
    " sub_populate_layout
    *&      Form  sub_populate_sort
          Populate ALV sort table
          No Parameter
    FORM SUB_POPULATE_SORT .
      * SORT ON MATERIAL
      WA_SORT-SPOS = '01' .
      WA_SORT-FIELDNAME = 'MATNR'.
    WA_SORT-TABNAME = 'I_EKPO'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO I_SORT .
    CLEAR WA_SORT."* SORT ON PLANT
    WA_SORT-SPOS = '02'.
    WA_SORT-FIELDNAME = 'WERKS'.
    WA_SORT-TABNAME = 'I_EKPO'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT .
    CLEAR WA_SORT.
    ENDFORM.                    " sub_populate_sort
    *&      Form  sub_get_event
          Get ALV grid event and pass the form name to subtotal_text
          event
          No Parameter
    FORM SUB_GET_EVENT .
      CONSTANTS : C_FORMNAME_SUBTOTAL_TEXT TYPE SLIS_FORMNAME VALUE 'SUBTOTAL_TEXT'.
      DATA: L_S_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 4
        IMPORTING
          ET_EVENTS       = I_EVENT
        EXCEPTIONS
          LIST_TYPE_WRONG = 0
          OTHERS          = 0.
      * SUBTOTAL
      READ TABLE I_EVENT  INTO L_S_EVENT WITH KEY NAME = SLIS_EV_SUBTOTAL_TEXT.
      IF SY-SUBRC = 0.
        MOVE C_FORMNAME_SUBTOTAL_TEXT TO L_S_EVENT-FORM.
        MODIFY I_EVENT FROM L_S_EVENT INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    "SUB_GET_EVENT
    " sub_get_event
    *&      Form  sub_alv_report_display
          For ALV Report Display
          No Parameter
    FORM SUB_ALV_REPORT_DISPLAY .
      DATA: L_REPID TYPE SYREPID .
      L_REPID = SY-REPID .
    * THIS FUNCTION MODULE FOR DISPLAYING THE ALV REPORT
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = L_REPID
         I_CALLBACK_TOP_OF_PAGE = 'SUB_ALV_TOP_OF_PAGE'
         IS_LAYOUT              = WA_LAYOUT
          IT_FIELDCAT            = I_FIELDCAT
          IT_SORT                = I_SORT
          IT_EVENTS              = I_EVENT
         I_DEFAULT              = 'X'
         I_SAVE                 = 'A'
        TABLES
          T_OUTTAB               = I_EKPO
        EXCEPTIONS
          PROGRAM_ERROR          = 1
          OTHERS                 = 2.
      IF SY-SUBRC <> 0.
       MESSAGE i000 WITH 'Error in ALV report display'(055).
      ENDIF.
    ENDFORM.                    " sub_alv_report_display
          FORM sub_alv_top_of_page
          Call ALV top of page
          No parameter
    FORM SUB_ALV_TOP_OF_PAGE.                                   "#EC CALLED
    To write header for the ALV
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         IT_LIST_COMMENTARY = I_ALV_TOP_OF_PAGE.
    ENDFORM.                    "alv_top_of_page
    *&      Form  subtotal_text
          Build subtotal text
          P_total  Total
          p_subtot_text Subtotal text info
    FORM SUBTOTAL_TEXT CHANGING
                   P_TOTAL TYPE ANY
                   P_SUBTOT_TEXT TYPE SLIS_SUBTOT_TEXT.
    Material level sub total
      IF P_SUBTOT_TEXT-CRITERIA = 'MATNR'.
        P_SUBTOT_TEXT-DISPLAY_TEXT_FOR_SUBTOTAL  = 'Materia  l'(009).
        BREAK-POINT.
    here calucate the total and change the p_total    
      ENDIF.
      * PLANT LEVEL SUB TOTAL
      IF P_SUBTOT_TEXT-CRITERIA = 'WERKS'.
        P_SUBTOT_TEXT-DISPLAY_TEXT_FOR_SUBTOTAL = 'Plant level total'(010).
      ENDIF.
    ENDFORM.                    "subtotal_text

  • Change Value in one LOV depending on value in another LOV

    hi forum.
    i have two Lov's. The first has continents and second has countries. my design is when user select continent, related countries should show up. now i can do that when i submit on the change of continent LOV very easily but, i dont want to refresh or reload the page as some other functions are disturbed by this, i want the countries values to change with out page being reloaded. please let me know how can i do it. i m a dumb ass so answers like "use dynamic action" or "user java script" are no different than ancient Greek to me. so plz reply elaborately as a matter of compassion.
    thanks in advance.

    Hi
    Can u pls try like this,
    Two Lov's Namely P1_Continent and P1_Country
    In the second Lov P1_country Please refer Cascading LOV Parent Item(s)="P1_continent" and make Optimal refresh as yes.
    and are using the select statement for second lov like this
    Select country from table_name where continent=:P1_country.
    Can pls make change in the List lov ie P1_continent Null Display Value=- select Continent-.
    Hopes this might you.
    Thanks & Regards
    Srikkanth.M

  • Authority to change entries through SM30 depending on values of fields?

    Hi.
    Is it somehow possible to set authorizations in a way, that a user could change only certain entries in a customizing table using SM30? What I want to achieve with this - we have an internationally used system, where consultants from different countries are working often on the same customizing tables and we would like to restrict tham to be able to change records only relevant for those countries, so they cannot change the records for other countries by mistake / on purpose. The records are usually identified by a certain "grouping" field (for instance MOLGA in table T511K or MOABW in T554S).
    So far I couldn't find anything apart from the S_TABU_DIS object, which is too rough for this requirement.
    Or maybe is there another way to achieve security in such a scenario?
    Thanks in advance for any ideas.

    Hi Dusan,
    You can restrict access to tables by business organizational units using the
    Line-oriented authorizations introduced in Release 4.6C. You could previously
    only use the authorization objects S_TABU_DIS and S_TABU_CLI to allow or
    prevent access to complete tables.
    The introduction of organizational criteria allows you to restrict user access
    to parts of a table. The authorization object <b>S_TABU_LIN</b> has been
    introduced for this purpose.
    One possible use for line-oriented authorizations would be that a user can
    only display and change the contents of a particular work area, e.g. a
    country or plant, in a table.
    See the IMG documentation under Basis ---> System administration ---> Users and authorizations ---> Line-oriented authorizations.
    <u>Following are the fields present:</u>
    Activity
    Organization criterion for key
    Org. crit. attribute 1
    Org. crit. attribute 2
    Org. crit. attribute 3
    Org. crit. attribute 4
    Org. crit. attribute 5
    Org. crit. attribute 6
    Org. crit. attribute 7
    Org. crit. attribute 8
    Hope it helps.
    Please award points if it is useful.
    Thanks & Regards,
    Santosh

  • How could I pass parameter that depend on values in report from report to form?

    In my case, I want to pass 'gno' and 'qno' values of report
    to form. When click on the button then the form is showed.
    There are automatically values in gno field on form so that user
    don't complete this filed.
    So I create a button on the report . I enter Javascript in
    PL/SQL Code tab in '...after displaying the footer' as follow :
    htp.formOpen
    (owa_util.get_owa_service_path||'portal30.wwa_app_module.link?
    p_arg_names=_moduleid&p_arg_values=1736929105&p_arg_names=_show_h
    eader&p_arg_values=YES&p_arg_names=GNO&p_arg_values=1&p_arg_names
    =QNO&p_arg_values=2');
    htp.formSubmit(null,'New Answer');
    htp.formClose;
    The above code can pass only static value, while I want to
    pass values that depend on value in column of report to form.
    So please tell me how can I pass this value to form. I look
    forward to hearing from all of you. Please!!!!!!
    Thank You

    Thanks for the prompt reply.
    Yes. I am using a Custom Step Type.
    I have attached a trial code which contains the trial VI, sequence and the type palette ini file.
    Please have a look at it.
    Regards,
    Mirash
    Attachments:
    Injection trial.zip ‏35 KB

  • Cascading LOVs (APEX 4.1) problem, using in report does not set values

    Hi,
    i am using APEX 4.1.0.00.32 and i have a simple report as
    SQL:*
    SELECT * from region
    WHERE region like '%'||P3_REGION||'%'
    and country like '%'||P3_COUNTRY||'%'
    and city like '%'||P3_CITY||'%'
    Items:*
    P3_REGION:
    select distinct region as d, region as r from region
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    P3_COUNTRY:
    select distinct country as d, country as r from region where region = :P3_REGION
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    Cascading LOV Parent Item(s): P3_REGION
    P3_CITY:
    +select distinct city as d, city as r from region where country = :P3_COUNTRY
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    Cascading LOV Parent Item(s): P3_COUNTRY
    The LOVs work fine and the correct values are displayed if cascading through them
    So in the last step i want to filter the report with the values that were selected in the lovs. And this i get not working.
    I tried to add a button with SUBMIT of the page. After choosing values in all LOVs and clicking the SUBMIT button the page submits, alle LOVs are cleared (with value - select -) and the report shows all rows.
    I tried to change the button to "redirect to Page 3" and setting the values P3_REGION, P3_COUNTRY, P3_CITY to &P3_REGION., &P3_COUNTRY., &P3_CITY. but without success.
    I tried to use the setting "Page Action when Value Changed" to "Submit" and/or "Redirect and set value" for all Item LOVs and/or only the last item LOV, but then the cascade of the LOVs does not work properly and the report does not change too.
    I am confused as i don´t know what i can do until now. I think this should be an easy requirement to limit/filter the report with values in the LOVs.
    Furthermore it should be possible to choose only the region LOV and then limit the report with that region (without choosing country and city)
    Thanks in advance!

    Hi Dan,
    thank you for your answer. I have the solution now from Kleber_M, this works.
    Dan McGhan wrote:
    1. Use bind variables in my query. It would look something like:
    SELECT *
    FROM region
    WHERE region LIKE '%'|| :P3_REGION ||'%'
    AND country LIKE '%'|| :P3_COUNTRY ||'%'
    AND city LIKE '%'|| :P3_CITY ||'%'
    This was only a mistake when writing the post, i forgot the colon. I use bind variables of course.
    2. Make sure you have a comma separated list of item names that the report depends on beneath the SQL Query where it says Page Items to Submit. This will make sure that the value of those items on the page are bound into session state prior to the query executing.I tried this, too, but without success...
    3. Use Dynamic Actions to perform the refresh action when any of the three items changes. This would be both more performant and a better experience for the end user than a full page refresh.How can i do this. This sounds good, because when refreshing the page often some items oder actions are done that i don´t want to.
    Regards,
    Matze

  • Get value of field object when I double click on any column of report

    Hi,
    We are converting our projects from .NET 2003 to .Net 2008 and upgrading reports10 to crystal reports 2008 and changing our Active x report viewer control  to crystal report viewer.
    We donu2019t use reports just to see and print the data. Our use is a bit more.
    As we were using Active X Control (CRAXDDRT) to perform different operations
    Following are some functions which are included in our requirements:
    1-     We need the columns width to be flexible which we can changed in the code dynamically according to the users wish
    2-     Setting text of some fields dynamically from .Net code
    3-     Hide and show the columns dynamically from .Net code
           Upto here we are done using crystal report 2008 and .net 2008
           Now we are stuck with problem
    4-     When we double click on fieldobject at runtime we are able to fetch the value of field object by using e.objectinfo.text.tostring, so far it is perfect
    But we have different situation here and need a solution for this
    I have two fields like Account ID and Account Description
    I need the solution so that when user clicks either on Account ID or Account Description I should be able to fetch the Field object value of Account ID Column only so that i will be able to open different forms and reports based on that ID
    As we were doing it before using Active X Control the code snippet is giving below
    case "Field: Account. AccountID ", "Field: Account.Description"
    GlobalCode = GiveCode(mYFields.Item(1).value) '------ Where 1 refer to Account ID, so in both cases either we click Account ID or Description Field at run time we are able to return the account ID field value.
    so we need solution some thing like that please do let us know how we can do that
    For Your reference we were using CrystalActivexReportViewerLib10.CRVFields obejct to fectch the report values
    Thanx in Advance
    Regards,
    Arshad Hussain Bhatt

    Hello,
    I am getting value of that cell where I am clicking. But I need the value of other columns also in that particular row where I double clicked. For this I gave one example also that suppose I have a report where there are two columns. One is AccountID and other is AccountDescription. Now if I click on Account ID I get the value of AccountID and when I click on AccountDescription I get the value of AccountDescripiton This is oK n good but I want that If i double click on AccountDescription I should be able to get the value of AccountID also.Please tell me is there anyway to do so?
    We did so when we were using CRAXDRT.Report Bellow is the code snippet for how I did it in that.
    Dim MyField As CrystalActiveXReportViewerLIb10.CRVFields
    Private Function GiveFieldIndex(ByVal As CrystalActiveXReportViewerLib10.CRVFields, ByVal FldName As String) As Integer
    For i as integer = 1 To FldArry.Count
        If FldArry.Item(i).name = FldName Then
                    GiveFieldIndex = i
          End If
    End Function
    Private Sub CRViewer1_DoubleClick(ByVal eventSender As System.Object, ByVal eventArgs As AxCrystalActiveXReportViewerLib10._ICRViewerEvents_DblClickedEvent) Handles CRViewer1.DblClicked
    If MyField.Name = "Field: AdoJV.AccountID" Or MyField.Name = "Field: AdoJV.AccountDesc" Then
    /Following line will give us AccountID in anycase either we click on AccountID or Account Desc or even you can add more column by adding Or Operator. We need something like this in Crystal Report 2008/
      Dim GlobeAddEditCode  as String = myFields.Item(GiveFieldIndex(myFields, "Field: AdoJV.AccountID")).Value
    End If
    End Sub
    Regards,
    Arshad Hussain Bhatt
    Edited by: arshhb on Oct 31, 2009 6:44 AM
    Edited by: arshhb on Oct 31, 2009 7:09 AM
    Edited by: arshhb on Oct 31, 2009 7:13 AM

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • Assigning value to field in proxy report

    Hello,
    I am writing the abap report for sproxy.
    The link to the field in structure is very long.
    e.g. it-fault_message_mt-request-calldata-requester-gid = 'Z12345'.
    In the structure one field in calldata is ADDITIONAL_ATTRIBUTE which is of table type.
    I want to assign values to the fields of ADDITIONAL_ATTRIBUTE.
    When I click on field ADDITIONAL_ATTRIBUTE we can see line type ZFAULT_MESSAGE_ADDITIONAL_ATTR and this line type is having NAME as on of the field.
    I want to pass value to field NAME.
    Regards,
    Neelambari

    Hi,
    Create a work area as line type. and loop at table type into work area.
    *wa like line type
    *loop at table_type into wa.
    *wa-name = Value.
    *append wa to target table type.
    ****target table type structure should be  same as that of source table type. *****
    Sachin

  • 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 Get checkbox value when List value changed in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    regards
    Ahmed

    Hi Ahmed,
    >
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    >
    You should not create checkboxes like this. Either use the APEX_ITEM.CHECKBOX2 API or change the Column Type to Simple Checkbox.
    >
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    >
    name="f01" returns an array, what you need is single element value.
    Try
    <script type="text/javascript>
    function test(pThis) {
      var f01_value = $v(pThis);
       alert('#SEQ : '+ f01_value);
    </script>
    {code}
    {quote}
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    {quote}
    Depends in how you are invoking/triggering the change event. Are you using DA or have you written an "onchange" event on the element?
    Cheers,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to disable the link to subreports depending upon value

    Hi,
    We have a table in ssrs reports where we are showing failed, success and cancelled status. for come condition.
    now for failed we are going to subreports as we are passing some parameter from parent report.
    but for success and cancelled we don't want to go that subreport.(problem is its going to the subreport)
    this status are coming in the same cell depending some condition.
    any body has idea how to do it
    simanta

    Hi fanu987,
    As per my understanding, there is a field includes three values: failed, success and cancelled. If the value of field is failed, you want to jump to the subreport when you click the field. Otherwise, it will not jump to the subreport. If that is the case,
    we can use Go to URL action to achieve your goal. For detail information, please refer to the following steps:
      1. In design mode, right-click the text box and open Text Box Properties dialog box.
      2. Click Action in left pane, select Go to URL.
      3. Click (fx) button, and type the expression like below:
    =iif(Fields!FieldName.Value="failed ","http://ServerName/reportserver?/folderName/SubreportName","")
      4. Right-click the subreport in the project, then click deploy to publish the report to report manager.
      5. Right-click the master report in the project, then deploy the report to report manager. When you preview the report and click failed value, it will jump to the subreport.
    If there is any question, please feel free to ask.
    Thanks,
    Wendy Fu

  • LOV not return values more than certain limit

    Hi Guys,
    I have created 2 search fields (State, Area) in report page. Both of them are LOVs based. User select first field value, next field's LOV return values based on the first field( AJAX call). First field is states like 'VIC', 'NSW', 'SA' etc..., next field is 'Area'. when I select state other than 'NSW' in state field then next field is populated successfully. But when I select state as 'NSW' then next field is blank. 'NSW' state has records more than 100 in the table(LOV based on), but all other states have even less than 10 records. when I remove (more than 50) records of 'NSW' in the table then It works.
    Can anybody know if there is a limit of LOV that can be supported?

    Thanks Varad for reply.
    As you suggested to change gReturn = get.get('XML') to gReturn = get.get() for text values, But it is not simple as you said.
    I have found the problem. Actualy, there are some special characters in database column that suppose to return in LOV. But LOV is returned as xml object that may not support special characters (&,$, % etc...). I have put the 'replace' function in query. My query is like
    select replace(name,'&','and') d, id r
    from table1
    where val1 = :P2_val
    order by 1
    This query works in SQL WORKSHOP but not in AJAX. Any Idea? If I have to replace get.get('XML') to get.get() then what other steps I have to perform?

  • SSAS report action to pass multi-value list of dimention key values to a SSRS report parameter

    This was originally posted on StackOverflow and suggested I try here as well.
    I want to create a report action in an SSAS OLAP cube that generates a list of formatted values to pass into an SSRS report parameter that accepts a multi-valued parameter list.  This would be applied at the
    cell level in the SSAS action.  I have found a solution that gets me most of the way:
    How to Pass Multiple Values from an SSAS Report Drill Through Action to an SSRS Multi-Value Parameter, but not quite.  The action does appear in Excel and works
    if I run the action from a cell that is at or below the dimension attribute I am generating the list for, in this case,
    Account Key.
    Below is a link to a screen capture (unable to embed it due to lack of reputation) showing the action and dimension structure in Excel.  The action works as long as I run it at the
    Account Key level or below.  I want to be able to run it at higher levels, such as
    Account Major and still have it generate all then related Account Key values for the SSRS report parameter.  Running it at the higher
    Account Major level does not trigger the report to run.
    Excel Action Screen Shot:
    http://i.stack.imgur.com/QCGSp.png
    Below is the MDX I am using to generate the value for the report parameter:
    UrlEscapeFragment(
    GENERATE(
    DESCENDANTS(
    [Account].[Account Key].CurrentMember,
    [Account].[Account Key].[Account Key]
    [Account].[Account Key].CURRENTMEMBER.Name,
    "&rp:Account="
    I am hoping that I can somehow modify the MDX above to make it return all the
    Account Keys for any attribute of the Account dimension when ran from any measure cell, not just when ran at self and children of
    Account Key in the pivot table.
    Also, if it helps, I can execute the following MDX query on the cube and get the results I am looking for.
    WITH MEMBER [Measures].[Account Key List] as
    GENERATE(
    DESCENDANTS([Account].[Account].CurrentMember, [Account].[Account].[Account]),
    [Account].[Account].CURRENTMEMBER.NAME,
    "&rp:Account=")
    SELECT {[Measures].[Account Key List]} on 0,
    ([Account].[Account Company Number].[Account Company Number],[Account].[Account Major].[Account Major]
    ) on 1
    FROM [Company 10 Action Demo]
    Below are partial results:
    10.116&rp:Account=10.116.010
    10.117&rp:Account=10.117.010&rp:Account=10.117.020
    10.120&rp:Account=10.120.005&rp:Account=10.120.006&rp:Account=10.120.010&rp:Account=10.120.020&rp:Account=10.120.030&rp:Account=10.120.040&rp:Account=10.120.050&rp:Account=10.120.060&rp:Account=10.120.380&rp:Account=10.120.999
    10.123
    Questions
    Any ideas what I might need to do to get Account Key to be returned for any attribute of the
    Account dimension?
    Would I possibly have to alter my Account dimension in the cube to get this to work?
    Thanks in advance.
    Edit 1 - Adventure Works Cube Version
    I was unable to get the suggested answer with the "Exists" function to work.  To better demonstrate this issue, I have recreated it using the Adventure Works Cube.
    I will focus on the Customer dimension, specifically the Customer and
    Education attributes.  I created a report action called Test Report Action.  Below is the XML created for it in the cube.
    <Action xsi:type="ReportAction" dwd:design-time-name="f35ad5ee-5167-4fb8-a0e0-0a74cc6e81c6">
    <ID>Report Action 1</ID>
    <Name>Test Report Action</Name>
    <TargetType>Cells</TargetType>
    <Target></Target>
    <Type>Report</Type>
    <ReportServer>SQLSERVER</ReportServer>
    <Path>ReportServer?/Test Report</Path>
    <ReportParameters>
    <ReportParameter>
    <Name>Test Customer Existing</Name>
    <Value>UrlEscapeFragment(
    GENERATE(
    EXISTING DESCENDANTS(
    [Customer].[Customer].CurrentMember,
    [Customer].[Customer].[Customer]
    [Customer].[Customer].CURRENTMEMBER.Name,
    "&amp;rp:Customer="
    )</Value>
    </ReportParameter>
    </ReportParameters>
    <ReportFormatParameters>
    <ReportFormatParameter>
    <Name>rs:Command</Name>
    <Value>Render</Value>
    </ReportFormatParameter>
    <ReportFormatParameter>
    <Name>rs:Renderer</Name>
    <Value>HTML5</Value>
    </ReportFormatParameter>
    </ReportFormatParameters>
    </Action>
    Below are the steps to re-create the issue.
    Connect to the cube in Excel
    Add dimension Customer -> More Fields -> Customer
    Add measure Internet Sales -> Internet Sales Amount
    Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action" and see customer values created for URL 
    When the action is ran at this point with Customer, I see the values created in the URL shown message box (since there is no SSRS report server at location specified).
    Now the part I'm unable to resolve
    Remove the Customer dimension and add Customer -> Demographic -> Education
    Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action"
    Nothing happens. If I ran the action on the cell next to "Bachelors", I would want it to build up all the list of all the "Customers"  that make up the "Bachelors" in the
    Customer dimension as part of the report parameter.  If no attributes where used in the cube from the
    Customer dimension for that cell, then I would like it to return "All Customers", or something similar to show that all customers are included in the aggregations.
    I am not too MDX savvy, thus far.  I think I need to somehow join the
    Customers to Internet Sales Amount in the Generate function portion.  I have tried several different combinations of the
    Customer dimension and Internet Sales Amount, along with various functions to see if I could get this to work with no success.  I am hoping that someone more knowledgeable the me will have a solution.   If you need more details,
    please ask and I will provide them.

    Simon,
    Thanks for you help with this.  This morning I found a workaround.  Below describes what that is.
    What I ended up doing was getting a list of values from a degenerate dimension that I could use to pass to SSRS to get a list of transactions for a report.  Below is how I did this, in relation to the Adventure Works cube using the degenerate dimension
    Internet Order Details.
    WITH MEMBER [Measures].[Order Param List] AS
    GENERATE(
    EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
    "Internet Sales"),
    [Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
    "&rp:OrderNum=")
    SELECT {[Measures].[Order Param List], [Measures].[Internet Sales Amount]} ON 0
    ,([Date].[Calendar].[Date]) ON 1
    FROM [Adventure Works]
    This will get a list of Sales Order Number in a text string, separated by "&rp:OrderNum=" for each measure of
    Internet Sales. This would allow me to create an SSRS report to bring back detail information for each
    Sales Order Number. Below are some sample results.
    May 16, 2007 SO50493&rp:OrderNum=SO50494&rp:OrderNum=SO50495&rp:OrderNum=SO50496&rp:OrderNum=SO50497&rp:OrderNum=SO50498&rp:OrderNum=SO50499&rp:OrderNum=SO50500 $12,157.80
    May 17, 2007 SO50501&rp:OrderNum=SO50502&rp:OrderNum=SO50503&rp:OrderNum=SO50504&rp:OrderNum=SO50505&rp:OrderNum=SO50506&rp:OrderNum=SO50507&rp:OrderNum=SO50508 $13,231.62
    May 18, 2007 SO50509&rp:OrderNum=SO50510 $4,624.91
    With this, I can then create a Report Action in SSRS with a Parameter Value of
    UrlEscapeFragment(
    GENERATE(
    EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
    "Internet Sales"),
    [Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
    "&rp:OrderNum=")
    The way I was going about it before was flawed, as I was trying to get a list of the granular values from each dimension used to build the measure value and pass each one of those as separate parameters. I just needed to set something unique for each fact
    measure transaction that represents the value and uses that in a query parameter for the SSRS report.

Maybe you are looking for

  • I was posting a GR using MIGO and I received the following syntax error.

    syntax error in program    SAPLMLSP                                             in include                 LMLSPFBV                                             in line                      10  the field "FLG_CNMM_DISPLAY" is unknown, but there is a f

  • Need help on a summary query

    Assume I have 10 departments in a company. I need a query that will give me the names of top 3 salaried employees in each department. Appreciate any help on a query that will fetch the results to the scenario above. Thanks

  • HT201365 How do I see the apps I have previously downloaded after the 7.02 update on iPhone?

    I have just updated my iPhone 4S with the 7.02 update. All of the apps I have previously downloaded are no longer showing on my phone. Are they stored anywhere in a file or do I have to download everything from the beginning? It's a bit frustrating t

  • IPod music (synced from a PC) -- mac

    I have a friend that wants to move a bunch of songs from his iPod, which has been synced and configured for his PC, to my mac. There are plenty of threads/sites that show you how to move it to a NEW mac... But I want to preserve all of the music that

  • The video is not smoth.

    Seeing tv shows and the movie isnt smoth as an dvd. is this normal?