Conditional bg color in row template

I created a new row template for my report but I get the following error when I include it in the report:
"Error ERR-1025 Error processing PLSQL expression. #missing_patches# = '-'"
In the row template itself, I used the following values ("missing_patches" is the conditional column in the report-query):
Row Template 1 (PL/SQL Expression): <td>bgcolor="yellow" #COLUMN_VALUE#</td>
Row Template 1 Expression: #missing_patches# = "-"
Row Template 2 (PL/SQL Expression): <td>bgcolor="red" #COLUMN_VALUE#</td>
Row Template 2 Expression: #missing_patches# <> "-"
Anybody an idea what I am missing? Thank you.
Thomas

Well, bgcolor should be inside the <td> tag, but bgcolor is depricated in HTML 4.x. You should really be using classes or inline styles.
Tyler

Similar Messages

  • Conditional display in the row template!

    Hi,
    I created a report template and my report shows like this:
    col1 col2 col3 col4 col5
    a 4 5 6 7
    b 4 8 7 2
    Total 8 13 13 9
    I am able to display all the above, but the column name should be "Total" at the end of the report when i am displaying the totals. totals also coming from the database, so i am not calculating here.
    Shall i put any condition saying that if the col1 is null then col1 should display "Total".
    Please suggest.
    Thank you.

    manyam16 wrote:
    Actually I used the row template conditions to solve that. But I have added one more count in the database package, that column is coming into the report attributes, not showing in the report. any ideas?
    I am using like this #COL50#where are you using this? if you are using this in column conditions, it will not work
    thank you,

  • Custom report row template

    Few questions when using a custom report row template. Followup to the discussion Report Row Template: Column condition
    1. The row template allows full control how the entire row is rendered. I can see this being used when the report query returns a single row and we need to format it in a very specific way. But when the query returns multiple rows, how is the specified Row Template used? i.e the first row is "consumed" and rendered as per the template. If the same process is repeated for subsequent rows, how can we control whether successive rows are rendered across the page (left to right) or down the page (top to bottom)?
    2. When a custom row template is used to render a tabular form, the hidden columns (marked Edit=Y, Show=N on Report Attributes) are present in the markup even when they are not specified in the row template! i.e. the MRU process works. Of course, this is a good thing but I was curious to know what exactly controls this, what part of the report template controls where the hidden form elements are placed?
    3. Any number/date formatting specified declaratively on the Column Attributes page appears to be taken into account when column values are substituted in the template using #COL# notation. But all the other Column Attributes are ignored (alignment, sum, show, link, etc). Is there a way to use the Link attribute to declaratively specify the link so the value of the column #COL# as seen by the report template includes the A tag?
    Thanks

    Comments? Thanks

  • Row Template Condition doesnt working

    Hi all,
    i have a self made "row template" for my report:
    "Before Rows":
    <table cellpadding="5" cellspacing="0" border="0" summary="">
    <tr>
    <th>ID</th>
    <th>ID_SHOW</th>
    <th>TITEL</th>
    <th>DOCUMENT</th>
    <th>status_external</th>
    <th>status_internal</th>
    <th>action</th>
    <th>tage_action</th>
    <th>crreated_on</th>
    <th>tage_anlage</th>
    <th>creator_name</th>
    <th>editor_hotline_display</th>
    <th>prio</th>
    <th>color</th>
    <th>erledigung_bis</th>
    <th>histo</th>
    <th>arbeitskorb</th>
    </tr>
    "Row Template 1"
    <tr class="#1#">
    <td >#2#</td>
    <td>#3#</td>
    <td style="background-color: yellow;">#4#</td>
    <td>#5#</td>
    <td>#6#</td>
    <td>#7#</td>
    <td>#8#</td>
    <td>#9#</td>
    <td>#10#</td>
    <td>#11#</td>
    <td>#12#</td>
    <td>#13#</td>
    <td>#14#</td>
    </tr>
    "Row Template 2"
    <tr class="#1#">
    <td>#2#</td>
    <td>#3#</td>
    <td>#4#</td>
    <td>#5#</td>
    <td>#6#</td>
    <td>#7#</td>
    <td>#8#</td>
    <td>#9#</td>
    <td>#10#</td>
    <td>#11#</td>
    <td>#12#</td>
    <td>#13#</td>
    <td>#14#</td>
    <td>#15#</td>
    <td>#16#</td>
    <td>#17#</td>
    <td>#18#</td>
    </tr>
    "Row Template 2 Condition" - use based on PL/SQL Expression
    '#DOCUMENT#' is null
    The "Row Template 1" is to be show only if Column "DOCUMENT" is not null, otherwise "Row Template 2" is to be show if Column "Document" is null. I have test various examples:
    '#4' is null, '#4#' is null and '#DOCUMENT#' is null. Without effect. Only "Row Template 1" is showing.
    Can anybody help me?

    Hi,
    null in conditions would return no value rather than 'null' - you can catch this by using an empty string - so:
    '#4#' = ''Andy

  • Report Template -  NULL in Row Template Condition

    I just found a workaround, but,
    in a report template, in a Row Template # Condition, based on a PL/SQL expression, the condition always fails if/when #COLUMN_VALUE# was NULL.
    I worked around this with a NVL in the query - but, is there a better way?
    I want the column highlighted when the value is null - to point out where values need to be entered - i.e. when the record needs to be updated.
    THanks - Karen

    Ok, I have since found out that the setting to make a report template
    available in the Based on > Visualization templates is in the
    'package.xml' file for each report. The value that needs to be changed
    is <IsQueryParameterized>0</IsQueryParameterized> and change the 0 to 1.
    kmcooke1
    kmcooke1's Profile: https://forums.netiq.com/member.php?userid=5806
    View this thread: https://forums.netiq.com/showthread.php?t=49091

  • Report Row Template: Column condition

    In a classic report using a Generic Column template, one can use the Column Condition attribute to conditionally render the column.
    But when using a named column (row template), even though the Builder allows one to specify this condition, it doesn't appear to be used.
    So how would one implement conditional column display in these templates?
    Thanks

    Hi,
    That's actually easier. See: [http://apex.oracle.com/pls/otn/f?p=267:60]
    The SQL for both reports is:
    SELECT EMPNO, ENAME, NVL(SAL,0) SAL, NVL(COMM,0) COMM
    FROM EMP
    ORDER BY EMPNOThe SAL and COMM columns have been formatted using:
    999G999G999G999G990D00For the Row Template, the Row Template 1 setting contains an empty space (you have to have something in there otherwise Apex adds back in a default row containing five cells!). The condition for this is:
    TO_NUMBER('#COMM#','999G999G999G999G990D00') < 100The template will see the data as a string, so we use the same number format to convert that string back into a number and compare this to 100. If we didn't use formatting on the numbers and we are sure that every row contained a number (hence the use of NVL()), then you could use:
    #COMM# < 100Row Template 2 contains the format for the rows that need displaying:
    &lt;tr&gt;
    &lt;td class="t18Data"&gt;#1#&lt;/td&gt;
    &lt;td class="t18Data"&gt;#2#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#3#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#4#&lt;/td&gt;
    &lt;/tr&gt;and is unconditional.
    The only other settings on the Row Template are the Before Rows:
    &lt;table class="t18Standard" style="border-collapse:collapse; border:1px solid black;"&gt;
    &lt;tr&gt;
      &lt;th class="t18ReportHeader"&gt;Empno&lt;/th&gt;
      &lt;th class="t18ReportHeader"&gt;Ename&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Sal&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Comm&lt;/th&gt;
    &lt;/tr&gt;and After Rows:
    &lt;/table&gt;Of course, you will note that the record counters at the bottom still show the number of records in both reports - as the SQL still outputs the same data, this doesn't change.
    Andy

  • Color report rows based on a value in that row

    I would like to Color report rows based on a value in that row.
    For examplle with the "EMP" table:
    I would like job=MANAGER to be red and job=CLERK to be green etc etc
    The other example I found only had the option of one color either the highlight or the default color.
    I am looking for a way to do multiple colors.

    Hi,
    In the row template, you can use #1#, #2#, etc to indicate where a field in the report needs to be output. This does not have to be plain text - ie, you can use it within style tags if you like.
    So, take a query like:
    SELECT EMPNO,
    ENAME,
    DEPTNO,
    DECODE(DEPTNO, 10, 'green', 20, 'red', 30, 'cyan', 'white') BG_COLOUR
    FROM EMPYou get columns 1=empno, 2=ename, 3=deptno and 4=bg_colour. In the row template, you can then do:
    Before Rows setting (sets up the table):
    &lt;table&gt;
    &lt;tr&gt;&lt;td&gt;ID&lt;/td&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;Dept&lt;/td&gt;&lt;/tr&gt;After Rows setting (closes the table):
    &lt;/table&gt;Row Template 1 (used for ALL rows):
    &lt;tr style="background-color:#4#;"&gt;&lt;td&gt;#1#&lt;/td&gt;&lt;td&gt;#2#&lt;/td&gt;&lt;td&gt;#3#&lt;/td&gt;&lt;/tr&gt;Then, for every row, the colour that has been calculated using the DECODE function will be used in the style tag to colour the background for the entire row.
    How you determine the colours is up to you. I've used DECODE here, but you could use a field on the DEPT table to hold this and use this in your SQL statement.
    Andy

  • Coloring each row  Dynamically in WebDynpro using SALV_WD_TABLE component

    Hi All,
      We have a requirement in WebDynpro  ABAP ,to display the ALV  table rows with different colors on the bases of come condition at runtime.
        We have checked but got only for column wise but not row wise.
    Can we archive it for Row wise also?
    Thanks in advance.
    CB

    Hi Saji,
    Please go through this...
    coloring  the rows of alv dnamically
    Color ALV column and rows
    Cell color change in ALV
    Cheers,
    Kris.

  • Dynamic coloring of rows using FM (Reuse_alv_grid_display.)

    I need to color the rows depending on the condition dynamically . I am using FM Reuse_alv_grid_display for ALV . I have the code using Oops Concept, But i need to know how can we do using the Function Module. Please Clarify

    Hi,
    In the final internal table you declare one fieldsline_col(4) type c.
    Data: begin of itab occurs 0, "final internal table.
          line_col(4) type c,.
         end of itab.
    IF .......your condition.
        loop at itab.
          if itab-WERKS = '1000'.
            itab-line_col = 'C600'.
          endif.
          modify itab.
          clear itab.
        endloop.
    Next build your FIELDCATALOG ......
        gt_layout-zebra = 'X'.
        gt_LAYOUT-DETAIL_POPUP = ' '.
        gt_layout-info_fieldname = 'LINE_COL'.
    Next pass this to your FM.
    I hope this will help you.
    Thanks.
    If your issue is solved award points and close the thread if not revert back.
    Message was edited by: Deepak333 k
    Message was edited by: Deepak333 k

  • Is it possible to add color context row with javascript?

    Hi,
    Is it possible to add color context rows for a graphic object with javascript?
    Thanks.

    The match syntax changed between version 12.0 and 12.1, so my recommendation to you is to build an iGrid template the way you would like to do it with javascript, then export the display template from the workbench. 
    Open the template in a text editor and observe the format for the MatchValues, MatchColumns, and MatchColors strings.
    Then your javascript will follow the document.APPLET.gridObject().setMatchXXX("xxxx"); as shown in the script assistant.

  • Can we put condition for color in bex query designer

    hi all,
    can any one guide me how to put a condition for color settings in query designer
    for example:
    i have a key figure like ANSWERED%.in analyser it should display in red if  answered% exceeds 95%.
    please help me in this issue.
    regards
    Vamshi D Krishna.

    Hi,
    Use Exceptions while designing your Query.
    Please go through the link
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/21b4cd14cd06f4e10000000a422035/frameset.htm

  • SSRS 2012 Conditional Formatting Color Issues When Exporting to Excel

    Hi all,
    We recently upgraded to SQL 2012 from SQL2008 R2. I'm having a strange issue with SSRS2012.
    One of the report has conditional formattings on cell background colors. Everything works fine when render the report in browser or preview mode. However, the conditional formatting stop working when export the report to Excel (no issues if
    export to pdf). All cells are high-lightened with pre-defined color although it should only high-lighten those cells that fulfil the condition.
    Has someone encountered this issue before ? Thanks for any help.

    Hi ZZ02,
    I have test the scenario in my testing environment, however, everything goes well when exporting to Excel format. The issue might be related to the expression for the conditional background color. To make further analysis, please post the expression as well
    as the report design structure.
    Additionally, in SQL Server 2012 Reporting Services, the Excel rendering extension renders a report to the native format of Microsoft Excel 2007-2010, the format of which is ExcelOpenXML. By default, the previous version of the Excel rendering extension,
    compatible with Microsoft Excel 2003, is disabled. At this time, I suggest that you enable the Excel 2003 rendering extension by modifying the RSReportServer.config file. After that, the Excel 2003 rendering format will be available on report manager (not
    available in Report Designer). So, please export the report from report manager and check the result again.
    For more information about enable the Excel 2003 rendering extension, please see:
    http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/0713de27-dcc0-4e51-81ac-5272647d171f
    Regards,
    Mike Yin
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here. 
    Mike Yin
    TechNet Community Support

  • Report Row Template - header

    Hi
    I have made a custom "Report Row Template". I have write the "header" direct in the html code. Is that a problem if i want to translate the application? Is there a way how to use the headers from the apex?
    Best Regrads
    Jesper Vels

    Hello Jesper,
    OK, I can see now what you are trying to do. Unfortunately, the only similar example I'm familiar with - http://apex.oracle.com/pls/otn/f?p=11933:108 – Is also using hard coded text for the headings.
    I can show you how to get to these headings, and how to use them on your template, but I'm afraid this is not a generic solution, as I couldn't find an active substitution string for the column headers.
    As there isn't any variables to hold these column names, we need to define our own. You can do that using an application items or hidden page items. Let's say I defined three hidden items on my report page: P1_HD1, P1_HD2, P1_HD3. Each item will be defined with Source Type of SQL Query, and Source Use of "Only when …". The Source Value for the first item will be as follow:
    select  heading
    from  FLOWS_020200.APEX_APPLICATION_PAGE_RPT_COLS
    where  APPLICATION_ID=:APP_ID and
           PAGE_ID=:APP_PAGE_ID and
           DISPLAY_SEQUENCE = 1;The DISPLAY_SEQUENCE should change according to the sequence of the column.
    If you choose to use an application items, you'll need to use a before header computation on your report page, with the same query, to populate the application items.
    In order to use these items in the report template, we need to use the "&P1_HD1." notation. You can have something like this, for the first header in your report query:
    <tr><td>&P1_HD1.: </td><td>#1#</td>   . . .Hope this helps,
    Arie.

  • How can i change backgroud color of global template in fusion cloud?

    Hi all.
    someone of you could help me?
    How can i change backgroud color of global template in fusion cloud?

    Hi.
    Making CSS changes like this is currently only possible off-line, using the JDeveloper-like Skin Editor. This is described in our blog post here, a demo on our YouTube channel in this video, or the product documentation here. Coming soon is an online 'theme editor' feature which allows this kind of customization online. I would recommend that you raise a request with the Cloud Operations team to verify if they support the addition of custom skin files, otherwise you are limited to the online branding options currently available.
    Kind regards
    Richard
    FA Developer Relations

  • How can i change the color of row?

    hi
    I want change my background color of rows.
    for examole first row ,white and next gray and the other rows.
    thanks.

    Hello,
    May be you also select the rownum and use the following example. For more information, please search 'SRW.ATTR' in report help.
    function F_SALFormatTrigger return boolean is
    begin
    if :rownum = 1 then
    srw.attr.mask := SRW.BORDERWIDTH_ATTR +
    SRW.FBCOLOR_ATTR +
    SRW.BBCOLOR_ATTR +
    SRW.BORDPATT_ATTR +
    SRW.FFCOLOR_ATTR +
    SRW.BFCOLOR_ATTR +
    SRW.FILLPATT_ATTR;
    srw.attr.borderwidth := 1;
    srw.attr.fbcolor := 'red';
    srw.attr.bbcolor := 'blue';
    srw.attr.bordpatt := 'checker';
    srw.attr.ffcolor := 'yellow';
    srw.attr.bfcolor := 'green';
    srw.attr.fillpatt := 'crisscross';
    srw.set_attr (0, srw.attr);
    end if;
    RETURN(TRUE);
    end;
    Regards,
    George
    hi
    I want change my background color of rows.
    for examole first row ,white and next gray and the other rows.
    thanks.

Maybe you are looking for