Conditionally displaying different images in a report

Hello. I have a simple report. In one column of it I have a link to another report. Instead of showing the value for the column, I show an image using the column's Column Link's Link Text property.
In the Link Text field, I put an <img src="#WORKSPACE_IMAGES#my_image.jpg"> tag.
Works like a charm - on the report the column displays little icon images that can be clicked on that take the user to a different page.
I would like to conditionally (based on the actual value of the column's row) display two different images. Think of a green Up arrow vs. a red Down arrow.
How can I do that?
Or can I at least have the image above conditionally display and if the condition is not met, not display anything?
I notice each of the report's column's attribute page has the Conditional Display section. How does work for a column?
Thanks
Boris

Use a case expression in the query, e.g.
case
  when x <= 50 then 'down.png'
  else 'up.png'
end icon
...and change the Link Text field to
&lt;img src="#WORKSPACE_IMAGES##ICON#" alt=""/&gt;

Similar Messages

  • Displaying JPG images in PDF report

    Hi
    We developed a report, wich generates modul documentation from designer repository. In the repository the JPG images are attached to modules. The images have different sizes. The report reads the modules description and displays the images attached to modules.
    The report resizes the images. Seems like the image wide is resized to fit perfectly in the containing frame.
    This behavior is god when we have a bigger image, than the containing frame. But if we have a smaller image than the frame, the reports enlarges the image.
    How can we prevent this behavior?
    Thanks

    I think for that particular image object in layout model, if you can set the vertical and horizontal elasticity to fix, the image will not resize.
    Thanks
    Rohit

  • How to display an image in a report ?

    I put the following code into the PLSQL - section <after header is shown>:
    declare
    v_str varchar2(2000);
    v_rowid varchar2(200);
    begin
    select ROWID into v_rowid from mytable where id=1;
    v_str:=htf.img(curl=>'http://rdspc23/pls/portal30/PORTAL30.wwa_app_module.file_download?p_block=DEFAULT&p_object=BILD&p_source='&#0124; &#0124;PORTAL30.wwv_htf.url_encode(v_rowid));
    htp.p(v_str);
    end;
    (This code is extracted from a form and inserted in my report.)
    If the image is in the browser-cache i can see the image and everything works properly. If the image is not in cache then there is only a broken link.
    When i try the link in a separate browser window the folloing error message appears:
    No data returned from stored procedure
    The PL/SQL gateway invoked a stored procedure as part of processing the URL but the procedure returned no data.
    What can i do to insert an image in a report.
    Are there any documentation for the plsql-packages which portal is using ?

    I tried it doing it this way and it worked -
    1. copy the image into the directory aliased in 9iAS configuration file as '/images/'.
    2. In the PL/SQL code section after header, I write the following code -
    begin
    htp.p('<img src="/images/pobexp.gif"/>');
    end;

  • How to display the Image in PDF report by using iText Report

    Hi
    Im trying to display the image which is very big one.
    This is my code
    Document document=new Document();
    PdfWriter.getInstance(document,new FileOutputStream("imagePDF.pdf"));
    document.open();
    Image image = Image.getInstance ("1.bmp");
    document.add(new Paragraph("Images in PDF"));
    document.add(image);
    document.close();
    But the image "1.bmp" is displayed partially. Its not spanning to the next page.
    Can anyone help me to solve this one?
    Thanks in Advance
    dhilip

    Do you actually want the image to span multiple pages? I am not sure that will be possible without splitting the image; the itext mailing list would be the place to ask.
    You could make the the page size big enough for the image using Document.setPageSize()

  • Display different footer in main report of SSRS based on sub report

    I have a main report in which there are two sub reports and then those two sub reports each contain one sub-subreport.
    The following will give you an idea
    Main Report
    ----->Sub Report 1
    ------------>Sub Sub Report 1
    ----->Sub Report 2
    ------------>Sub Sub Report 1
    I am trying to display name of subreport in footer of main report depending on which subreport user is currently in. So let's say if user is viewing Sub Report 1 then it should display in footer of main report "Sub Report 1" (this is actually coming
    from database and is not like displaying some static text but for the time being ignore this)  
    If user is viewing Sub Sub Report 1 then footer of main report should say "Sub Report 1: Sub Sub Report 1"  
    After searching a bit I found out that:
    1. Sub report footer will not be shown in Main report hence this option is ruled out
    2. You cannot pass parameter from sub report to main report so this option is also ruled out
    But looks like you can use Shared Variables between Sub Report and Main Report. I tried to do this but looks like it doesn't work. Here's what I did:
    In my Sub Report 1, I declared a shared variable as below:
    Public Shared Dim sharedVariable as String = "Sub Report 1"
    Now in my Main Report I wrote the following function in code just to test if it prints it on screen on not.
    Public Function PrintSharedVariable() as String
    Return sharedVariable
    End Function
    But when I run this report, it shows error that sharedVariable is not declared in Main Report. How do I use shared variables and will it work in my case?

    Hi Frank,
    According to your description, you want to show the subreport name in the main report. Right?
    In Reporting Services, all the custom code is only work for the current report. The sharedVariable you created in subreport can't be used in main report. That's the reason why it throws the error because there's no sharedVariable in main report. For your
    requirement, the most effective workaround is having a textbox with go to report Action and passing the report name as parameter back to main report.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Conditional display of buttons in a report

    Hello all,
    I'm a beginner in HTMLDB 2.0 so excuse any obvious mistake of mine!
    I have a report about the running status of some procedures. I wanted to had a button to each line of the report to start or stop that procedure.
    If the line contains a Y I want to display a Stop button, if it contains a N I want to display a Run button.
    I hope that I explained what I want to do.
    thanks,
    Eduardo

    vitaly:
    That will only display the buttons given the conditions, but is not exactly what I wanted. I want a button in each row of the report.
    Something like this:
    Action | Procedure Name | Paused |
    ----------------------------------------------------|
    [Pause] | Test_1 | N |
    [Resume] | Test_2 | Y |
    ----------------------------------------------------|
    I think that if this is not possible I will put a radiobutton instead with a global button labelled Change Status, or something similar.
    But thank you for your reply.
    Regards,
    Eduardo

  • Conditional Display Of Headings on Grouped Report

    I have a grouped report in 2 seperate tables. I want to print the values of 'H1' and 'H2' (which are my headings for 'Group:' and 'Name:') only 1 time per page. The grouped data needs to print on every occurance. How do I do that?
    Group: 1 Name: Bob
    ___001
    ___002
    ______2______Tom
    G
    H1 GROUP_FIELD H2 NAME
    F SECTION PERIOD E
    E
    G= <xsl:for-each-group select="DOCUMENT/REGION/ROWSET2/ROWSET2_ROW" group-adjacent="GROUP_FIELD">

    try this
    you can say it as display it as header of the table & repeat on top of every page in table row properties.
    And the H1 and H2 is in the loop, so it would ideally repeat for all the instances of row.
    May be we can limit for only one time, and not as one time on every page.
    in that too, you have value which is changing next to the H1 and H2.
    so it is adding little more confusion to your requirement.
    alternatively send me the xml and template and existing sample output.

  • ORA-01403 displaying image in a report

    Hello.
    I have a table with BLOB column that stores an image. I created a report on this table trying to display this column's images. I surround the column with dbms_lob.getlength() function in the SQL of the report and I use the following for the column's Number / Date Format in the "Column Formatting" section of the Report Attributes:
    IMAGE:PROJECT:PRODUCT_LOGO:PROJECT_ID::::::inline:Download
    This syntax is what makes things works for me in other areas of the application where I display stored images in a report. But not here. The report works, returning a number (representation of the getlength function returned value), as it should. As soon as I add the above Number / Date Format, I get:
    report error:
    ORA-01403: no data found
    What is different in this report from the others that work is that this report's SQL is a join of a number of tables, not a straight select on one table like the others. In the SQL, the tables are referenced by alias, so table PROJECT's PRODUCT_LOGO column is referenced as a.product_logo in the query's select clause.
    I don't see any other substantive differences.
    What could be the cause of the failure?
    Thank You
    Boris

    Thank You Scott for your reply.
    I was able to figure it out.
    In my report query, I forgot to reference PROJECT_ID, which is the primary key of the table by which the IMAGE mask is called. Apparently, it is necessary to awalys include the primary key in the query SELECT clause, where you actually need it in the report or not, just to make the image retrieval in the report work.
    Thank You
    Boris

  • Display scanned image from the image server in the browser in BW Reports...

    Hi All,
    I need to display a scanned image of invoice In BW Reports ,  the information about image ie URL Llink Present in the table TOA01
    u2022
    TOA02
    u2022
    TOA03
    u2022
    TOAHR
    u2022
    TOADL .  I have an idea that we can extract the information from above table to BW and can able to Display the image in WAD Reporting ................
           Can anybody help regarding this .............? 
    Give some idea or material regarding this will be help full ?

    Hi Guru,
      Check the below link, it will be useful for you:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0c8bfa4-7348-2c10-b9ae-bc1ff04a9aeb?QuickLink=index&overridelayout=true
    Thanks
    Pawan

  • How do I display call out accessories with different images?

    I need some help with an app I'm developing.  I'm displaying a map with an array of annotations.
    I have managed to display the map &amp; annotations successfully.
    What I want to do next is have call out accessories that display different images everytime they are tapped.
    Can anyone help with this? I have managed to display a right call out accessory but I'm getting stuck here &amp; I don't know how to get my code to display images.
    Any help wil be greatly appreciated!

    baltwo: Thanks for the tip, I didn't know how easy it was to set up custom icons in OS X. In this case it's a difficult solution because it will have to be done by hand for every single folder, which is a problem if I'm going to have these in two places. I'm new to Automator but there doesn't seem to be a way to have it; 1) Select all the folders in a directory. 2) Copy the first image in each folder to the clipboard and have it use that image as each folder's icon.
    Barney-15E: I know it sounds moronic, but yes. I've tried iPhoto but it's not a very good solution in this case. My folder structure is like this:
    Root -> 282 image folders with 10 to 60 pictures in each.
    All I really need is the ability to see at a glance what each image folder has without opening each individual folder. The folders are numbered sequentially (1-282 in this case) rather than by proper names, so this is the most efficient way.

  • How to display different icon within WDA alv table base on row data ?

    Hi,
    is that possible to display different icon for every row within ALV table depending on the row data ?
    for instance if the status 'S' display ~Icon/SuccessMessage and 'E' display ~Icon/ErrorMessage ?
    because base on this code below i only can set 1 icon for the whole row data.
    LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'ICO'.
            CREATE OBJECT lr_caption.
               lr_caption->set_image_source( value = '~Icon/SuccessMessage').
               <fs_column>-r_column->set_cell_editor( lr_caption ).
        ENDCASE.
      ENDLOOP.
    Thank you in advance.
    Fernand

    Hello,
    Yes it is possible to display different images based on data.
    For that what you can do is create one attribute 'STATUS' of type string in context node which you are mapping to ALV.
    And fill that attribute with the path to image based on your requirement like for status 'S' set the attribute to ~Icon/SuccessMessage and if status is 'E', set it to ~Icon/ErrorMessage at runtime.
    Now in the settings for ALV use the following code:
    * Display icon in column seatsocc
      DATA: lr_column TYPE REF TO cl_salv_wd_column,
            lr_image TYPE REF TO cl_salv_wd_uie_image,
            lv_icon TYPE string.
      lr_column = lv_model->if_salv_wd_column_settings~get_column( 'SEATSOCC' ).
      CREATE OBJECT lr_image.
      lr_image->SET_SOURCE_FIELDNAME( 'STATUS' ).
      lr_column->set_cell_editor( lr_image ).
    in the above code, column 'SEATSOCC' will be displayed as an icon.
    Sample code to fill the attribute 'STATUS'
    LOOP AT lt_flights INTO ls_flight.
        lv_seatsfree = ls_flight-seatsmax - ls_flight-seatsocc.
        IF lv_seatsfree = 0.
          ls_flight-status = 'ICON_RED_LIGHT'.
        ELSEIF lv_seatsfree <= 50.
          ls_flight-status = 'ICON_YELLOW_LIGHT'.
        ELSE.
          ls_flight-status = 'ICON_GREEN_LIGHT'.
        ENDIF.
        MODIFY lt_flights FROM ls_flight.
      ENDLOOP.
    Hope this helps!
    Regards,
    Srilatha
    Edited by: Srilatha M on Jun 25, 2010 12:02 PM

  • Image in the reports

    I have to display an image in the report.
    but actually i'm getting it from the database and displaying it (it's a BLOB file).
    Can anybody suggest me , so that i can have the image displayed in a larger size than the size wat i'm getting from the database ?
    Thanks in advance

    Hi Guru,
      Check the below link, it will be useful for you:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0c8bfa4-7348-2c10-b9ae-bc1ff04a9aeb?QuickLink=index&overridelayout=true
    Thanks
    Pawan

  • How to display an image from database

    Hi all,
    I've saved an image(jpeg file) as BLOB item in the database through the forms.I need to fetch that particular image from the database and display the image in the report.How can i do that?
    I tried to fetch the column from the database and added a text item and selected the PHOTO column , the properties has changed once i selected the BLOB item.File format I changed to Image , But the width is 4 and I'm not able to change that.
    While executing I'm getting two errors,
    REP : 0069 Internal Error
    REP : 62203 Internal Error reading the image - Unable to render RenderedOp for this operation
    Please help me to solve this issue.
    Thanks in advance...

    Hello,
    Try to revert to the "old" way to render images :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/envvars/envvar_reports_default_display.htm
    To revert to the dependency on DISPLAY and use screen fonts (old font look up algorithm):
    Set REPORTS_DEFAULT_DISPLAY=NO.
    Remove the screenprinter.ppd entry in the uiscreenprint.txt file.
    Set the DISPLAY variable to the active X-Windows display surface.
    Regards

  • Conditional display in a SQL-Report/Report Region

    Hi,
    here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
    First you have to put the following javascript code in the Page HTML-Header:
    <script type="text/javascript">
    <!--
    // SOURCE
    // W:\oracle\PRJ DWLS\javascript.07.js
    // Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
    // Help (Substitution Strings):
    // http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
    // HTML Expression:
    // <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
    function ex_conditional_td
    ( p_id
    , p_rownum
    , p_cellnum
      var l_td;
      l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
      // hier die Bedingung definieren
      if (true) {
        l_td.style.color = '#808080';
    }  // -- eof ex_conditional_td -- //
    // Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
    // HTML Expression:
    // <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
    function ex_conditional_tr
    ( p_id
    , p_rownum
      var l_tr;    // TABLE.TR
      var l_td;    // TABLE.TR.TD
      if (true) {
        l_tr = vd_getRow(p_id, p_rownum);
        l_tr.onmouseover = null;
        l_tr.onmouseout  = null;
        for (var i=0; i<l_tr.cells.length; i++) {
          l_td = l_tr.cells;
    l_td.style.backgroundColor = '#DDDDDD';
    } // -- eof ex_conditional_tr() -- //
    var g_DEBUG = false;
    var g_TBODY = null;
    // Liefert das Body-Element der Tabelle mit der ID <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // Return
    // das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getBody
    ( p_id
    if (g_TBODY == null) {
    var l_table = null;
    l_table = document.getElementById( p_id );
    if (l_table == null) {
    l_table = document.getElementByName( p_id );
    if (l_table != null) {
    if (vd_debug()) {
    alert("Tabelle gefunden, " + l_table.nodeName);
    g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
    return g_TBODY;
    } // -- eof vd_getBody() -- //
    // Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // Return
    // die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getRow
    ( p_id
    , p_rownum
    var l_body = vd_getBody(p_id);
    if ( l_body != null
    && l_body.nodeName == 'TBODY'
    && l_body.children[p_rownum].nodeName == 'TR') {
    return l_body.children[p_rownum];
    else {
    return null;
    } // -- eof vd_getRow() -- //
    // Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
    // Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // p_column - der Index der Spalte / Zelle
    // Return
    // die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
    function vd_getColumn
    ( p_id
    , p_rownum
    , p_column
    var l_tr = vd_getRow(p_id, p_rownum);
    if ( l_tr != null
    && l_tr.nodeName == 'TR'
    && l_tr.children.length >= p_column
    && l_tr.children[p_column].nodeName == 'TD') {
    return l_tr.children[p_column];
    else {
    return null;
    } // -- eof vd_getColumn() -- //
    // Rekursives Suchen nach einem Node.
    // Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
    // SQL-Report.
    // Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
    // darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
    // Klasse <p_class> befindet.
    // Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
    // "t10data" formatiert.
    // Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
    // Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
    // selbst ermittelt werden.
    // Der Beispielaufruf:
    // var l_body;
    // var l_node = document.getElementById( 'R112233' );
    // l_body = search( l_node, 'TD', 't10data', 'TBODY');
    // durchsucht also das mit der Id "R112233" versehene Element [der Report, für
    // den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
    // die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
    // definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
    // Parameter
    // p_node - das Ausgangselement
    // p_searchIn - der Knotenname, der durchsucht werden soll
    // [node.nodeName == p_searchIn]
    // p_class - der Name der CSS Klasse
    // [node.classList[<index>] == p_class
    // p_parentName - der Name [node.parentNode.nodeName == p_parentName]
    // des Elements, das zurückgeliefert werden soll. Wird als
    // p_parentName der Suchname p_searchIn angegeben, wird
    // das Element selbst zurückgegeben.
    // Return
    // das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
    function vd_search
    ( p_node
    , p_searchIn
    , p_class
    , p_parentName
    var LN = "vd_search";
    var l_element = null;
    // DEBUG
    if (vd_debug()) {
    alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
    // 1) der aktuelle Knoten ist der, der durchsucht werden soll
    if (p_node.nodeName == p_searchIn) {
    if (p_node.classList.length > 0) {
    for(var c=0; c<p_node.classList.length; c++) {
    if (p_node.classList[c] == p_class) {
    // Parent Node dynmisch suchen
    l_node = p_node;
    if (l_node.nodeName == p_parentName) {
    return l_node;
    while(l_node != null && l_node.parentNode != null) {
    if (l_node.parentNode.nodeName == p_parentName) {
    return l_node.parentNode;
    else {
    l_node = l_node.parentNode;
    // 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
    // weitersuchen
    if (p_node.children.length > 0) {
    var i = 0;
    while (i<p_node.children.length && l_element==null) {
    l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
    i++;
    return l_element;
    } // -- eof vd_search() -- //
    // Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
    // Return
    // true - debug ist eingeschaltet
    // false - debug ist ausgeschaltet
    function vd_debug()
    return g_DEBUG;
    -->
    </script>
    Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
    Second is, that you set an static id for your report region. I prefer this structure:
    R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
    First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
    <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
    Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
    <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum
    c) the cellnum (here we have to subtract 1 to get the "real" cell index)
    The "ex_conditional" functions are just a representation of how to get the row or cell node.
    Hope this help a bit.
    Tom

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • How to insert a conditional image into a report

    Hi
    I am fairly new to HTML DB, but I have managed to create my first application.
    I need a little help with one report.
    One of the columns in the report contains Y, N or R. The customer wants me to display a different coloured image depending on the value (ie a red button for N, green for Y or amber for R).
    I have can add a static image to a report via "Column Formatting" -> "HTML Expression", but I have no idea how to make it conditional.
    Any ideas?
    Many thanks in advance.
    Rak

    Great, that works!!!!
    Thanks very much.
    For completeness (incase anyone else reads this), there was one typo, in your solution, you omitted the opening '<' in the image source HTML tag
    select loanno, itemid,
    decode (returned, 'N', '<img src="#IMAGE_PREFIX#bullet_red.gif" border="0" alt="Loaned">',
    'Y', '<img src="#IMAGE_PREFIX#bullet_green.gif" border="0" alt="In Library">',
    'R', '<img src="#IMAGE_PREFIX#bullet_orange.gif" border="0" alt="Returned">'
    ) as status
    from loans
    Thanks for your help,...
    Rak

Maybe you are looking for