Colours in reports

Hi, I want to add colours in my reports, i have successfully done that using conditional formating, But now i have to display the colours for ehich i know the hexadecimal codes. When i try to use these codes i get a black colour .
How can i use the hexadecimal codes for colours or ther is some work around????

Dear,
For Hexa Decimal Color Code I also wanna contribute somthing to you.
As
Colors-This property describes the color of the enclosing element's text content. Okkk Oracle has...Somthing like you can say..Oracle Reports supports the following options for this property:
color_name|#rgb|#rrggbb|rgb(r_integer, g_integer, b_integer)|rgb(r_value%, g_value%, b_value%)
Color Name
RGB Equivalent
aqua
#0FF
black
#000
blue
#00F
fuchsia
#F0F
gray
#7F7F7F
green #007F00
lime
#0F0
maroon
#7F0000
navy #00007F
olive #7F7F00
purple #7F007F
red #F00
silver #C0C0C0
teal #007F7F
white #FFF
yellow #FF0
For example:
color:aqua
color:#FB0
color:#0FACED
color:rgb(100, 245, 33)
color:rgb(23%, 45%, 87%)
Note: For rgb(x, x, x) specification, color intensity must be specified in percentage (0-100) or rgb integer (0-255). Any value higher than the allowable range is set to the maximum value. A negative value for any color intensity is invalid. You may mix the percent and rgb integer values for colors; for example:
<span style="color:rgb(100%, 125, 3%)">
is equivalent to:
<span style="color:rgb(255, 125, 8)">
or
<span style="color:rgb(100%, 49%, 3%)">
All it Provides till now from the Latest Version version of report release 10g.
Cheers.
Jak

Similar Messages

  • Change text size and colour of report values ?

    Hi,
    I have a formula as part of a BEx query in version 3.5 and I'd like to make the values of this formula stand out more by either changing the text size of this one row and/or changing the colour.
    I've already selected the "highlighting" option but this only changes the colour to a light blue colour.
    Does anyone know if it's possible to change the text size and colour of one or more rows of a report?
    Thanks.

    HI Mark,
    Greetings.
    Your requirement can be met by using exceptions. It can not change/increase the text size but it can give you color coding based on the conditions you set while creating query.
    Open your query in Designer and click on exception button on the top menu bar. Define your condition on whatever key figure you want to get the color coding and execute your report.
    Let me know if this is what you were looking for.
    Thanks
    Sachin

  • Displaying different colors for cells/columns in Interactive Report

    Hi,
    I have a requirement to display just the 'cells' in the Interactive Report columns with different colors.
    There are 3 columns in the Interactive report.
    The color coding for all the 3 different columns should be such that:
    <40% - red color
    40-70-orange
    greater than 70%-green
    I tried the highlight option in the report and saved the report as default, but still the color condition ended up getting displayed to the end user. I dont want this.
    Can someone suggest a better way to handle this requirement?

    Perhaps explore similar solutions described here
    Background Colour of Report Cell Issues.
    Scott

  • Apex report column in one color

    Hai,
    How can i make selected report cell(Whole column) in color
    For example select emp_no, emp_name from emp;
    i should display all emp_name cell in color (not only the name of the employee)
    Using report attributes.. i tried with background color " background-color:yellow " in CSS style.. its giving color for the charcters in the cell not for whole cell..
    Thanks
    Joe

    Hi,
    One way is use JavaScript (jQuery) and dynamic action
    These links might help.
    http://dbswh.webhop.net/apex/f?p=BLOG:READ:0::::ARTICLE:351800346145832
    Re: Background Colour of Report Cell Issues.
    As I understand you need color all cells and color is fixed, you do not need create hidden column to report or custom report template.
    Just modify JavaScript in dynamic action
    Regards,
    Jari

  • Accurately finding spot colours in placed images

    Hi all,
    I'm trying to collate a list of the colours physically present in an artwork, including those in placed images which is where I'm having trouble.
    When an image is placed into an artwork, any spot channels present in a PSD (we only work with PSD's here) are brought in as swatches into Illustrator.  However if a spot channel is then removed from the image and saved, Illustrator reloads the image but doesn't realise that the channel has been removed and the colour remains in the swatch list.
    The Custom Colour suite reports that the colour is still there and used externally and separation preview still shows it as existing in the artwork.  Up to now I've been using exiftool to list the extra channels and parsing the output, but I'd prefer not to have to rely on an external dependancy.  There's nothing in the placed image's dictionary either.
    We also use a suite of (very expensive) plug-ins from large, Belgian graphics software company.  One of their plug-ins lists colours similarly to separation preview but it's completely accurate in it's representation of which colours are physically present in the artwork.  I'm not attempting to re-create it's functionality, rather generate the same information.
    Any suggestions would be hugely appreciated!
    Thanks
    -W

    Ok, it seems like I couldn't see the wood for the trees with this one.  I finally found the solution with AIFOConversionSuite::EnumerateContents(), which with closer inspection of the documentation, provides exactly what I needed... including that 'god I'm such an idiot' feeling
    I first tried traversing the artwork manually, then I discovered AIPathStyle::AdjustObjectAIColors() which provides some colour information but seems to have no knowledge of placed images.
    I guess you live and learn!
    -W

  • Changing bar chart colour

    I've used og_set_bfcolor to set the bar colour in report 6i. Would anybody know how to change color in report 9i? Thanks in advance.

    joe,
    With 9i graph, it is not directly possible. But there is a roundabout way to do it
    it's possible to do this through the graph bean API, but in that case you'd need to use the Java Importer
    and construct the chart yourself programatically
    This would be treaed as an enhancement request to the product
    Thanks,
    The Oracle Reports Team

  • Hp officejet 6500a plus print problem.

    New set of HP cartridges installed.  Ink level report shows ink in only two of the cartridges.  Printhead check shows one colour on report - 2nd level check shows a different colour - but each time only one. Printhead alignment said successful.   Printing is very streaky.

    Disable Bitdefender altogeher and try again.
    Also, see this: http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&docname=c02251103
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • JQuery text-field not deactivable in IE

    Good morning guys!
    I am suffering from a problem with my old favourite Internet Explorer 8 ;-). I have some jQuery code that (de-)activates and colours some report columns based on another column value. While this code is working perfectly in all browsers I have tested, it is not working in IE. The cell itself is coloured correctly but if the column, respectively the cell value, changes that is supposed to trigger the deactivation or colouring, nothing happens in IE. The cell properties do not change and the report is not refreshed. I have tried to insert the code into the region header of my report, into the page header etc. without any obvious changes. The problem simply is that most of my users rely on IE 8 due to corporate software restrictions. Hence Firefox is not supported and I need to get that code running on IE.
    Maybe you can have a look at my code and tell me what could be done to enforce the same functionality in IE.
    Thanks a lot guys!
    Best regards,
    Sebastian
    <script type="text/javascript">
    //<![CDATA[
       $(document).ready(function(){
          $('select[id^="f04_"]').each(function() {
             toggleFields(this);
          $('select[id^="f04_"]').live('change', function() {
             toggleFields(this);
       function toggleFields(selectElmt) {
          $select = $(selectElmt);
          $commPct = $select.parents('tr').eq(0).find('input[id^="f06_"]');
          $commPct2 = $select.parents('tr').eq(0).find('input[id^="f08_"]');
          $commPct3 = $select.parents('tr').eq(0).find('input[id^="f05_"]');
          $commPct4 = $select.parents('tr').eq(0).find('input[id^="f07_"]');
          if ($select.val() == '-1') {
             $commPct
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
      $commPct2
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
    $commPct3.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
    $commPct4.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
          } else {
    $commPct.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
    $commPct2.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
    $commPct3
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
    $commPct4
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
    //]]>
    </script>

    Good morning!
    I finally found the solution to this problem after reading more about jQuery and browser issues. The live-change function is simply buggy in IE8.
    Getting rid of the "live" declaration solves the problem. See below:
    <script type="text/javascript">
    //<![CDATA[
       $(document).ready(function(){
          $('select[id^="f04_"]').each(function() {
             toggleFields(this);
          $('select[id^="f04_"]').change(function(){
             toggleFields(this);
       function toggleFields(selectElmt) {
          $select = $(selectElmt);
          $commPct = $select.parents('tr').eq(0).find('input[id^="f06_"]');
          $commPct2 = $select.parents('tr').eq(0).find('input[id^="f08_"]');
          $commPct3 = $select.parents('tr').eq(0).find('input[id^="f05_"]');
          $commPct4 = $select.parents('tr').eq(0).find('input[id^="f07_"]');
          if ($select.val() == '-1') {
             $commPct
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
      $commPct2
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
    $commPct3.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
    $commPct4.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
          } else {
    $commPct.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
    $commPct2.unbind('focus').removeAttr('readonly').css("background", "#99FF00" )
    $commPct3
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
    $commPct4
                .focus(function() {
                   this.blur();
                .attr('readonly','readonly')
                .css("background", "#CCCCCC")
                .val('');
    //]]>
    </script>I still have one problem that remained unanswered with no reply. Maybe you can have a look at it again!?
    Problem disabling select list in updateable report
    Regards,
    Sebastian

  • Background color output

    Hello experts
    i have several internal tables which i need to convert into files in background mode
    this is fine
    however, i also need some of the rows in the file to be <b>colored </b>with a particular color
    any idea by which i can achieve this ?
    the files would be too large to convert into PDFs

    Hi,
    I am sending the sample report for colour cell report.
    REPORT  YMS_COLOURALV NO STANDARD PAGE HEADING.
    TYPE-POOLS: SLIS, ICON.
    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF IMARA OCCURS 0,
              LIGHT(4) TYPE C,
              MATNR TYPE MARA-MATNR,
              MTART TYPE MARA-MTART,
              MAKTX TYPE MAKT-MAKTX,
              COLOR_LINE(4) TYPE C,
              TCOLOR TYPE SLIS_T_SPECIALCOL_ALV,  "cell
          END OF IMARA.
    DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM WRITE_REPORT.
    Get_Data
    FORM GET_DATA.
      WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
          IMARA-MATNR = 'ABC'.
          IMARA-MTART = 'ZCFG'.
          IMARA-MAKTX = 'This is description for ABC'.
      APPEND IMARA.
      WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.
          IMARA-MATNR = 'DEF'.
          IMARA-MTART = 'ZCFG'.
          IMARA-MAKTX = 'This is description for DEF'.
      APPEND IMARA.
      WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.
          IMARA-MATNR = 'GHI'.
          IMARA-MTART = 'ZCFG'.
          IMARA-MAKTX = 'This is description for GHI'.
      APPEND IMARA.
      LOOP AT IMARA.
        IF SY-TABIX = 1.
          IMARA-COLOR_LINE = 'C410'.     " color line
        ENDIF.
        IF SY-TABIX = 2.                "  color CELL
          CLEAR XCOLOR.
          XCOLOR-FIELDNAME = 'MTART'.
          XCOLOR-COLOR-COL = '3'.
          XCOLOR-COLOR-INT = '1'.       " Intensified on/off
          XCOLOR-COLOR-INV = '0'.
          APPEND XCOLOR TO IMARA-TCOLOR.
        ENDIF.
        MODIFY IMARA.
      ENDLOOP.
    ENDFORM.                    "get_data
    WRITE_REPORT
    FORM WRITE_REPORT.
      DATA: LAYOUT TYPE  SLIS_LAYOUT_ALV.
      LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.
      LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.
      PERFORM BUILD_FIELD_CATALOG.
    CALL ABAP LIST VIEWER (ALV)
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FIELDCAT
        TABLES
          T_OUTTAB    = IMARA.
    ENDFORM.                    "write_report
    BUILD_FIELD_CATALOG
    FORM BUILD_FIELD_CATALOG.
      DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
      CLEAR: FIELDCAT. REFRESH: FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Status'.
      FC_TMP-FIELDNAME  = 'LIGHT'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '4'.
      FC_TMP-ICON       = 'X'.
      APPEND FC_TMP TO FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Material Number'.
      FC_TMP-FIELDNAME  = 'MATNR'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '18'.
      APPEND FC_TMP TO FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Material Type'.
      FC_TMP-FIELDNAME  = 'MTART'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '10'.
      APPEND FC_TMP TO FIELDCAT.
      CLEAR: FC_TMP.
      FC_TMP-REPTEXT_DDIC    = 'Material'.
      FC_TMP-FIELDNAME  = 'MAKTX'.
      FC_TMP-TABNAME   = 'IMARA'.
      FC_TMP-OUTPUTLEN  = '40'.
      FC_TMP-EMPHASIZE = 'C610'.   " color column
      APPEND FC_TMP TO FIELDCAT.
    ENDFORM.                    "build_field_catalog
    Thanks,
    Shankar

  • Coloring of Particular Cells in a dynamic internal table(field symbols)

    Hi,
         I have a requirement to introduce color into some particular cells in a dynamic internal table(Field symbol) based on some conditions.I know that color can be introduced at cell level in the case of static internal table.But, can anybody tell me whether it is possible to introduce color to particular cells in the dynamic internal table(Field Symbol) .Please suggest me on this issue.
    Thanks in advance,
    Rajesh

    Hi,
    This is the sample coding for the colour cell report.
    Kindly go through it. It will helps u.
    REPORT YMS_COLOURTEST .
    DATA: BEGIN OF TP OCCURS 10, ID, NR(8), TEXT(255), END OF TP.
    DATA: LENGTH TYPE I VALUE 8, " Length of list
    TESTSTRING(15) TYPE C VALUE '012345678901234',
    WIDTH TYPE I. " Width of list
    DATA: TXT_REPORT LIKE DOKHL-OBJECT.
    START-OF-SELECTION.
    PERFORM HEADING.
    PERFORM OUTPUT_BODY.
    FORM HEADING.
    FORMAT INTENSIFIED OFF. " Remove any INTENSIFIED
    ULINE AT (WIDTH). " Upper frame border
    FORMAT COLOR COL_HEADING INTENSIFIED." Title color
    WRITE: / SY-VLINE. " Left border
    WRITE: 'No |Colour |intensified |intensified off|',
    'inverse' NO-GAP.
    WRITE: AT WIDTH SY-VLINE. " Right border
    ULINE AT (WIDTH). " Line below titles
    FORMAT COLOR OFF.
    ENDFORM.
    FORM OUTPUT_BODY.
    DO LENGTH TIMES.
    PERFORM WRITE_LINE USING SY-INDEX.
    ENDDO.
    ENDFORM.
    FORM WRITE_LINE USING COUNT TYPE I.
    DATA: HELP(14) TYPE C,
    COUNT1 TYPE I.
    COUNT1 = SY-INDEX - 1.
    WRITE: / SY-VLINE NO-GAP.
    WRITE: (4) COUNT1 COLOR COL_KEY INTENSIFIED NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    CASE COUNT1.
    WHEN '0'.
    HELP = 'COL_BACKGROUND'.
    WHEN '1'.
    HELP = 'COL_HEADING'.
    WHEN '2'.
    HELP = 'COL_NORMAL'.
    WHEN '3'.
    HELP = 'COL_TOTAL'.
    WHEN '4'.
    HELP = 'COL_KEY'.
    WHEN '5'.
    HELP = 'COL_POSITIVE'.
    WHEN '6'.
    HELP = 'COL_NEGATIVE'.
    WHEN '7'.
    HELP = 'COL_GROUP'.
    ENDCASE.
    WRITE: HELP COLOR COL_KEY INTENSIFIED NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    WRITE: TESTSTRING COLOR = COUNT1 INTENSIFIED NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    WRITE: TESTSTRING COLOR = COUNT1 INTENSIFIED OFF NO-GAP.
    WRITE: SY-VLINE NO-GAP.
    WRITE: TESTSTRING COLOR = COUNT1 INVERSE NO-GAP.
    WRITE AT WIDTH SY-VLINE NO-GAP.
    ENDFORM.
    Thanks,
    Shankar

  • Dynamically Colour Cells in an Interactive Report

    My application requires an interactive report where cells are colour coded and the cell may, or may not have a value, but the value doesn't relate to the colour.
    The report is based on a view which returns a result set as follows:
    rn col1_value col1_colour col2_value col2_colour col3_value col3_colour col4_value col4_colour
    1        null        grey          3        null       null        null        null        red
    2        null        null          3        grey       null        null           4        red
    3        null        grey       null        null          3        null        null        redIn the results, each cell to be displayed has two columns per row, one with the colour and one with the value to display where null is the default colour (white)/no value.
    In Apex 4.1 I can set the colour based on the values using the dynamic actions on the report display, but I can't work out how to set the colour of col1_value based on the results of col1_colour. I am hoping there is a way to set the colour of the cell col1_value and hide col1_colour from the report.
    If you know of any posts providing an example of how this may work, or if you are able to explain it to me I would really appreciate your time.
    I appreciate it may not be simple to see what I am aiming for given the text restriction and no images/tables available on the forum, hopefully you get the idea, but if not, ask and I will try and explain further.
    I have seen Blog posts about 3-4 years old on how you do this in Apex 3.0 or older, but can't work out how to get this to work in Apex 4.0 or Apex 4.1.

    I have solved this using Javascript in a Dynamic Action, javascript something like:
    $("td[headers='COL1_COLOUR']").each(function(){
       switch($(this).text())
          case "grey":
               $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"#999"});
               break;
          case "green":
               $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"green"});
               break;
          case "blue":
               $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"blue"});
               break;
          case "orange":
               $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"orange"});
               break;
          case "yellow":
               $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"yellow"});
               break;
          default:
               break;
        $(this).css({"visibility":"hidden"});
        $("th[id='COL1_COLOUR']").css({"visibility":"hidden"});
    });

  • How to get more than 4 coloured rows in a report depending on column values

    Hi,
    I've looked through the forum and found some stuff on mutli-coloured reports and found the link to http://htmldb.oracle.com/pls/otn/f?p=11933:7:557008579481721819
    But I have several problems:
    This shows how to get 3 colours, but it's easy to get up to 4 by just using the "Column Templates" in a new report template.
    I don't understand where to put the snippets. It says to put them in "Row Templates" , "Before Rows" and "After Rows" but my report template page doesn't have these options! I've got "Column Templates" (4 of them), "Before Each Row" and "After Each Row".
    Am I looking at a link for an old version?
    What I want to do is set the row colour dependant on a column called "level" which is between 1 and 5.
    Thanks

    Hi Vikas,
    It's almost perfect now. My only problem is that the pagination table is, for some reason, enclosed within the results table (I've used FireFox web developer's tools and checked the souce HTML to be sure of this). So, if I have a border at table level, it appears on the row containing the pagination.
    I've had to remove table borders and put right borders on the table data cells, but I can't find a way to put left borders on the table rows, so I have a pretty table with 5 levels of colour, but no borders on the left-hand side.
    Ideally I'd like to avoid having the pagination stuff within the results table, but I can't see how/where to put a </table> to sort this out!
    Ros

  • To change the colour of the particular cell of ALV report in Grid display.

    Hai Friends,
                      I have created an Alv report in grid display .In that i want to change the colour of the particular cell.Plz provide the answer with a solved example.
             Thank u.

    This works for a Custom Control and OO ALV in a Dialog Module
    TABLES: kna1.
    * Data (for the ALV Grid)
    TYPES:
      BEGIN OF t_alv_data,
        cust_id    TYPE kunnr,        "Customer Number
        cust_name  TYPE name1_gp,     "Customer Name
        cust_color TYPE i,
    *   cell coloring field
        color     TYPE lvc_t_scol,   "Cell coloring
      END OF t_alv_data.
    DATA:
      v_alv_data TYPE t_alv_data,
      i_alv_data TYPE STANDARD TABLE OF t_alv_data.
    * ALV grid containers and objects
    DATA:
      o_alv_grid TYPE REF TO cl_gui_alv_grid,
      o_alv_cont TYPE REF TO cl_gui_custom_container.
    * ALV field catalog
    DATA:
      i_alv_fc TYPE lvc_t_fcat,
      v_alv_fc LIKE lvc_s_fcat.
    * ALV Layout (colors)
    DATA:
      v_alv_layout TYPE lvc_s_layo,
      i_alv_color TYPE lvc_t_scol,
      v_alv_color TYPE lvc_s_scol,
      v_alv_color_cell TYPE lvc_s_colo.
    * ALV variant
    DATA:
      v_alv_variant  TYPE disvariant.
    PARAMETERS:
      p_alvvar TYPE disvariant-variant DEFAULT 'DEFAULT'.
    DATA: ok_code LIKE sy-ucomm.
    * Class for event handling
    *       CLASS lcl_event_receiver DEFINITION
    * [+] Event listener for the ALV grid
    * [+] Handles hotspots and data changes
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    *     Hotspot clicking
          hotspot_click
               FOR EVENT hotspot_click OF cl_gui_alv_grid
                 IMPORTING e_row_id
                           e_column_id
                           es_row_no,
    *     Data changed (such as checkbox clicking)
          handle_data_changed
            FOR EVENT data_changed OF cl_gui_alv_grid
                IMPORTING er_data_changed.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    * [+] Implementation of the ALV Grid event handler class
    CLASS lcl_event_receiver IMPLEMENTATION.
    *       METHOD hotspot_click                                          *
    * [+] Calls evvent_hotspot_click when a hotspot is clicked in the ALV
      METHOD hotspot_click.
        PERFORM event_hotspot_click
                      USING e_row_id
                            e_column_id.
      ENDMETHOD.                    "hotspot_click
    *       METHOD handle_data_changed                                    *
    * [+] Updates the source data when the data in the ALV display has
    * been changed, such as by clicking a checkbox.
      METHOD handle_data_changed.
        DATA: lv_changed TYPE lvc_s_modi.
        LOOP AT er_data_changed->mt_good_cells INTO lv_changed
          WHERE fieldname = 'CUST_NAME'.
          READ TABLE i_alv_data INTO v_alv_data INDEX lv_changed-row_id.
          IF sy-subrc = 0.
            MOVE lv_changed-value TO v_alv_data-cust_name.
            MODIFY i_alv_data FROM v_alv_data INDEX lv_changed-row_id.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    * Reference to the event listener class
    DATA: event_receiver TYPE REF TO lcl_event_receiver.
    *       FORM build_event_listener
    * [+] Set the event handler on the ALV Grid
    FORM build_event_listener.
    * Assigning the event listener to the ALV
      CREATE OBJECT event_receiver.
      SET HANDLER event_receiver->handle_data_changed FOR o_alv_grid.
      SET HANDLER event_receiver->hotspot_click       FOR o_alv_grid.
    ENDFORM.                    "build_event_listener
    *       AT SELECTION-SCREEN
    *         ON VALUE-REQUEST FOR p_alvvar
    * [+] Calls choose_alv_variant to ask the user to select an alv grid
    *     layout variant
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_alvvar.
      PERFORM choose_alv_variant
        CHANGING
          p_alvvar
          v_alv_variant.
    *       START_OF_SELECTION
    START-OF-SELECTION.
      PERFORM get_data.
      SET PF-STATUS 'ALVSCREEN' IMMEDIATELY.
      CALL SCREEN 2000.
    *       FORM get_data
    * [+] Gets the data for the ALV grid
    FORM get_data.
      SELECT kunnr name1
        INTO (v_alv_data-cust_id,
              v_alv_data-cust_name)
        FROM kna1.
        APPEND v_alv_data TO i_alv_data.
      ENDSELECT.
    ENDFORM.                    "get_data
    *       MODULE build_alv_grid
    *   THIS SHOULD BE IN THE "PROCESS BEFORE OUTPUT" OF THE ALV SCREEN
    * [+] Builds the ALV Grid objects
    * [+] Calls to build the field catalog table
    * [+] Loads the field catalog table into the ALV Grid
    * [+] Loads the table data into the ALV Grid
    MODULE build_alv_grid OUTPUT.
      SET TITLEBAR  '2000'.
    * Also enables layout saving
      PERFORM set_alv_variant
        USING
          p_alvvar
        CHANGING
          v_alv_variant.
    * Building the grid and container on the screen
    * NOTE: the container name MUST be upper-case
    * Also, we don't want the objects to be created if in batch mode!
      IF sy-batch IS INITIAL.
        CREATE OBJECT o_alv_cont
          EXPORTING
            container_name = 'O_ALV_TABLE'.
      ENDIF.
      CREATE OBJECT o_alv_grid
        EXPORTING
          i_parent = o_alv_cont.
    * builds the event listener
      PERFORM build_event_listener.
    * Color the cells
      PERFORM color_cells.
    * Build the field catalog
      PERFORM build_alv_fc.
    * Loads the data into the grid
      CALL METHOD o_alv_grid->set_table_for_first_display
        EXPORTING
          i_save          = 'A'
          i_default       = 'X'
          is_variant      = v_alv_variant
          is_layout       = v_alv_layout
        CHANGING
          it_outtab       = i_alv_data
          it_fieldcatalog = i_alv_fc.
    ENDMODULE.                    "build_alv_grid OUTPUT
    *       FORM build_alv_fc
    * [+] Constructs the ALV Grid field catalog table
    FORM build_alv_fc.
      CLEAR i_alv_fc.
      REFRESH i_alv_fc.
    * NOTE: the field name MUST be upper-case
    *                   field       heading         hide  hot
    *                   name                        zero  spot  just
      PERFORM:
        alv_field USING 'CUST_ID'    'Cust ID'        ' '  'X'  'R',
        alv_field USING 'CUST_NAME'  'Customer Name'  ' '  ' '  'L',
        alv_field USING 'CUST_COLOR' 'Color'          ' '  ' '  'R'.
    ENDFORM.                    "build_alv_fc
    *       FORM alv_field
    * [+] Describes and constructs a single field for the ALV Grid field
    *     catalog. The field length and type are both obtained from the
    *     actual field passed in to this method.
    * [+] Adds the constructed field to the ALV Grid field catalog table
    FORM alv_field
      USING
        p_field_name TYPE c
        p_heading    TYPE c
        p_hide_zeros TYPE c
        p_hotspot    TYPE c
        p_justify    TYPE c.
      CLEAR v_alv_fc.
      DATA:
        lv_type(1) TYPE c,
        lv_length TYPE i,
        lv_heading_length TYPE i.
    * get the type and length of this field
      FIELD-SYMBOLS <field>.
      ASSIGN p_field_name TO <field>.
      DESCRIBE FIELD <field> TYPE lv_type OUTPUT-LENGTH lv_length.
    * re-adjust the length to the length of the header, if too short
      lv_heading_length = strlen( p_heading ).
      IF lv_length < lv_heading_length.
        lv_length = lv_heading_length.
      ENDIF.
    * NOTE: the field name MUST be upper-case
      v_alv_fc-fieldname = p_field_name.
      TRANSLATE v_alv_fc-fieldname TO UPPER CASE.
      v_alv_fc-inttype   = lv_type.
      v_alv_fc-outputlen = lv_length.
      v_alv_fc-coltext   = p_heading.
      v_alv_fc-seltext   = p_heading.
      v_alv_fc-hotspot   = p_hotspot.
    * Determining which fields should show zeros
      IF p_hide_zeros = 'X'.
        v_alv_fc-no_zero = 'X'.
        v_alv_fc-lzero   = ' '.
      ELSE.
        v_alv_fc-no_zero = ' '.
        v_alv_fc-lzero   = 'X'.
      ENDIF.
      v_alv_fc-just = p_justify.
    * Add the field to the field catalog
      APPEND v_alv_fc TO i_alv_fc.
    ENDFORM.                    "alv_field
    *       FORM choose_alv_variant
    * [+] Shows a popup that allows the user to choose the layout variant
    *     for the alv grid of the current program
    * [+] Usually called by an AT SELECTION-SCREEN method.
    FORM choose_alv_variant
      CHANGING
        p_variant_name TYPE disvariant-variant
        p_variant      TYPE disvariant.
      CLEAR p_variant.
      DATA:
        p_exit_check(1) TYPE c.
      MOVE sy-repid TO p_variant-report.
      CALL FUNCTION 'LVC_VARIANT_F4'
           EXPORTING
                is_variant = p_variant
                i_save     = 'A'
           IMPORTING
                e_exit     = p_exit_check
                es_variant = p_variant
           EXCEPTIONS
                not_found  = 1
                OTHERS     = 99.
      IF sy-subrc = 0.
        IF p_exit_check <> 'X'.
          p_variant_name = p_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    "choose_alv_variant
    *       FORM set_alv_variant
    * [+] Sets the alv grid layout variant. Used for setting the variant
    *     when its name is entered in a parameter rather than by using the
    *     popup, or when loading the variant from a variable of type C
    FORM set_alv_variant
      USING
        p_variant_name TYPE disvariant-variant
      CHANGING
        p_variant      TYPE disvariant.
      MOVE sy-repid TO p_variant-report.
      p_variant-variant = p_variant_name.
    ENDFORM.                    "set_alv_variant
    *       FORM color_cells
    * [+] Loop through the data and apply coloring
    FORM color_cells.
      DATA:
        my_color  TYPE i.
    * tell the ALV grid what field in v_alv_data contains color information
      v_alv_layout-ctab_fname = 'COLOR'.
      my_color = 0.
    * loop through each row of the table
      LOOP AT i_alv_data INTO v_alv_data.
    *   clear the variables
        CLEAR:
          v_alv_color,
          v_alv_color_cell,
          i_alv_color.
        REFRESH:
          i_alv_color.
        v_alv_data-cust_color = my_color.
        PERFORM color_cell USING 'CUST_COLOR' my_color. "negative
    *   apply the colors
    *    IF v_alv_data-cust_name = 'Testing Credit'.
    *      PERFORM color_cell USING 'CUST_NAME' 6. "negative
    *    ELSEIF v_alv_data-cust_name = 'Goober Goober Also'.
    *      PERFORM color_cell USING 'CUST_NAME' 5. "positive
    *    ENDIF.
    *   set the color data for this table row
        v_alv_data-color = i_alv_color.
        MODIFY i_alv_data FROM v_alv_data.
        my_color = my_color + 1.
        IF my_color GT 7.
          CLEAR my_color.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "color_cells
    *       FORM color_cell
    * [+] Colors a cell in the ALV grid
    FORM color_cell
      USING
        p_cellname TYPE c
        p_color    TYPE i.
      CLEAR:
        v_alv_color_cell,
        v_alv_color.
    * set the color for the cell
    *  IF p_color = 0.
    *    v_alv_color_cell-col = 0. "cl_gui_resources=>list_col_background.
    *  ELSEIF p_color = 1.
    *    v_alv_color_cell-col = 1. "cl_gui_resources=>list_col_heading.
    *  ELSEIF p_color = 2.
    *    v_alv_color_cell-col = 2. "cl_gui_resources=>list_col_normal.
    *  ELSEIF p_color = 3.
    *    v_alv_color_cell-col = 3. "cl_gui_resources=>list_col_total.
    *  ELSEIF p_color = 4.
    *    v_alv_color_cell-col = 4. "cl_gui_resources=>list_col_key.
    *  ELSEIF p_color = 5.
    *    v_alv_color_cell-col = 5. "cl_gui_resources=>list_col_positive.
    *  ELSEIF p_color = 6.
    *    v_alv_color_cell-col = 6. "cl_gui_resources=>list_col_negative.
    *  ELSEIF p_color = 7.
    *    v_alv_color_cell-col = 7. "cl_gui_resources=>list_col_group.
    *  ENDIF.
      v_alv_color_cell-col = p_color.
      v_alv_color-nokeycol = 'X'.
      v_alv_color-fname = p_cellname.
    *  v_alv_color-color = p_color.
      v_alv_color-color = v_alv_color_cell.
      APPEND v_alv_color TO i_alv_color.
    ENDFORM.                    "color_cell
    *       FORM event_hotspot_click
    * [+] What to do when clicking on a hotspot in the ALV Grid
    FORM event_hotspot_click
      USING
        p_row    TYPE lvc_s_row
        p_column TYPE lvc_s_col.
      DATA:
        lv_docnum TYPE kunnr.
      READ TABLE i_alv_data INTO v_alv_data INDEX p_row-index.
      IF p_column = 'CUST_ID'.
    *   call a transaction when the cust_id is clicked
        SET PARAMETER ID 'AUN' FIELD v_alv_data-cust_id.
        CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
      ENDIF.
    ENDFORM.                    "event_hotspot_click
    *&      Module  USER_COMMAND_2000  INPUT
    *       text
    MODULE user_command_2000 INPUT.
      CASE ok_code.
        WHEN 'BACK'
          OR 'STOP'
          OR 'CANCEL'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_2000  INPUT

  • Interactive Reports Download In Colour format in html and csv

    Hi All I want to download interactive report in colour format(as it is format) in html and csv using apex 4.0.2
    Regards
    Robert

    http://en.wikipedia.org/wiki/Comma-separated_values
    A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form. As a result, such a file is easily human-readable (e.g., in a text editor).re: colours of html output
    interestingly, there are settings in print attributes, but they have no bearing on the output... obviously nothing to do with the html output. Probably best bet is BI Publisher, where you can define your own report templates.

  • Colour code a column in an interactive report

    Hi
    Could anybody tell me how to colour code a column in an interactive report please.
    I am using apex version 3.1.
    Thanks in advance

    When your IR is displayed, go to the Actions Menu, choose "Highlight" and enter the condition when which row or field should be highlighted.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

Maybe you are looking for

  • Music will no longer sync to the iPhone. Please Help

    Specs: Original iPhone. Running Latest Software iTunes: Up-to-Date Songs: All purchased through iTunes Here is the issue. I have had my iPhone since it's release in 2007. Everything has been working just fine. Last week, my wife wanted to sync her iP

  • How do I get Shuffle to work on my iPod Touch?

    Sometimes Shuffle works for my music and other times it keeps repeating the same song.  I have tried hitting "Shuffle," tried resetting the iPod.  Nothing seems to help!  It usually happens after an update to the operating system.

  • Fiscal year variable

    Hi , I ahve a report which is created by some one else....When i need to modify.. one thing is i ahve notice .. which i would like to do the modification The Fiscal year /month is the infoobject which is selected but in the filter nothing is assign b

  • Can't use special character "ç" in airport password

    Hi, I'm trying to connect to a wireless network, whose password contains the character "ç". For some reason airport won't let me input that character, but all others are fine. I've tried edit => insert special character, I've tried to copy / paste bu

  • Speed up AE CS6 performance on iMac?

    I just upgraded to After Effect CS6.  Is there any way to speed up its performance? I have a 3.2 GHz Intel Core i5 with 32 G of 1600 MHz DDR3, and I'm working in 3 dimensions.  Whenever I move something, it takes 10-20 seconds to render it.