2011-10-28 6 views
0

WebiレポートをExcel形式でエクスポートし、ユーザーに表示する必要があります。現在の環境はBOXI R3です。ExcelでWebiレポートをエクスポートする(Business Objects/java)

// ReportQueryの: "SI_NAME = 'XXXX' CI_INFOOBJECTSから*を選択し、SI_KIND = 'たWebi' とSI_PARENTID = XXXX"

たIInfoObjects webiDocs = infostore.query(reportQuery.toString)。 IWebi webiDoc = IWebi webiDocs.get(o);

以下(コードの行:インフォストアを照会)取得例外:java.lang.NoClassFoundException:com.crystaldecisions.celib.trace.h

注:h.classはBOXI R3のcelibには存在しません。 jar

答えて

0

WebIドキュメントを開いてデータを取得するには、先に進んでいるものとは別のルートをたどる必要があります。次のようなものを試してみてください:

// get your list of IInfoObjects 
IInfoObjects webiDocs = infostore.query(reportQuery.toString); 

// get a report engine to open the document 
ReportEngines engines = (ReportEngines)enterpriseSession.getService("ReportEngines"); 
ReportEngine reportEngine = engines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE); 

//Get the actual Doc instance 
DocumentInstance docInstance = reportEngine.openDocument(webiDocs.get(0).getID()); 

// get the Raw data stream 
BinaryView bv = (BinaryView)documentInstance.getView(OutputFormatType.CSV); 
OutputStream outputStream; // defined else where to meet your needs 
bv.getContent(outputStream); 

私はあなたがそれは、具体的に、通常動作しないと思うものにIInfoObjectのからキャストの通知をしました。特定の子クラスは、実際に外部的に使用可能なクラスではなく、ライブラリの内部で使用されているようです。

関連する問題