com.businessobjects.rebean.wi
Interface ReportEngine


public interface ReportEngine

The ReportEngine interface is the entry point for Web Intelligence reporting.

Example: Creating a ReportEngine instance.

 ISessionMgr mySessionMgr = CrystalEnterprise.getSessionMgr();
 enterpriseSession = mySessionMgr.logon(userID, password, CMS, auth);
 if (enterpriseSession != null) {
     ILogonTokenMgr iLManager = enterpriseSession.getLogonTokenMgr();
     com.businessobjects.rebean.wi.ReportEngines repEngines;
     ReportEngines engines = (ReportEngines) enterpriseSession
             .getService("ReportEngines");
     ReportEngine widocRepEngine = (ReportEngine) repEngines
             .getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
     widocRepEngine.setLocale("en_US");
     session.setAttribute("widReportEngine", widocRepEngine);
 }
 

See Also:
ReportEngines

Method Summary
 void close()
          Closes the current session.
 java.lang.String createServerInstance()
          Advanced method to create a ReportEngine server instance.
 java.lang.String createServerInstance(int docId)
          Advanced method to create a ReportEngine server instance associated to a specific DocumentInstance.
 Skin[] getBackgroundSkins(SkinReportElementType type)
          Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
 boolean getCanCreateNewDocument()
          Returns true when the ReportEngine allows to create a new document.
 boolean getCanDrillInDocument()
          Returns true when the ReportEngine allows to drill into a report.
 boolean getCanEditDocument()
          Returns true when the ReportEngine allows to edit the query definition.
 boolean getCanPreloadOutputCache()
          Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
 boolean getCanTrackData()
          The TrackData feature is supported only for WebiIntelligence document types.
 FormatNumber getDefaultFormatNumber(FormatNumberType type)
          Deprecated. This method was deprecated in version 12.0.

Use DocumentInstance.getDefaultFormatNumber(FormatNumberType) instead.

 DocumentInstance getDocumentFromStorageToken(java.lang.String token)
          Retrieves a document that has been opened previously by this ReportEngine instance.
 FormatNumber[] getFormatNumbers(FormatNumberType type)
           Returns an array of FormatNumber objects associated to a certain FormatNumberType.
 java.lang.String[] getInstalledFontNames()
          Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
 FontMapping[] getInstalledFontNames(PlatformType platform)
          Returns an array of FontMapping available for a specific platform.
 java.lang.String getLocale()
          Returns the Locale set when #init(String, String) was called.
 java.lang.String getSessionID()
          Deprecated. This method was deprecated in version 11.
 int getStorageTokenStackSize()
          Returns the maximum number of stored document states.
 java.lang.String getUserFormattingLocale()
          The current user's formatting locale.
 java.lang.String getVersion()
          Returns the version of the Web Intelligence server.
 void init(java.lang.Object sessionID)
          Deprecated. This method was deprecated in version 11.
 void init(java.lang.Object sessionID, java.lang.String locale)
          Deprecated. This method was deprecated in version 11.
 boolean isReady()
          Returns true if the Web Intelligence session is valid.
 boolean isStorageTokenValid(java.lang.String token)
          Returns true if token is still bound to a stored document state.
 DocumentInstance newDocument(java.lang.String dataSourceID)
          Creates a new Web Intelligence document with a specific DataSource.
 DocumentInstance newDocument(java.lang.String dataSourceID, NewDocumentParameters parameters)
          Creates a new document based on the specified DataSource.
 DocumentInstance openDocument(int docID)
          Opens a Web Intelligence document.
 DocumentInstance openDocument(int documentId, OpenDocumentParameters parameters)
          Opens a Web Intelligence document.
 DocumentInstance openDocument(java.lang.String docName, java.lang.String docID, java.lang.String repoType, java.lang.String docType)
          Deprecated. Use ReportEngine.openDocument(int) instead.
 void preloadOutputCache(int documentID, java.lang.String serverName, OutputCacheEntry[] cacheEntries)
          Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.
 void setLocale(java.lang.String locale)
          Sets the specific locale for the ReportEngine instance; that is to say, the format in which the current user wishes DocumentInstance data to be presented.
 

Method Detail

isReady

boolean isReady()
Returns true if the Web Intelligence session is valid. This method can be called once ReportEngine#init(String) has been called.

Returns:
Returns true if the Web Intelligence is valid.
See Also:
ReportEngine.init(Object sessionID), ReportEngine.init(Object sessionID, String locale)

init

@Deprecated
void init(java.lang.Object sessionID,
                     java.lang.String locale)
          throws REException
Deprecated. This method was deprecated in version 11.

Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.

This method is used to initializes the ReportEngine using the current users valid Web Intelligence session ID and a specific locale. This method must be called directly after the ReportEngine has been instantiated.

Parameters:
sessionID - The current users valid Web Intelligence session ID.
locale - The locale requested by the user for the current Web Intelligence session.
Throws:
REException

getLocale

java.lang.String getLocale()
Returns the Locale set when #init(String, String) was called.

Returns:
The locale set for this ReportEngine object.
See Also:
ReportEngine.init(Object sessionID), ReportEngine.init(Object sessionID, String locale)

getUserFormattingLocale

java.lang.String getUserFormattingLocale()
The current user's formatting locale. This is usually selected in a combo box in the InfoView settings and by default is the same as the UI locale.

Depending on user preferences, this might be different from the document locale (DocumentInstance.getProperties(), the property identified by PropertiesType.LOCALE) and the UI locale (ReportEngine.setLocale(String) and ReportEngine.getLocale()). It is used for all format number instances, most importantly for the input formats (prompts).

Returns:
The formatting locale, or null if no document has yet been opened or created.
Since:
11.5.2
See Also:
DocumentInstance.getFormattingLocale()

init

@Deprecated
void init(java.lang.Object sessionID)
          throws REException
Deprecated. This method was deprecated in version 11.

Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.

This method is used to initialize the ReportEngine using the current users Web Intelligence session ID. This method must be called directly after the ReportEngine has been instantiated.

Throws:
REException

getSessionID

@Deprecated
java.lang.String getSessionID()
Deprecated. This method was deprecated in version 11.

Returns the current users Web Intelligence session ID.

This is the value passed when ReportEngine.init(Object sessionID, String locale) or ReportEngine.init(Object sessionID) was called.

Returns:
The current user's Web Intelligence session ID.

openDocument

@Deprecated
DocumentInstance openDocument(java.lang.String docName,
                                         java.lang.String docID,
                                         java.lang.String repoType,
                                         java.lang.String docType)
                              throws REException
Deprecated. Use ReportEngine.openDocument(int) instead.

This method is used to open a Web Intelligence document.

Note: the ReportEngine must be initialized before openDocument is called.

Parameters:
docName - Not taken into account.
docID - The document identifier.
repoType - Not taken into account.
docType - Not taken into account.
Returns:
DocumentInstance the opened document instance
Throws:
REException

getDocumentFromStorageToken

DocumentInstance getDocumentFromStorageToken(java.lang.String token)
                                             throws REException
Retrieves a document that has been opened previously by this ReportEngine instance.

Note: All classes in the DocumentInstance are Serialized and the document's state is recreated when it is retrieved from the Web Intelligence server. Calling this method uses up many resources on the Web Intelligence server. Business Objects suggests calling this method as little as possible for optimal performance.

Parameters:
token - The reference token used to retrieve an instance of a DocumentInstance object stored in memory on the Web Intelligence server.
Returns:
A DocumentInstance object.
Throws:
REException

close

void close()
           throws REException
Closes the current session.

Note: It is important to close each session you open in order to free resources as quickly as possible.

Throws:
REException

newDocument

DocumentInstance newDocument(java.lang.String dataSourceID)
                             throws REException
Creates a new Web Intelligence document with a specific DataSource.

Example:Creating a new document

 ReportEngines repEngines=(ReportEngines)_enterpriseSession.getService("ReportEngines");
 ReportEngine widocRepEngine=(ReportEngine)repEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
 String sQuery = "SELECT SI_CUID, SI_NAME FROM"
    + " CI_APPOBJECTS WHERE SI_KIND ='"+ CeKind.UNIVERSE +"'";
 IInfoObjects dataSource = (IInfoObjects) iStore.query(sQuery);
 IInfoObject  ceInfoobject = (IInfoObject)dataSource.get(4);
 String dataSourceID =((IUniverse)ceInfoobject).buildUniverseIdString();
 DocumentInstance wiDoc = widocRepEngine.newDocument(dataSourceID);
 

Note: This function is not implemented for a ReportEngine instance that has been opened to run Desktop Intelligence documents. See ReportEngines#getService(int type) or more information.

Parameters:
dataSourceID - The CMS identifier for the DataSource.
Returns:
A DocumentInstance instance using a specific DataSource.
Throws:
REException
See Also:
DataSource, DataSource.getID()

newDocument

DocumentInstance newDocument(java.lang.String dataSourceID,
                             NewDocumentParameters parameters)
Creates a new document based on the specified DataSource.

Parameters:
dataSourceID - The CMS identifier for the DataSource.You can find dataSourceID using buildUniverseIdString() method
parameters - additional parameters allowing default behavior customization.
Returns:
A DocumentInstance instance based on the specified DataSource.
Since:
12.0
See Also:
DataSource, DataSource.getID(), NewDocumentParameters

getInstalledFontNames

java.lang.String[] getInstalledFontNames()

Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.

Returns the list of fonts installed on the Web Intelligence server machine.

Note: This function returns null if the ReportEngine instance has been opened to run Desktop Intelligence documents. See ReportEngines#getService(int type) or more information.

Returns:
An array of Strings containing the names of fonts installed on the Web Intelligence server machine.

getInstalledFontNames

FontMapping[] getInstalledFontNames(PlatformType platform)
Returns an array of FontMapping available for a specific platform.

A FontMapping defines the mapping between a Web Intelligence server font name and a platform-specific font name.

Examples of specific platforms are:

Parameters:
platform - The platform for which a list of specific fonts is required.
Returns:
Returns an array of fonts available for a specific platform.
Since:
11.5

getFormatNumbers

FormatNumber[] getFormatNumbers(FormatNumberType type)

Returns an array of FormatNumber objects associated to a certain FormatNumberType.

If type == FormatNumberType.CUSTOM, then all user-modified FormatNumber objects are returned.

When a default FormatNumber is modified, it becomes a CUSTOM type automatically.

Calls for a default FormatNumberTypealways return the same list; the default number formats never change.

Custom formats are not shared between documents. When loading a document using ReportEngine.openDocument(String, String, String, String), only custom formats specific to the document are loaded.

A custom FormatNumber can be modified several times. Once a custom FormatNumber has been used in a Cell, a copy of the format is created. The FormatNumber in this Cell will not change when the corresponding custom FormatNumber is changed in a different Cell.

Note: This function only returns a value after a DocumentInstance has been opened by the ReportEngine.

Parameters:
type - The FormatNumberType whose formats the user wishes to see.
Returns:
An array of FormatNumber objects associated to a specified FormatNumberType.
Throws:
java.lang.NullPointerException - when type == null
See Also:
TableCell.setFormatNumber(FormatNumber), Cell

getBackgroundSkins

Skin[] getBackgroundSkins(SkinReportElementType type)

Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.

Returns an array of Skin objects provided by the Web Intelligence server for different elements in a report.

The Skin objects returned depend on the type of SkinReportElementType requested.

Note: all Skin objects are read-only.

Note: This function returns null if the ReportEngine instance has been opened to run Desktop Intelligence documents. See ReportEngines#getService(int type) or more information.

Parameters:
type - the SkinReportElementType (CELL, BLOCK, SECTION, REPORT) for which the corresponding array of Skin objects stored on the Web Intelligence server is to be returned.
Returns:
the array of Skin objects corresponding to the SkinReportElementType requested.
Since:
11.5

openDocument

DocumentInstance openDocument(int docID)
                              throws REException
Opens a Web Intelligence document.

Parameters:
docID - The CMS identifier (SI_ID) of the document.
Returns:
An instance of the opened document.
Throws:
REException
Since:
11.5

openDocument

DocumentInstance openDocument(int documentId,
                              OpenDocumentParameters parameters)
Opens a Web Intelligence document.

Parameters:
documentId - The ID of the document to open.
parameters - A structure containing extra information on how to open the document. When null, default values will be applied to all parameters.
Returns:
An instance of the opened document.
Since:
12.0

getDefaultFormatNumber

@Deprecated
FormatNumber getDefaultFormatNumber(FormatNumberType type)
Deprecated. This method was deprecated in version 12.0.

Use DocumentInstance.getDefaultFormatNumber(FormatNumberType) instead.

Returns the default FormatNumber for a specific type of values. This can be used, for example, to determine the date format when entering a date for a prompt. Modifying the object returned has no effect.

When type == FormatNumberType.DATE_TIME, one may cast the returned FormatNumber into a specialized DefaultDateTimeFormatNumber in order to gain access to date and time specific formats.

Note: This function only returns a object after a document has been opened by the ReportEngine. Formats are returned using the content locale of the first document opened or created using this ReportEngine instance.

Parameters:
type - the value type
Returns:
the default format, or null when type == FormatNumberType.CUSTOM
Throws:
java.lang.NullPointerException - when type == null
See Also:
DefaultDateTimeFormatNumber

getVersion

java.lang.String getVersion()
Returns the version of the Web Intelligence server. The version is returned in the following format:
<major release><minor release>. <service pack><phase>. <iteration><customer service pack>. <build number>

Returns:
A String containing the Web Intelligence server version number.

createServerInstance

java.lang.String createServerInstance()
Advanced method to create a ReportEngine server instance.

When a user creates a new document or edits an open document using the Web Intelligence Java Report Panel, the JSP page must indicate to the applet which document and ReportEngine to use. This method creates a new ReportEngine server instance that will be used to create a new Web Intelligence document with the Web Intelligence Java Report Panel.

Returns:
An ReportEngine server instance identifier. This identifier is used to run the Java Report Panel.

createServerInstance

java.lang.String createServerInstance(int docId)
Advanced method to create a ReportEngine server instance associated to a specific DocumentInstance.

When a user creates a new document or edits an open document using the Web Intelligence Java Report Panel, the JSP page must indicate to the applet which document and ReportEngine to use.

Parameters:
docId - An SI_ID or CUID of the open Web Intelligence document to associate to a ReportEngine server instance.
Returns:
An ReportEngine server instance identifier. This identifier is used to run the Java Report Panel.
Since:
11.5

setLocale

void setLocale(java.lang.String locale)
Sets the specific locale for the ReportEngine instance; that is to say, the format in which the current user wishes DocumentInstance data to be presented.

Note: after retrieving a ReportEngine instance from the enterprise session, the locale must be set.

Parameters:
locale -
Since:
11.5

getCanDrillInDocument

boolean getCanDrillInDocument()
Returns true when the ReportEngine allows to drill into a report. ReportEngines.getService(ReportEngines.ReportEngineType type)

Note: The DrillInfo interface is not implemented in the Desktop Intelligence documents.

Returns:
Returns true when the ReportEngine allows to drill into a report.
Since:
11.5

getCanEditDocument

boolean getCanEditDocument()
Returns true when the ReportEngine allows to edit the query definition. ReportEngines.getService(ReportEngines.ReportEngineType type)

Note: You cannot edit a report in the Desktop Intelligence documents.

Returns:
Returns true when the ReportEngine allows to edit the query definition.
Since:
11.5

getCanCreateNewDocument

boolean getCanCreateNewDocument()
Returns true when the ReportEngine allows to create a new document. ReportEngines.getService(ReportEngines.ReportEngineType type)

Note: You cannot create a new report in the Desktop Intelligence documents.

Returns:
Returns true when the ReportEngine allows to create a new document.
Since:
11.5

getStorageTokenStackSize

int getStorageTokenStackSize()
Returns the maximum number of stored document states. Every time a Web Intelligence user changes a document, the documents state for that change is stored in memory by the ReportEngine. This method returns the number of DocumentInstance states stored by the Web Intelligence server, that is to say, the maximum number of UNDO actions a user can perform on a DocumentInstance.

The default token stack size is 10. This value can be changed by the Web Intelligence administrator by changing the value of the STORAGE_TOKEN_STACK_SIZE variable in the webi.properties file.

Returns:
The maximum number of UNDO actions a user can perform on a DocumentInstance.
Since:
11.5

isStorageTokenValid

boolean isStorageTokenValid(java.lang.String token)
Returns true if token is still bound to a stored document state. If this method returns false calls to ReportEngine.getDocumentFromStorageToken(String) will fail.

Returns:
Returns true if token is still bound to a stored document state.
Since:
11.5
See Also:
DocumentInstance.getStorageToken()

getCanTrackData

boolean getCanTrackData()
The TrackData feature is supported only for WebiIntelligence document types.

Returns:
Returns true if the ReportEngine instance was created to run Web Intelligence documents ReportEngines.getService(ReportEngineType type).
Since:
12.0

getCanPreloadOutputCache

boolean getCanPreloadOutputCache()

Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.

Returns true if this ReportEngine instance is capable of preloading a server document output cache, false otherwise.

Returns:
true if this ReportEngine instance is capable of preloading a server document output cache, false otherwise.
Since:
12.0
See Also:
ReportEngine.preloadOutputCache(int, String, OutputCacheEntry[])

preloadOutputCache

void preloadOutputCache(int documentID,
                        java.lang.String serverName,
                        OutputCacheEntry[] cacheEntries)

Warning: This method is no longer functional from the SAP BusinessObjects 4.0 release onwards.

Requires a particular server instance to preload its output cache with specified document outputs for later consumption.

Parameters:
documentID - the CMS identifier of the document from which outputs should be generated.
serverName - the name of the server instance that should generate the document outputs and preload its cache.
cacheEntries - an array of OutputCacheEntry instances describing how to tailor the the document outputs.
Since:
12.0
See Also:
ReportEngine.getCanPreloadOutputCache(), OutputCacheEntry