Oracle Form - Loading an image item from another image item

Posted on 2009-02-09
Last Modified: 2013-12-18
In the WHEN-NEW-FORM-INSTANCE trigger of my form, I load 2 images into two separate image items:

During the execution of the form, I want to move these images into other image items.

What is the command to "copy" the image displayed in one image item to another?
Question by:caldernet
    LVL 34

    Accepted Solution

    I'm not sure that Oracle Forms has a specific "copy image" command.  Have you tried the simple PL\SQL assignment command that works to copy text item values to another text item?  That would be like this:
    :[other_block].image_no := :control.image_no;

    I've worked with Oracle Forms for over 15 years, but I've never tried that with an image item.  Which version of Oracle Forms do you have?

    You may have to use the "read_image_file" built-in again to get this into a different item.
    LVL 1

    Author Comment

    Thanks - Although doing this
       :D20.DOCUMENT_IMAGE := :CONTROL.document_image_yes;
    gives me a "bad bind variable" error. I assume doing this is impossible.

    Previously I was actually doing the "read_image_file"
    which WORKED, but because D20 is a multi-record block, when I used the scroll bar to go through all of the lines (only 4 of which display on the form at any one time) the images displayed (there is a 'no document' image as well I load on some items) the images got "out of sync" with the lines, so images would not display where required. Although using a text field I load at the same time I load the image (eg. "DOCUMENT EXISTS")  remains in sync.

    I don't think there's a way to fix this. Oracle forms, doesn't seem to deal with images very well. I'm giving up and will go with text, rather than an image to let the user know a document exists for a line.
    LVL 1

    Author Comment

    I'll wait a couple of days before closing this case and awaring points to "markqeer" if I conclude there is in fact no solution.
    LVL 34

    Expert Comment

    That sounds to me like a much easier, and much more efficient way to solve this problem in Oracle Forms, that is: use "text, rather than an image to let the user know a document exists for a line."  You can use either a post-query trigger to populate the text tem, or even better, base the query on a view (instead of on the same base table as the "DML Data source") and have a view column populate this for you via a nested select statement in that column.  This avoids the extra network round-trips that a post-query trigger adds.

    I agree that Oracle Forms doesn't deal with images particularly well, but it is still an excellent data entry and data query tool for character, number and date data especially if that is in an Oracle database.
    LVL 1

    Author Closing Comment

    There appears to be no "copy image" function which would allow me to do this. Reading from a file seems to be the only way...of course Oracle Forms has problems with images so I'll be using text (for now.)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
    Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
    This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now