Incorrect display format in report column

Hi.
A report have two columns, the first display a value based in a case expression:
NVL (DE.IMPORTE, 0) IMP_CHEQ
the second colum, displays the value formatted:
CASE WHEN DE.IMPORTE IS NULL THEN '-'
WHEN DE.IMPORTE > 0 THEN TO_CHAR (DE.IMPORTE, 'FM99G999G990D00')
ELSE '<FONT COLOR="#FF0000">' ||
TO_CHAR (DE.IMPORTE, 'FM99G999G990D00') ||
'</FONT>' END IMP_CHEQUES
As I want to sum the values of the formatted column, I choice the "sum" option in the first column, but use #IMP_CHEQUES# in the HTML Expression Column Formatting of the first (unformatted) column.
The formatting part of the column is "ignored", because the values are displayed in black, instead the indicated red color. What am I doing wrong?

Denes, thanks for your reply.
I was looking your example, and learning a little more about html formatting.
In my problem, I saw more similar your example in http://htmldb.oracle.com/pls/otn/f?p=31517:111
I redo my answer:
A column value (DE.IMPORTE as IMP_CHEQ), is an important monetary indicator,
But the report reader wants to look the negative values in red, and for that I am using CASE to format the value color (according to the values been positives, null or negatives):
CASE WHEN DE.IMPORTE IS NULL THEN '-'
WHEN DE.IMPORTE > 0 THEN TO_CHAR (DE.IMPORTE, 'FM99G999G990D00')
ELSE '<FONT COLOR="#FF0000">' ||
TO_CHAR (DE.IMPORTE, 'FM99G999G990D00') ||
'</FONT>' END IMP_CHEQUES
in other column (IMP_CHEQUES) non visible.
Then, the column doesn't summarize IMP_CHEQUES, because these values aren't numbers.
The solution is show (and SUM) IMP_CHEQ, but set the HTML Expression column attribute as #IMP_CHEQUES#
That I don't understand is why any negative values are displayed en red color. Some is re-formatting the red colored values to the original
black color, and can't let function the "FONT COLOR /FONT" couple.
Thanks again, Marcelo.

Similar Messages

  • Incorrect date format on report instance

    Hi,
    I have a problem (well a question) relating the the instance detail information behind a report instance in BusinessObjects Enterprise XI3.1 SP2 FP2.5. On one of my servers I can view the history of a report thorough InfoView and then select the link in the 'Status' colum. This displays the 'Instance details' page. On this page the 'Creation Time', 'Expiry', etc. are shown in the format dd/mm/yy hh:mm:ss. But, on my other server the same page shows these records as 'mm/dd/yy hh:mm:ss'.
    I suspect that there is a server setting to be made somewhere, but where?
    Any ideas please?
    Mike

    Hello,
    Found it. I run my SIA under a service account and not a user account. This service account was using the wrong Regional settings. When changed to the correct Regional settings the reports showed the dates in the correct format.
    Thanks for looking.
    Mike

  • Formatting a report column with "%"

    I must format a field of a column report with the symbol %
    like this
    50%
    whet i must put in the Number / Date Format of the field ???
    Thak's

    GcG-Italia wrote:
    I must format a field of a column report with the symbol %
    like this
    50%
    whet i must put in the Number / Date Format of the field ???Nothing. Oracle number format models don't support "%".
    In a standard report or APEX 4.2 interactive report use an HTML Expression in the column attributes:
    #PERCENT_COL#%In an interactive report prior to 4.2 it has to be done in the query as shown above, which adversely impacts sorting, exporting etc as the column value is no longer a number.
    Help us to help you. When you have a problem you should provide as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.

  • Incorrect output formatting when report send directly to printer

    Hi All,
    We have developed a report in report 6 and initially configured to send output to file and then open in notepad and then send this output to dot matrix printer. In this case the output prints correctly. Now we want to send this putput directly to laser printer but when we send this output to laser printer extara baln line are printing and due to this output is printing on two pages which we previously prinig on one page which is the requiremnt. Can anyone help me to identify what wrong is going?
    regards,
    Muhammad Asif

    Hi,
    there is a reports forum where this question is handled best. Though Forms is the initiator of Reports, it has nothing to do with the formatting.
    Frank

  • Implicit date format conversion of report column

    Hello,
    The following expression defines date format for report column implicitly and doesn't reflect FSP_LANGUAGE_PREFERENCE with language independent format mask of the column attribute anymore:
    decode(end_date, to_date('31.12.2047', 'dd.mm.yyyy'), null, end_date) closed
    end_date is of TIMESTAMP(0) WITH LOCAL TIME ZONE type, format mask of the column attribute: DS TS
    Is it expected behavior?
    Thanks

    Edward Shevtsov wrote:
    Hello,
    The following expression defines date format for report column implicitly and doesn't reflect FSP_LANGUAGE_PREFERENCE with language independent format mask of the column attribute anymore:
    decode(end_date, to_date('31.12.2047', 'dd.mm.yyyy'), null, end_date) closed
    end_date is of TIMESTAMP(0) WITH LOCAL TIME ZONE type, format mask of the column attribute: DS TS
    Is it expected behavior?
    ThanksThe reason might be that you compare different datatypes in the SQL statement. The output of decode depends on those parameters.
    You can cast the column to a specific datatype or you make sure that your wanted datatype is used during the decode.
    example
    decode(end_date, to_timestamp_tz('31.12.2047', 'dd.mm.yyyy'), null, end_date) closed
    or
    cast(decode(end_date, to_date('31.12.2047', 'dd.mm.yyyy'), null, end_date) as timestamp(0) with local time zone) closed

  • SSRS 2005 - How to format a time column so it shows as HH:MM?

    Hi all
    I have a field called ScheduledTime. If I include this field in a report, that column displays time as 39916, etc. It is always a 5 digit number. How can I format that report column so that the time shows as the actual time in a HH:mm format? eg 23:57,
    01:06, etc. I have already set the column format to t, T, HH:mm, but none of them works
    Thanks
    Naz

    I think below expression would work..
    =format(DateAdd("s",Fields!timeField.Value,"1/1/2000"),"HH:mm")
    Replace Fields!timeField.Value with your report specific field
    Cheers,

  • Script to find report columns with XXS vulnerabilities

    Hi,
    Report columns with display as "Standard Report Column" are vulnerable to Cross Site Scripting attacks. I have written a simple script to find these report columns and described an easy way to change them all at once. Check: http://wiki.shellprompt.net/bin/view/Apex/XssExamples
    Regards Pete

    Hi Pete,
    good that you bring up that security issue!
    I was talking to Joel during ODTUG about the "Standard Report Column" default the wizard uses and he said that this might be changed in the next version to use the more secure "Display as Text (escape special characters, does not save state)"
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Problem in reading the row values in table display format.

    Hi All
       I created UI asTable display format using three columns( name, email and resume ).
    In this Resume column type is Link to Action. This entire column contains text as Resume  - this element type is Link to action.
    When click on Resume that respective row values I have to capture.
    I have used following code, but It is capturing based on lead selection. ( On the UI, lead selection row is different and clicking on Resume row is different ).
    DATA lo_nd_email TYPE REF TO if_wd_context_node.
      DATA lo_el_email TYPE REF TO if_wd_context_element.
      DATA ls_email TYPE wd_this->element_email.
      DATA lv_email_ref LIKE ls_email-email_ref.
    navigate from <CONTEXT> to <EMAIL> via lead selection
      lo_nd_email = wd_context->get_child_node( name = wd_this->wdctx_email ).
    get element via lead selection
      lo_el_email = lo_nd_email->get_element(  ).
    lo_el_dashboard_1->get_attribute(
        EXPORTING
          name =  `NAEM`
        IMPORTING
          value = lv_name ).
    Please help me on this ..thanks in advance....

    Hi,
       Just declare a variable in the parameters of the method,which u declare for the cell action.
    CONTEXT_ELEMENT      type ref to                      CONTEXT_ELEMENT         as importing paramter
      code:
        context_element->get_static_attributes(
          IMPORTING
            static_attributes = stru_sflight ).
    this will surely solve ur problem
      regards,
    Madhu

  • How to display data in interactive report column without colons (:)

    Dear Apex gurus,
    I'm a newbie and have just created an Apex application from a spreadsheet. I've created a named list of values and used it in a checkbox against a field in the default page 3 Create form.
    When I've selected multiple values in my check box in the form, the data in the interactive report appears as one line with colons separating the selected values like this: Dog:Cat:Bird
    What I would like is to have the data appear in the interactive report column as a multi-line list like this:
    Dog
    Cat
    Bird
    I can work around this by modifying the SQL code in the Region Source of the Region Definition of the report (Default Page 1 interactive report) to replace the colons with <br>
    SELECT replace("PETS_CHOSEN",':','<br>') "PETS_CHOSEN", FROM "MYAPP" Note: this doesn't format properly in the posting. I replace the colon with a html br
    This works, but seems to be a hack to me. I am guessing that I've missed a simple option setting somewhere, but I can't find it.
    The other problem with this solution is that when I export the report to Excel, what is exported is Dog<br>Cat<br>Bird, which is seems worse than colons.
    Thanks,
    - Morgan
    Edited by: mnrussel on 16-Feb-2009 04:13

    Hi Morgan,
    I think you have at least two choices:
    1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
    2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and &lt;br&gt; tags in the on-screen report version
    Andy
    ps - To display tags in a post, use &amp;lt; for &lt; and &amp;gt; for &gt;

  • Report in Crystal 10 incorrectly displays rows when it shouldn't

    We have a problem in Crystal Reports 10 whereby the report incorrect displays 6 rows/records in the report but when we run the exact same SQL statement on its own (outside of Crystal) it does not bring back any results.
    Clare

    That didn't work either. I'm still getting the wrong timestamp.
    But, I did try something else, with more unexpected results. Just for the heck of it, I exported my workbook to excel (the workbook showing the 12:00 AM timestamps). When I opened the Excel file, it has the Archive Date with the correct times. Very strange. I export the workbook with all 17-NOV-09 12:00 AM timestamps in every Archive Date row, and in Excel it opens with the correct dates (17-NOV-09 10:15, 10:18 and 10:23 AM). So weird.
    That seems to reinforce that Discoverer can at least see the dates as they exist in the data warehouse, but for some reason, it insists on displaying 12:00 AM. And exporting the 12:00 AM results to Excel actually produces the correct times. Is this like some Java bug or something? I seem to get bit by Java problems more often than not.
    ***EDIT***
    I shouldn't say your suggestion didn't work entirely. It worked in that I am no longer getting 17-NOV-09 12:00 AM. But, it's returning a timestamp that does not exist for the given record. For example, all 3 Nov 17th timestamps (in the Discoverer report) are now showing 17-NOV-09 10:11 AM. 10:11 AM isn't even a timestamp available in the database for any record in the table. Why did it arbitrarily pick 10:11? It seems like your suggestion to create a TO_CHAR calculation from the column is on the right track, but the 10:11 AM thing is odd.
    Edited by: user527082 on Nov 17, 2009 4:29 PM

  • Vertical allignment of columns in tabular format of report in obiee 10g

    Hi,
    I have a client requirement in which the colums are to be alligned vertically instead of being displayed horizontallty which is the default format in obiee.
    Can anyone help me in achieving this requirement .
    below goes the format of report we need in our project :
    Column Name Value
    Trade Summary:     
    Counterparty:     [Counterparty Name]
    Trade ID/ Global ID:      [Trade ID / Global ID]
    Trade Date:     [MM/DD/YYYY]
    Settlement Date:     [MM/DD/YYYY]
    Notional:     [CCY2] [Notional] <- show the non delivery currency
    Thanks,
    Mayuri Shah

    Hi,
    Change the columns as rows and rows as columns in the pivot view properties.You can display all the columns as rows and data as columns.
    If you want display the column data in sections place required columns in section .
    mark if helpful/correct..
    thanks,
    prassu

  • CSS to format a textarea column in an SQL report

    I'm using the following CSS class called "fixed" to format a multi-line column (textarea) in a standard SQL report (Column Formatting Attribute: CSS Class). Each row is now hard coded to a height of 40px or about 4 rows with a scrol bar. If the row has no data in it I'd like to default the row to a height of 1. Is it possible to do that?
    <style type="text/css">
    .fixed {display:inline-block; width:150px; height:40px; overflow-y:scroll; font-size:9px;}
    </style>
    regards
    PaulP

    PaulP wrote:
    I'm using the following CSS class called "fixed" to format a multi-line column (textarea) in a standard SQL report (Column Formatting Attribute: CSS Class). Each row is now hard coded to a height of 40px or about 4 rows with a scrol bar. If the row has no data in it I'd like to default the row to a height of 1. Is it possible to do that?
    <style type="text/css">
    .fixed {display:inline-block; width:150px; height:40px; overflow-y:scroll; font-size:9px;}
    </style>Try <tt>max-height:40px</tt> instead.
    For a less speculative response, provide complete information on the environment and any restrictions therein:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region type(s)
    and a reproduction of the issue on apex.oracle.com that we can experiment with.
    Is this just to limit the size of an actual report or is the <tt>textarea</tt> editable within a tabular form ? If the former I'd just use a <tt>div</tt>...

  • SQL Report columns formatting

    Hi Everyone,
    I've got a basic report with a column that is a concatenation of other columns (used for break formatting), and I want to give the effect that there are still separate 'columns' in the concatenation. I've tried using CHR(9) and RPAD in the SQL query to add the 'whitespace' but as soon as Apex gets hold of it, the extra spaces are removed and I'm left with only a single space.
    It does the same thing when the "Display As" value is changed to either "standard report column", or any of the "Display as text" types.
    Any ideas? This is apex 4.0.0
    Thanks!

    I've got a basic report with a column that is a concatenation of other columns (used for break formatting), and I want to give the effect that there are still separate 'columns' in the concatenation. I've tried using CHR(9) and RPAD in the SQL query to add the 'whitespace' but as soon as Apex gets hold of it, when the browser renders the output in accordance with the HTML spec the extra spaces are removed and I'm left with only a single space.The HTML specification instructs user agents to collapse white space characters, so spaces and ASCII tabs in options will be treated as a single space.
    In a standard report use
    <li><tt>white-space: pre</tt> in the CSS Style property for a CSS approach
    or
    <li>The HTML Expression property for a <tt>&lt;pre&gt;</tt> HTML wrapper (ensuring the Display Text As column attribute is Standard Report Column rather than the default Display as Text (escape special characters) ):
    <pre>#COLUMN_NAME#</pre>Better still, create a custom report template using suitable mark-up so that there are "separate columns" in the report.

  • Dynamic Selection of Report Column Format

    Is it possible to dynamically set the number format on a report column? I thought it would be as easy as setting the 'Number/Date Format' to a session state variable such as &NUMBER_FORMAT. However, when I tried this the column returned the following value ##########.
    Any ideas?
    Thanks,
    David

    OK, this is a favorite hack of mine combined with Sergio's suggestion. Essentially, we select the column twice, display it with one column using Sergio's idea and sort it on another hidden and unformatted copy of the column (hope I didn't lose you yet):
    1) Add another column of the same source to the query and give it an alias:select ename,to_car(sal,'&NUMBER_FORMAT.') sal,sal sal_sort
      from emp2) Edit the report > report attributes > sal_sort column attributes. In the HTML Expression field, type #SAL#.
    3) On the report attributes page, unclick the "Show" column for sal.
    Now you are displaying the SAL column in the SAL_SORT column allowing the reporting engine to properly sort the column based on the unformatted SAL_SORT. I use this technique a lot for quarters. I'll show Q105, but it's sorting on an actual date behind the scenes.
    Happy hacking!
    Tyler

  • Conditional Display of Report Columns

    I'm trying to hide a vertical list column, but it is either permanently off or permanently on. Any ideas!
    For example:-
    Display Department name if not null

    now i get why you're not liking the report templates approach to this issue. to be honest, my other suggestion on that "Referencing Report Columns" thread might probably be okay here. assuming you're looking up your one detail row with a primary key value, doing the extra query can't be too expensive. if you don't want to go that route (though i'm likin' it, the more i think about it) or the templates one, you might consider either of these two angles:
    1) code the detail page's region as a plsql anonymous block that selectively shows what it needs to show.
    2) code the appropriate nvl's or case statements into your detail page's report region and have that select statement select out most of your html formatting for you.
    i don't particularly like either of the two above suggestions, but now you at least have them. i think i'd run with the solution where you select the detail row twice, but please don't quote me on that.
    regards,
    raj

Maybe you are looking for