Package com.crystaldecisions.sdk.plugin.desktop.txt

This package allows you to view reports formatted as a text file.

See:
          Description

Interface Summary
ITxt This interface contains the mime type identifying it as a text 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.
ITxtBase This interface contains the mime type identifying it as a text 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.txt Description

This package allows you to view reports formatted as a text file. When the report runs, it creates a CrystalEnterprise.Txt 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 a text file.

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 ITxt objects in the APS:

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

The query method returns a collection of InfoObjects, which in this case are ITxt 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 ITxt objects returned by the query, the resulting IInfoObjects need to be cast. This example demonstrates how to cast the returned IInfoObjects as ITxt objects.

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