Package com.crystaldecisions.sdk.plugin.desktop.rtf

This package allows you to view reports formatted as a RTF document.

See:
          Description

Interface Summary
IRTF This interface contains the mime type identifying it as an RTF formatted report, and the byte stream to pass to the Response object so it can be displayed in the proper format on the HTML page.
IRTFBase This interface contains the mime type identifying it as a RTF formatted report, and the byte stream to pass to the Response object so it can be displayed in the proper format on the HTML page.
 

Package com.crystaldecisions.sdk.plugin.desktop.rtf Description

This package allows you to view reports formatted as a RTF document. When the report runs, it creates a CrystalEnterprise.Rtf object in the APS InfoStore. After retrieving the plugin for this object, you can set the ContentType Property of the Response object to match the value returned by the getMimeType() method and pass the ByteStream returned by getContent() to the OutputStream of the Response object. The report is then streamed to the browser and previewed as an RTF document.

Retrieving desktop plugins

Each object that is created with a desktop plugin is stored in either the CI_INFOOBJECTS or the CI_SYSTEMOBJECTS category in the APS InfoStore, and is marked with a programmatic identifier (ProgID). Using SI_PROGID, you can query the APS InfoStore for a collection of objects.

Example

The following query selects the names, and IDs of all PDF objects in the APS:

IInfoObjects objs = iStore.query("SELECT SI_NAME, SI_ID FROM CI_INFOOBJECTS WHERE SI_PROGID='CrystalEnterprise.Rtf'");

The query method returns a collection of InfoObjects, which in this case are RTF plugin objects. Like other InfoObjects, these objects are uniquely represented by their ID property. For each object in the collection, you can access general InfoObject properties, such as the SI_NAME property, SI_DESCRIPTION property, and SI_ID property.

To access the IRTF objects returned by the query, the resulting IInfoObjects need to be cast. This example demonstrates how to cast the returned IInfoObjects as IRTF objects.

for ( int i = 0; i < objs.size(); i++ )
{
    IInfoObject obj = (IInfoObject) objs.get( i );
    IRTF rtfPlugin = (IRTF) obj;
}