Consultor Eletrônico



Kbase 18108: Actuate and OLE controls
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/14/1998
Actuate and OLE controls

INTRODUCTION:
=============
This kbase discuss OLE controls and how they work at runtime.
Also the relation between OLE and Actuate is discussed.
The text comes from a specific case which explains the layout.

====================

Containing OLE controls within an OLE control. ??

Actuate provides an interface to the OLE Automation interface of the
OLE object. Using this Automation interface ( GetObject() in Actuate
Basic), you can call the OLE server and change parameters in the OLE
server. In this case, it sounds like you have MS Word and you
need to change the file name. I would look through the MS Word OLE
automation documentation to see if this is possible. Note that this
is not Actuate's documentation - OLE works like a parasite - Actuate
is merely the host for the parasite.

If you can change the OLE item at run-time ??

The best bet, perhaps, is to call GetContainerItem(). This returns a
CPointer to an instance of the MFC class COleClientItem. By writing
a function in C++, using MFC, you can have full access to the
COleClientItem and its underlying OLE object interface and changing
the associated data or file *MAY* be possible. To do this, you
need access to MFC and its documentation in this area, as well as
the documentation of OLE interfaces outside the MFC framework.
Actuate doesn't supply a Basic interface to all the intricacies of
the OLE object and the container classes, but by using this pointer,
you have full access to the underlying technology. I think the you
have to take the ball from here, as I think it is beyond the scope
of Actuate to supply support for the underlying Microsoft
technology.

Please keep the following in mind
There is no OLE object during the compilation, or report generation
of Actuate reports. (The parasite is idle).
The AcOleContainerControl at that time is just an AFC class that
has some keys as a means of finding the OLE item once it is created
by the Actuate Viewer. This means that it is impossible to poke
values into OLE objects in the OnFinish() or OnRow() methods
of AFC. The OLE object is not created until viewing the report,
and this can be trapped in the OnCreate() and OnActivate() methods
in the AcOleContainerControl class.


JBE July 14 - 98