Pessoal alguém já construiu utilizou o comando exec_verb para Abrir um PDF, HTML ou MSG?
Valeu
Visualização de um PDF no FORMS 6i
-
- Rank: Estagiário Júnior
- Mensagens: 1
- Registrado em: Seg, 18 Dez 2006 11:02 am
- Localização: São Paulo - SP
Ricardinho - Kazu
- dr_gori
- Moderador
- Mensagens: 5024
- Registrado em: Seg, 03 Mai 2004 3:08 pm
- Localização: Portland, OR USA
- Contato:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Eu nunca usei, mas achei um texto legal a respeito:
http://www.fors.com/orasupp/d2k/windows/31257_1.HTM
http://www.fors.com/orasupp/d2k/windows/31257_1.HTM
Document-ID: 31257.1
Subject: (V45) OBJECT LINKING AND EMBEDDING (OLE) IN ORACLE FORMS
Author: RNIX
Last Revision Date: 30 October 1995
(V45) Object Linking And Embedding (OLE) In Oracle Forms
Introduction
------------
Object Linking and Embedding (OLE) enables you to integrate objects
from many application programs into a single compound document,
allowing you to use the features from multiple application programs.
An OLE server is the application that creates OLE objects. The
objects can be embedded or linked in an OLE container application. An
OLE container displays OLE objects. An application can be an OLE
server application, OLE container application, or both. An Oracle
Forms application can only be an OLE container application. Oracle
Graphics, Microsoft Word, and Microsoft Excel are examples of OLE
server applications.
An OLE object is embedded or linked in an OLE container, which is
simply an item in Oracle Forms. Embedded objects become part of the
Oracle Forms module, and linked objects are references from a form
module to a linked source file.
Linked vs. Embedded
-------------------
A linked object is a reference from the form to a file. Updating the
data in the OLE Container will update the file if the changes are saved.
You should link an object when:
- The object can be modified outside of the Oracle Forms application.
- The object is used in multiple applications.
- The size of the Oracle Forms module should remain small.
An embedded object stores the data in the form module only.
You could embed an object if:
- The object should not be modified outside of the Oracle Forms application.
- The object is used by only one application.
- The size of the Oracle Forms module is of no concern.
Activation and Automation
-------------------------
Activation activates the server application to allow the user to work in
the server's environment. OLE Automation allows you to manipulate the
server programmatically.
Activating the server manual depends on how the Activation Style property
is set. The properties are Double Click, Focus-in, and Manual, which are
self-explanatory.
To use OLE Automation, you need the FORMS_OLE and/or OLE2 PL/SQL packages.
The FORMS_OLE Interface
-----------------------
activate_server - Activates an OLE server associated with an OLE
container and prepares the OLE server to receive
OLE automation events from the OLE container.
close_server - Deactivates the OLE server associated with an OLE
container. Terminates the connection between the
OLE server and the OLE container.
server_active - Indicates whether or not the server associated with
a given container is running.
get_interface_pointer - Returns the handle to an OLE2 automation object.
exec_verb - Causes the OLE server to execute the verb identified
by the verb name or the verb index. An OLE verb
specifies the action that you can perform on an OLE
object.
find_ole_verb - Returns an OLE verb index. An OLE verb specifies the
action that you can perform on an OLE object, and
each OLE verb has a corresponding OLE verb index.
The OLE verb index is returned as a CHAR string and
must be converted to NUMBER when used in
FORMS_OLE.EXE_VERB. You must define an appropriately
typed variable to accept the return value.
get_verb_count - Returns the number of verbs that an OLE server
recognizes. An OLE verb specifies the action that
you can perform on an OLE object, and the number of
verbs available depends on the OLE server. The
number of verbs is returned as a CHAR string and must
be converted to NUMBER for use in determining the
verb index and verb name for each verb. You must
define an appropriately typed variable to accept
the return value.
get_verb_name - Returns the name of the verb that is associated with
the given verb index. An OLE verb specifies the
action that you can perform on an OLE object, and each
OLE verb has a corresponding OLE verb index. You must
define an appropriately typed variable to accept the
return value.
initialize_container - Inserts an OLE object from a server-compatible file
into an OLE container.
Creating an OLE Container
-------------------------
Add an OLE container item to the form just as you would add any other item.
Right click on the OLE Container item in the Layout Editor, and select "Insert
Object..." to insert an object into the container. This can be done
at runtime or design time. If you insert an object at design time, then that
object will be the default value for the item. "Create New" will open the
associated OLE server and allow you to create a new document. "Create from
File" will allow you to select the OLE document to insert into the container.
Examples
--------
The following example associates the object 'C:\TEST.DOC' with the OLE
Container Forms item OLE_CONTAINER and activates the OLE Server
associated with .DOC files (usually Microsoft Word). Once the Server
is active, the example instructs the Server to allow the object to be
edited.
DECLARE
ole_item ITEM;
BEGIN
ole_item := FIND_ITEM('OLE_CONTAINER');
IF NOT ID_NULL(ole_item) THEN
Forms_OLE.Initialize_Container(ole_item, 'C:\TEST.DOC');
END IF;
IF Forms_OLE.Server_Active(ole_item) = FALSE THEN
Forms_OLE.Activate_Server(ole_item);
END IF;
--
Forms_OLE.Exec_Verb(ole_item,'Edit');
--
END;
The following example is a simple method for determining the verbs that are
recognized by a server.
DECLARE
ole_item ITEM;
verb_ndx NUMBER;
verb_count NUMBER;
verb_name VARCHAR2(200);
BEGIN
ole_item := FIND_ITEM('OLE_CONTAINER');
IF NOT ID_NULL(ole_item) THEN
Forms_OLE.Initialize_Container(ole_item, 'C:\TEST.DOC');
END IF;
--
verb_count := TO_NUMBER(Forms_OLE.Get_Verb_Count(ole_item));
FOR i IN 1..verb_count LOOP
verb_name := Forms_OLE.Get_Verb_Name(ole_item,i);
verb_name := SUBSTR(verb_name, 1, LENGTH(verb_name)-1);
IF LOWER(verb_name) = 'edit' THEN
Forms_OLE.Exec_Verb(ole_item, verb_name);
END IF;
END LOOP;
--
END;
All examples assume the following objects exist:
- OLE_CONTAINER is an OLE Container item in the Form.
- 'C:\TEST.DOC' is an object associated to an OLE Server.
-
- Rank: Programador Júnior
- Mensagens: 24
- Registrado em: Qua, 26 Mai 2010 10:17 am
- Localização: São Paulo
Olá,
Gostaria de saber que função usar para abrir um arquivo PDF, que é salvo no meu banco (tipo BLOB), através do campo tipo OLE Container no Forms.
Estou usando o forms 6i e quero consultar esses arquivos pdf.
Criei outro campo OLE Container para essa consulta, mas não consigo visualizar.
Como faço para abrir esses arquivos no Forms?
Obrigado.
Gostaria de saber que função usar para abrir um arquivo PDF, que é salvo no meu banco (tipo BLOB), através do campo tipo OLE Container no Forms.
Estou usando o forms 6i e quero consultar esses arquivos pdf.
Criei outro campo OLE Container para essa consulta, mas não consigo visualizar.
Como faço para abrir esses arquivos no Forms?
Obrigado.
-
- Informação
-
Quem está online
Usuários navegando neste fórum: Nenhum usuário registrado e 18 visitantes