This content has been marked as final. Show 10 replies
can u provide us u r code?
try at when-new-form-instance trigger.
try something like this.
read_image_file('image.gif', 'gif', ' block.image');
read_image_file('c:\image.gif', 'gif', 'block.image');
That's not what I'm trying to accomplish though. I'm trying to bring up a status on current, past, and future orders. When I user queries an order, I display different images to display the order. Like if an order is invoiced, I showed a GIF file specifically for invoiced orders. If an order is past ship date, I show a different image.
A user opens the form and queries an order. That's why I have to use it in Post Query. If they want all orders for a particular customer (current, past, future), then I want to show the different images.
So, the When-New-Form-Instance won't work.
i think post-query trigger wont fire while using read_image_file built-in.
Here are some things to check:
1) Alll the images in the JAR file should have the same extension
2) In formsweb.cfg, include the JAR file in the ARCHIVE parameter and set imageBase=codebase
3) In registry.dat, leave iconpath blank and set iconextension=gif
4) In your READ_IMAGE_FILE call, use URL as the file type and don't use the extension on the file name. So if the image in your JAR is my_picture.gif, it would be something like READ_IMAGE_FILE('my_picture','URL','myblock.my_image_item');
If it still doesn't work, enable the Java console and when it comes up, enter the number 5 in the console to enable the highest level of logging. Then have a look at the console to see if the JAR is getting downloaded and where it's attempting to read the image from.
try to use "URL' for GIF icons.
:System.Message_Level := '25';
IF NOT FORM_SUCCESS THEN
MESSAGE('This employee does not have a photo on file.');
:SYSTEM.MESSAGE_LEVEL := '0';
If you want to read the gif files from a jar file, you have to use the URL for the image_type parameter.
But: This feature is a little bit buggy.
If you have a multi record block and want to display images with the post-query trigger,
the images are successfully loaded but will disapear ...
if you have a single record block, you can try to call the synchronize build-in before you read the image file.
Another option would be to store the images in the database and query the image block as a detail.
Search path for image files on Application Server is same as for FMX files. "WorkingDirectory" (formsweb.cfg), "FORMS_PATH" (your .env).
Save image in any of these folders and you should be able to remove hardcoded path.
Using jar and reading from "URL" will not work in POST-QUERY trigger. There is a published bug: 3371345. READ_IMAGE_FILE('IMAGE','URL','IMAGEITEM'); DOESN'T WORK IN POST-QUERY-TRIGGER.
I use the read_image_file build-in with the url parameter in a single row block1 person found this helpful
and it works fine with a preceding call to the synchronize build-in.
Yeah, we're trying to use the POST-QUERY trigger because statuses on orders change throughout the years. We used to use a Wingding fonts that we typed in characters but the font would translate it to look like images (like different colored flags), etc... Our font translator in 10g doesn't so great since I'm limited on Java Fonts.
So, I have to use a POST-QUERY. I'm thinking we just store the images in a database and call them from there. That might be the easier way to go about it.