|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Interface Summary | |
|---|---|
| IExcel | This interface contains the mime type identifying it as an Excel 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. |
| IExcelBase | This interface contains the mime type identifying it as an Excel 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. |
This package allows you to view reports formatted as an Excel spreadsheet. When the report runs, it creates a
CrystalEnterprise.Excel 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 Excel spreadsheet.
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.
The following query selects the names, and IDs of all Excel objects in the APS:
IInfoObjects objs = iStore.query("SELECT SI_NAME, SI_ID FROM CI_INFOOBJECTS
WHERE SI_PROGID='CrystalEnterprise.Excel'");
The query method returns a collection of InfoObjects, which in this case are IExcel 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 IExcel objects returned by the query, the resulting IInfoObjects need to be
cast. This example demonstrates how to cast the returned IInfoObjects as IExcel objects.
for ( int i = 0; i < objs.size(); i++ )
{
IInfoObject obj = (IInfoObject) objs.get( i );
IExcel excelPlugin = (IExcel) obj;
}
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||