Dynamic edit on a Report.

Hi,
I have a report where I am giving edit link for each record. By clicking this user can go to another page where they can edit this record. But, the requirement is that this button should apprear only for those records where its status is of certain value. How can I make this dynamic ? Any suggestions are appreciated.
Thanks
Naresh

You'll need to set up the link in your query:
SELECT
  col1 pk,
  col2,
  col3,
  ( CASE
      WHEN col2 = 'OK_TO_EDIT' THEN
        '[a href="f?p=&APP_ID.:YOUR_PAGE:&SESSION.:::YOUR_PAGE:P2_PK:' || col1 || '"][img src="#IMAGE_PREFIX#edit.gif" alt="Edit Record"][/a]'
      ELSE ' '
    END ) edit_link
FROM your_table<BR><BR>
chet

Similar Messages

  • Selecting both static and dynamic values in a report.

    Hello,
    I am using the following LOV for a select list in a form based on another post (Re: Static and Dynamic LOV ordering
    It is presenting five static values along with a dynamic LOV.
    select d, r
    from (select n, d, r
    from (select 1 as n, 'NAME_A' d, 1 r
    from dual
    union all
    select 1 as n, 'NAME_B' d, 2 r
    from dual
    union all
    select 1 as n, 'NAME_C' d, 3 r
    from dual
    union all
    select 1 as n, 'NAME_D' d, 4 r
    from dual
    union all
    select 1 as n, 'NAME_E' d, 5 r
    from dual
    union all
    select 2 as n,
    (LNAME || ', ' || FNAME || ' (' ||
    to_char(DOB, 'MM/DD/YYYY') || ')') display_value,
    ID return_value
    from my_name_table)
    ORDER BY n, r asc)
    The static display and return values do not exist in my_name_table, but the static return values are recorded in my_main_table when the user submits the form.
    The tables look like this:
    my_main_table:
    record_id
    name_id
    my_name_table:
    name_id
    fname
    lname
    How can I present the display values associated with the static return values recorded in my_main_table along with the dynamic display values in a report? I am currently presenting the dynamic portion in a report using the following select statment:
    select
    (my_name_table.LNAME||', '||my_name_talbe.FNAME) AS Name
    from my_name_table
    WHERE my_main_table.NAME_ID = my_name_table.NAME_ID
    I have the additional problem that the static return values are not in my_name_table so the join in the last statement will not find the static values in my_name_table.
    Edited by: mterlesky on Feb 24, 2009 9:51 AM

    1. You will need to add an outer join to return all the values in the Main table.
    2. Then decode the values for the static LOV.
    Something like (this is not tested, but should give you the idea)
    select
    decode(my_main_table.NAME_ID,1,'NAME_A',2,'NAME_B',3,'NAME_C',4,'NAME_D',5,'NAME_B',(my_name_table.LNAME||', '||my_name_talbe.FNAME)) AS Name
    from my_name_table
    WHERE my_main_table.NAME_ID = my_name_table.NAME_ID(+)
    This will all break if any of your static LOV ID values clash with your dynamic LOV ID values.
    I am now going to give you a long lecture about hard coding values ..... ;)
    Related info: http://simonhunt.blogspot.com/2009/02/how-to-cope-with-list-of-values-lovs.html
    I hope that helps
    Shunt

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • Field Editing in ALV Report

    hello everyone,
    I have created an alv report using MARA table. but i am unable to edit any field and save the changes back to the table in the database.
    I

    Hi Ravi,
    Check out the below demo program for editable ALV .
    REPORT  ZDEMO_ALVGRID_EDIT                 .
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat,     "slis_t_fieldcat_alv WITH HEADER LINE,
          wa_fieldcat TYPE lvc_s_fcat,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM set_specific_field_attributes.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      wa_fieldcat-fieldname   = 'EBELN'.
      wa_fieldcat-scrtext_m   = 'Purchase Order'.
      wa_fieldcat-col_pos     = 0.
      wa_fieldcat-outputlen   = 10.
      wa_fieldcat-emphasize   = 'X'.
      wa_fieldcat-key         = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'EBELP'.
      wa_fieldcat-scrtext_m   = 'PO Item'.
      wa_fieldcat-col_pos     = 1.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'STATU'.
      wa_fieldcat-scrtext_m   = 'Status'.
      wa_fieldcat-col_pos     = 2.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'AEDAT'.
      wa_fieldcat-scrtext_m   = 'Item change date'.
      wa_fieldcat-col_pos     = 3.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-scrtext_m   = 'Material Number'.
      wa_fieldcat-col_pos     = 4.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MENGE'.
      wa_fieldcat-scrtext_m   = 'PO quantity'.
      wa_fieldcat-col_pos     = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MEINS'.
      wa_fieldcat-scrtext_m   = 'Order Unit'.
      wa_fieldcat-col_pos     = 6.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'NETPR'.
      wa_fieldcat-scrtext_m   = 'Net Price'.
      wa_fieldcat-edit        = 'X'. "sets whole column to be editable
      wa_fieldcat-col_pos     = 7.
      wa_fieldcat-outputlen   = 15.
      wa_fieldcat-datatype     = 'CURR'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'PEINH'.
      wa_fieldcat-scrtext_m   = 'Price Unit'.
      wa_fieldcat-col_pos     = 8.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
    * Set layout field for field attributes(i.e. input/output)
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
    *  call function 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
    *            i_callback_user_command = 'USER_COMMAND'
                is_layout_lvc               = gd_layout
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  set_specific_field_attributes
    *       populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    * Populate style variable (FIELD_STYLE) with style properties
    * The NETPR field/column has been set to editable in the fieldcatalog...
    * The following code sets it to be disabled(display only) if 'NETPR'
    * is gt than 10.
      LOOP AT it_ekko INTO wa_ekko.
        IF wa_ekko-netpr GT 10.
          ls_stylerow-fieldname = 'NETPR' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa_ekko-field_style.
          MODIFY it_ekko FROM wa_ekko.
        ENDIF.
      ENDLOOP.
    endform.                    " set_specific_field_attributes

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • How to save data in ztable after editing in alv report

    how to save data in ztable after editing in alv report?

    Hi,
        Please find the attachment below.This may be usefull to you.
         [http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editingandsavingtheeditedvaluesin+Database%28OOPS%29]
    Regards,
    Ramakrishna Yella.

  • Dynamic Images in PDF Report

    Hi,
    I want to create Badges from employee table (ID, NAME, JOB_TITLE, PHOTO). I downloaded and installed a demo application "USING DYNAMIC IMAGES IN PDF REPORT". It works fine with smale images < 20K. I'm getting the following error for images > 20K :
    "ORA-06502: PL/SQL: numeric or value error: raw variable length too long"
    it seems like a buffer problem.
    could you pls help to solve this problem
    Thanks,
    Ribhi

    Hi Carsten
    That was exactly* I was looking for. Maybe I should Google more in German ;-)
    The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
    Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
    Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
    After moving the image inside the group....it works great!
    (One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
    @Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
    The way I use it now (very similar to Carsten's description) there is no limit....
    Thank you all!
    Roel

  • Developer role able to edit a shared report that he did not create

    Hi,
    It seems like user with "BI Publisher Developer" role is able to edit a report
    in shared folder that he has access to.
    Question: How can I create a user who can develop/create/edit his own reports,
    and have view only access to some shared reports and
    have edit access to some other shared reports?
    i.e I want a scenario where there are 2 folders in Shared folder say FolderA and FolderB.
    I want to create a user who is a developer such that he can create reports under My Folder
    for his personal use and also be able to create/edit reports under Shared/FolderA,
    but have only view-only access to Shared/FolderB
    Thanks

    Moderator Action:
    Same reaction as with your other triple multi-post:
    https://forums.oracle.com/thread/2576361
    Do not multi-post.
    That's the same as if you were a spammer.
    This one is also locked.
    Stay with your post that is in the New To Java forum space.
    Stay in the New To Java forum space until you are not a novice any longer.

  • Can we edit the System Report queries to add some missing fields ?

    Hello,
    I'm using SAP Business One 2005 A and I was wondering if there was a way to edit the system report queries.  Sometime, I'm only missing calculated fields in the existing report.  Something as easy as the difference between 2 dates is not working with the formula fields.
    Instead of rewriting everything, could we simply see that original query and edit it to add the missing fields ?
    I don't like the fact I can't add my own created report from a query in the main menu.  Since I couldn't do anything with the Backorder reports by default, I created mine with my own SQL query.  Can't I replace the existing one with my own ?
    Thank you
    Daniel Gagnon

    Hi Daniel,
    You can edit a system query but then you can only save it as a user query (ie you cannot overwrite the system queries).
    User queries can't be placed in the Main Menu using the standard GUI though you could add them to the User Menu tab so your users can get to them easily. I think to add them to the Main Menu would require the development of an add-on that updated the Main Menu and triggered the running of the query when the user clicked on the menu option.
    The other thing to look at is using XL Reporter for your reports rather than the Query Generator. With XL Reporter you can automatically add reports to the main menu.
    Kind Regards,
    Owen

  • APEX:How to put dynamic buttons in a Report.

    Hello all,
    I am creating one application in which i want two buttons in every record. I can't put it manually because it should change according to records in a table So Can anyone tell me how to put dynamic buttons in a report.
    Thanks & Regards,
    Jiten Pansara

    Hi Jiten,
    you cannot create buttons in the report, but you can always create link columns with some css class to show it as button.
    So in the both link column report attributes you will have class="button1" and class="button2"
    And in dynamic actions you need to bind the events based on your link column's jquery selector like:
    .button1
    .button2Thanks

  • How to edit template for report generator in stimulus profile editor in Veristand 2011?

    How to edit template for report generator in stimulus profile editor in veristand 2011?
    We are using Veristand 2011.When we run any sequence in stimulus profle editor,we get test results in form of ATML file.
    We want to customise the template for this test result generation as per our requirement.
    For example:
    Test case No.: Description of test case.
    Objectives: Explanation of objectives.
    Result: Passed/ Failed.
    Graph: If any.
    Please suggest how to do this.

    You cant really change too much in the report, you can customize TRML.xsl which is created every time in the Test Results\UUT 1 folder and that would give you some flexibility on what is shown. I dont know what a xsl is actually able to do in terms of composing data from multiple files (if at all possible) but it definitely allows you to change the visual format of the existing xml data.
    Otherwise I modified the xsl to customize the look of the xml report when opened in a browser to have less clutter and some coloring on the Pass/Fail but, the reports are XML files anyway so it's easy to extract data out of them and you can probably write your own report creation tool to compose the report in whatever format you like.

  • How to create dynamic view in hr report category

    i want to make company code mandetory in in selection screen given by logical data base PNP here i want to make field mandetory. so how to create dynamic view in hr report category.
    thanks in advance

    solved by self

  • Problems using Dynamic parameters with Crystal Reports and SBO 8.8

    Has anyone been able to successfully use a dynamic parameter in Crystal Reports with 8.8 using the Business One connector? When we try we get an additional logon to the database that pops up and the logon fails.
    We need this because we want to return live lists of PO documents from the server for selection. We are also trying to use nested dynamic parameters, because we want to first return the PO document based on the PO number, and then chose specific rows based on a field value in POR1.
    It works if we don't use the Business One connector, but then the report doesn't function properly inside of SAP.
    Any ideas would be appreciated.

    I have tried using tokens but they are too simple. I need something like a subselect where you first select one value and then another that is a subset of those values. Apparently the tokens can't even use a "where" clause.
    SAP dances around Dynamic parameters, but won't come out and say that they can't be used with the B1 connector. If that is the case then they should just say so and stop wasting our time. Apparently Crystal is not truely interfaced with B1, just sort of hanging out with it.
    I don't really care other than I have to do this select, subselect. If someone has a way to do that with tokens I would love to hear it.
    Thanks,
    Roy

  • Problem Editing User Defined Report - 1.1.0.22.71

    When I rt click on an existing user-defined report on the Reports tab and select edit, change the default value on a bind variable and click Apply, I get message "Name already used please enter new one" message and changes will not save. Am I missing something here or is this a bug?

    I expected that if I basically did a "save as" the issue could be avoided. But I wanted to be sure that if I'm maintinanig a set of shared reports I can edit an existing report without having to jump through a hoop or two. Is this issue being addressed?
    Thanks

  • How to edit the JSP Report

    Dear All, anybody knows how can i edit a JSP report ?
    or : is it possible to edit in a paper version of report ( 9iDS 9.2) and then publish it on the web after editing its layout ?
    please , if anyone knows it will be appreciated.
    Regards,
    Hany B.Maurice
    Application Developer

    thanks alot my dear , but i have a comment
    when i edit in the layout of the report( paper version) it does not reflect the changes i made in the web version
    is there any layout editor for the JSP version of the report .
    Regards,
    Hany
    Hany B.Maurice
    Application Developer
    Cairo - Egypt

Maybe you are looking for

  • Can no longer access log files from EM(ECM11.1.1.6.0).

    Full UI popup error is " Stream closed ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #4" Of course, I can't see any further errors in the logs,so I'm

  • 2 CF servers,but different remote object path for flash

    I have 2 CF servers,but different remote object path for flex in each server. Eg for one flex program in my dev server I define the remote object as follows <mx:RemoteObject id="myService" destination="ColdFusion" source="cfide.flex.path_to_file" sho

  • Read internal ABAP Event Registration

    Hi Experts, I need to read the internal event registration table of ABAP. Any ideas how to access this? Thank you! Bodo

  • Convert from ISO 8859-1 encoding to UTF-8

    Hi My Os name is 'SunOS ut51109 5.10 Generic_144500-19 sun4v sparc SUNW,T5440'. I want to change the encoding of the existing .bcp file from ISO 8859-1 to UTF-8 with out using any temp files as these .bcp file will be pointed by an external table. he

  • Work item display for step : Deadline Missed

    Hi, Parked invoices for one of the vendor is not triggering the work item in the workflow inbox. But the status is showing as complete. Appreciate if provide guidance how to analyse the issue. The message is read as below: Deadline Missed: Invoice# 5