• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3698
  • Last Modified:

Oracle Form - Loading an image item from another image item

In the WHEN-NEW-FORM-INSTANCE trigger of my form, I load 2 images into two separate image items:
     read_image_file('document-no.gif','ANY','CONTROL.document_image_no');
     read_image_file('document.gif','ANY','CONTROL.document_image_yes');

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?
0
caldernet
Asked:
caldernet
  • 3
  • 2
1 Solution
 
Mark GeerlingsDatabase AdministratorCommented:
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.
0
 
caldernetAuthor Commented:
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"
   read_image_file('document.gif','ANY','d20.document_image');
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.
0
 
caldernetAuthor Commented:
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.
0
 
Mark GeerlingsDatabase AdministratorCommented:
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.
0
 
caldernetAuthor Commented:
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.)
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now