Formula for displaying images

Tried the documentation found at crystal reports support site with no luck, hopefully these forums can help.
I have been searching for a way to use a conditional formula, or some preinstalled function to:
1. display an image based on whether there is a table entry ( which is the filename)
2. if nothing exists in the table entry, display an image from a fall back web URL.
here is the snippet I am starting out with -
if({IDCARD.IDPHOTO} = "") then
'https://xx.xx.com/infodir/images/' & {USERTABLE.PHOTO}
the CRXI object model is kind of new to me so im fairly sure this is simple, but looking for a kick in the pants into the right direction, or some testable/trusted solution.
any assistance would be great.

What you can try is:
1. Insert default .jpg picture into your report
2. Right-click the image and select Format Graphic> select Pictures tab> Graphic Location formula
3. Insert your formula, but make sure that result of your formula is a string - full pass to .jpg file
I have tested it right now and it works for my CRXIr2.

Similar Messages

  • How to write a formula for display the value by group

    Post Author: abadugu
    CA Forum: Formula
    Hi
    Could any one please help me on writing the formula for the below senario.
    I'm creating Crystal report Via using ClearQuest (IBM tool) since this tool is not supporting subreport function. I'm planning to write a formula.
    I have grouped report by request_type field (request_type field contains Validation Defect, Production Defect, Known Defect  etc..)
    right now my report output is grouped by request_type
    ex:
    Validation Defect
                         SUMMARY                                                          COMMENTS
    Production Defect
                       SUMMARY                                                          COMMENTS
    my question was
    If request_type = Production Defect  display  pm_number value field otherwise display null
    ex
    Production Defect
    PM#          SUMMARY                                                       COMMENTS
    Validation Defect
                     SUMMARY                                                       COMMENTS
    could you please help me writing a formula.
    Thanks
    Anand

    Post Author: abadugu
    CA Forum: Formula
    It worked Thank you and I appreciated your help
    Thanks

  • Alternative method for displaying images blobs stored in DB

    I am trying to use an Application Process as a means to displaying images stored in BLOB columns in my table. And it works except for one problem. The code for my on-demand Application Process is below (the name of the application process is OUTPUT_IMAGE):
    DECLARE
    l_mime VARCHAR2(255);
    l_length NUMBER;
    l_file_name VARCHAR2(2000);
    lob_loc BLOB;
    BEGIN
    SELECT photo_mime_type,
    photo_blob,
    photo_filename,
    dbms_lob.getlength(photo_blob)
    INTO l_mime,
    lob_loc,
    l_file_name,
    l_length
    FROM persons
    WHERE id = <b>260</b>;
    owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE);
    htp.p('Content-length: ' || l_length);
    htp.p('Content-Disposition: filename="' || l_file_name || '"');
    owa_util.http_header_close;
    wpg_docload.download_file(lob_loc);
    END;
    I can then create HTML like:
    &lt;img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE"&gt;
    Which works nicely.
    The question/problem is: How can I pass the ID of the record (whose BLOB I want to display) to the Application Process? (In the code above you'll see the value of <b>260</b> is currently hard coded). I thought about tacking on something like "&my_id=xxx' to the end of the URL but doing so prevents the Application Process from even running.<BR/><BR/>
    All comments/suggestions much appreciated,<BR/><BR/>
    Thanks,
    <BR/>
    Andy

    Andrew,
    The URL for an Application Process uses the standard f?p syntax.
    Try passing your value like this:
    < img src="f?p=[my_app_id]:0:[the_session_id]:APPLICATION_PROCESS=OUTPUT_IMAGE:NO::MY_ID:[the value to send]"> You would need to have an item called MY_ID.
    Your query could then refer to it as
    WHERE id = :MY_ID;
    Doug

  • Af:commandImageLink not processing the aboulite path for displaying image

    All,
    We are required to display an image in the UI. The image is not stored in the deployed ear file. It is stored in the "*<DOMAIN_HOME>\Inventory\images*".
    Where DOMAIN_HOME=D:\JUPITER_CORONA\system11.1.1.3.37.56.60\DefaultDomain\inventory
    I would process an image absolute path in the af:commandImageLink tag as follows,
    *<af:commandImageLink "icon=file://D:/JUPITER_CORONA/system11.1.1.3.37.56.60/DefaultDomain/inventory/images/equipment.png" text"equipment" shotdesc="icon" />*
    The problem is that the above tag is not processing the above mentioned absolute path and displaying text "icon" instead of actual icon image. As per the ADF documentation the tag processes absolute path as well.
    Can someone suggest as to where I am going missing.
    regards,
    Chandra

    I was not able to get what you want very well, the situation is a little bit un-usual,
    but for solution I suggest the below way.
    write a servlet/JSP that return the image (it is like copying the file, read the image from absolute path and send it to the OUTPUTSTREAM of the response aslo remember the MIME and the write filter for the jsp/servlet that end with .jpg or any extension for the image.)
    then in the jsf page write the below code.
    <af:commandImageLink icon="/jspOrservlerpath/servlet/filename.jpg" text"equipment" shotdesc="icon" />
    your servlet (get the filename.jpg and then find the file and return it)
    this solution is very common for cases that the file is not available physically such as when you want to read it from another place(your case) or database.
    I hope this help you.
    I can send you the source for the servlet/jsp if you want.

  • How can I restore the background color Firefox 13 used for displaying images?

    I preferred the darker background color introduced in Firefox 13 for when images were displayed standalone, as opposed to the glaring white. How can I restore that behavior?

    That should still happen.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can also check for a userChrome.css file with code to change the background color.
    The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.
    *http://kb.mozillazine.org/Editing_configuration

  • Problem for displaying image in jsp

    I like to retrieve and display image from database in jsp file. Now, image has been retrieved and store in session. But it cannot be displayed in jsp. Who can help me? Thanks a lot!
    Codes like below:
    <%
    byte[] b = (byte[])session.getAttribute("sessionName");
    System.out.println(b.length); //the length can be printed at console successfully
    if(b != null) {
    response.setContentType("image/*");
    OutputStream toClient=response.getOutputStream();
    toClient.write(b);
    toClient.flush();
    toClient.close();
    %>

    JSP is designed to return text/html documents.
    As such it automatically calls getWriter() to return a character stream. (places it in the implicit variable "out"
    Seeing as you want to return bytes, instead of character data, the JSP technology is not applicable
    Calling getOutputStream after getWriter has been called results in an IllegalStateException
    So calling getOutputStream in a JSP will ALWAYS throw an exception.
    Cheers,
    evnafets

  • How to use boimage url for displaying images

    I am trying to test the Image URL feature in a Web Intelligence report.
    I have a few images loaded in the images folder on the installation server.
    I made the text of a cell: boimage://auditingBOBJLogo.png
    No images are showing up. When I am in view mode a box with an x shows.
    I am using the Web Client to edit the report and view it in InfoView.
    Any tips or best practices for getting this to work would be appreciated.
    Thanks

    Hi,
    Make sure that you have placed the image files in correct folder.
    And the cell formula is boimg://auditingBOBJLogo.png and not boimage://auditingBOBJLogo.png.
    Remember to set the display property of the cell to Image URL.
    Regards

  • Canvas or Form for displaying images

    Hi all,
    I am experiencing an annoying problem.
    I am developing an image viewer in J2ME/MIDP. I displayed all images in thumbnails. I don�t know how to list them. In canvas � I�ve problem with scrolling, if I use Form, I don�t know how to put more than one image per row. Maybe I have to use CustomItem in Form?
    Thanks for your replies.

    What you can try is:
    1. Insert default .jpg picture into your report
    2. Right-click the image and select Format Graphic> select Pictures tab> Graphic Location formula
    3. Insert your formula, but make sure that result of your formula is a string - full pass to .jpg file
    I have tested it right now and it works for my CRXIr2.

  • Formula for scanning image from book to have at 1200 pixel width

    I have to scan some images from a book for a website. The images in the book are various sizes ie 4" x 6". I need to have the final images, for the website, at 1200 pixels wide, 72 dpi. Is there a formula to use when scanning so that the scanned images will be 1200 dpi in width or very close to that.
    TIA

    Measure with width of the photo to be scanned and use the following formula: 
    Scanning dpi= 1200 divided by the width of the photo in inches
    Scanning a 4x6 photo you would scan at 200 dpi.  Because 200 dpi x 6 inches = 1200 pixels.
    OT

  • Urgent ! Code for Displaying Image from Oracle BLOB image on VB Form

    Hi Plz any one have any work to showing a Picuture on Visual Basic Form, i Save the Picure in table and its column type is BLOB where i save picture, now i want to show it on VB form. if anybody knows plz tell me. and if image not found then how can i handle in nvl(field,' ') function.

    Refer VB sample on Passing LOB parameters to a stored procedure. It shows how to display and insert the image from VB form to an Oracle Database in a BLOB column.
    http://otn.oracle.com/sample_code/tech/windows/ole_db/oledb8/content.html
    Chandar

  • Desperately seeking help for displaying image on button

    i wrote the following method to create and display a button with an icon, doesn't work and i cannot figure out what the problem might be and how to fix it, please help me...
    clo :))
    public static void addButton(Container c, String title,
    ActionListener listener)
    JButton button = new JButton(title);
    button.setBorder(null);
    button.setFocusPainted(false);
    button.setBorderPainted(false);
    button.setContentAreaFilled(false);
    ImageIcon icon = new ImageIcon("anImage.jpg");
    button.setIcon(icon);
    c.add(button);
    button.addActionListener(listener);
    the parameter c is of JPanel type and gets added to a JFrame object,
    the source compiles and runs but i see no image on my button, sigh :((!
    PS(the image file is placed in the same dir as the source file).

    Why buttons and labels might not show up the icon?
    Either your image is not in the classpath and you are trying to load it as a resource: see
    http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html
    or you are running the java machine from a different directory that you expect it does.
    or the file doesn't exist.
    To prove that the system cannot load the image use the example in the above link and the url will be null.
    URL iconURL = ClassLoader.getSystemResource("anImage.jpg");

  • Best practices for placing images in epubs

    Okay, I've read the books, I've watched the tutes and I'm still at a loss on the best way to add images to InDesign 5.5 documents that I will convert to ePub. The images are created in Photoshop at 300 dpi and sized at 800by600. And yet when I place them in InDesign and create the ePub, the images display poorly in ADE and other readers. What is the magic formula for adding images to my ePubs?
    Thanks in advance
    Chris

    Steve/Jongware:
    My thanks for your responses.
    Very good point to look at the images within the epub file. They are 72 dpi images, so it would seem that InDesign is indeed lowering the resolution. I had thought I tried every variation of the available settings within InDesign to avoid this but it would seem to not be the case. If you have any specific suggestions about what setting is causing this, that would be great.
    Viewing the images in the target device is of course ideal. I'm creating this for a wide range of online bookstores, so what device it will be viewed on can't be known. Since ADE drives more than 50 devices, I had hoped that would at least prove to be a reliable base of some sort -- disappointing to hear that ADE can not be trusted in that regard. I had assumed I could proof the book in that before converting to mobi and proofing on a Kindle.
    Why would anyone insert 300 dpi images, you ask? In its publishing guidelines, Amazon says: "To future-proof the content, save images in 300 dpi" Is this then bad advice on their part? Elizabeth Castro echoes this recommendation in her excellent book on the subject, by the way. It's rather difficult to know just what to do, I must admit. But I guess we're still in the early days of eBook creation, with best practices still being in a state of flux.
    Once again, my thanks for sharing your experience.
    Chris

  • Display image in detail groups in jheadstart 11.1.1.3.35

    Hi, I've been trying to make a project that should display one picture in one of the detail groups. but when i generate the jheadstart definition editor and run the project, it shows an empty box for the image (image is not loaded).
    I've seen the source code and every thing seems right and when i use that detail group as a master group the image display just fine.
    is jheadstart 11g have a problem for displaying image in detail groups? because I've heard this option works in 10g pretty fine.
    please help me how i can fix this problem and i have to say my project deadline is coming :(

    We are not aware of such a problem.
    To really check whether it is related to a detail group, can you temporarily make the detail group a top-level group, generate and run your application to see whether the problem goes away?
    Make sure you first uncheck the Same Page checkbox before you drag and drop the detail group to become a top group.
    There is a known ADF issue that when you upload a new image, the new image is only shown when you restart the session.
    Steven Davelaar,
    JHeadstart Team.

  • Display images like in images search engines

    I have a list of images that I want to display like the results in yahoo image and google image search engines.But when i use tha datatable component I can just display one column.And after I want to do something after that the user clicks on an image for example displaying it with real size not in thumbnail mode.
    I also tryed using the image browse widget and the yahoo carousel but I dont know how to hand events and how to know which picture is selected.
    Can you please help me.
    Thanks in advance

    fiedlerm wrote:
    I try to display workspace Image in a HTML Region dynamically.
    The Image Source is stored in a hidden Item filled by an application process.
    Region - Source:Always post code using <tt>\...\</tt> tags.
    <img src="#WORKSPACE_IMAGES#Sunny.gif">
    <br></br>
    &P1_ICON_SRC.
    <br></br>The first "hardcoded" Image was displayed.
    The second "dynamic" Image shows the following Text in the HTML - Region:
    <img src="wwv_flow_file_mgr.get_file?p_security_group_id=7856557026011968186&p_fname=Blizzard.gif"> Hidden page items cannot contain HTML mark-up. Look at the page source. When the item is rendered its value is contained in the hidden <tt>input</tt> element's <tt>value</tt> attribute:
    <input type="hidden" name="p_t01" id="P1_ICON_SRC" value="&lt;img src=&quot;wwv_flow_file_mgr.get_file?p_security_group_id=7856557026011968186&amp;p_fname=Blizzard.gif&quot;&gt;">The value must be properly HTML-escaped like this otherwise the browser would see it as tag soup:
    <input type="hidden" name="p_t01" id="P1_ICON_SRC" value="<img src="wwv_flow_file_mgr.get_file?p_security_group_id=7856557026011968186&p_fname=Blizzard.gif">">What exactly are you trying to achieve?
    Options for displaying images dynamically would include putting the required mark-up in an HTML region, only storing the image URI (or parts of it) in the page item, and referencing this using static text substitution. Others would be custom report templates or Dynamic PL/SQL regions.
    If you must store HTML code in session state and access it using static text substitution (not recommended) then use an application item.
    h4. Page Process
    begin
      :P1_ICON_SRC := 'Blizzard.gif'; -- Hidden page item
      :F41327_ICON_SRC2 := '<img src="#WORKSPACE_IMAGES#Blizzard.gif">'; -- Application item;
    end;h4. HTML region source
    <img src="#WORKSPACE_IMAGES#Sunny.gif">
    <br></br>
    <img src="&WORKSPACE_IMAGES.&P1_ICON_SRC.">
    <br></br>
    &F41327_ICON_SRC2.

  • Dynamic display image

    hi, everyone. i have a question on displaying image. for displaying image from a folder, i use:
    <IMG src="/image/me.jpeg" >
    But i can only display one image at one times. Is there ways to display images from folder dynamically?? Thank in advance.

    if u are new to java.. then u may have to go thru some tutorials on servlets to get ur required job done. here are a list of online tutorials
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    http://www.novocode.com/doc/servlet-essentials/
    http://www.acknowledge.co.uk/java/tutorial/servlet_tutorial/
    hope these will be useful for u.. u may have to spend some time on these...

Maybe you are looking for