claudiaronja
Programmer
Hello,
I want to show a report (pdf) from an webapplication. I can get the id, but the ReportEngine cant't open it.
Error Message:
com.businessobjects.rebean.wi.ServerException: Web Intelligence kann den vorgesehenen Vorgang an diesem Dokument nicht ausführen. (Fehler: WIS 30650)
IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Pdf' AND SI_NAME='Kundenfrequenz 05 KW 28'");
IInfoObject oInfoObject = oInfoObjects.get(0);
//Erzeugung einer ReportEngine mit REABean
ReportEngine repEngine = (ReportEngine)enterpriseSession.getService("","WebiReportEngine");
//Viewer erzeugen. Dazu wird die id benötigt!!!!!
int id = oInfoObject.getID();
//FALSE ?????????????????????????????????
System.out.println("docId "+id);
DocumentInstance doc = repEngine.openDocument(id);
System.out.println("doc "+(doc != null));
//FALSE ?????????????????????????????????
BinaryView view = (BinaryView)doc.getView(OutputFormatType.PDF);
byte[] content = view.getContent();
response.setContentType("application/pdf");
ServletOutputStream outStream = response.getOutputStream();
outStream.write(content);
thanks claudia
I want to show a report (pdf) from an webapplication. I can get the id, but the ReportEngine cant't open it.
Error Message:
com.businessobjects.rebean.wi.ServerException: Web Intelligence kann den vorgesehenen Vorgang an diesem Dokument nicht ausführen. (Fehler: WIS 30650)
IInfoObjects oInfoObjects = (IInfoObjects)infoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Pdf' AND SI_NAME='Kundenfrequenz 05 KW 28'");
IInfoObject oInfoObject = oInfoObjects.get(0);
//Erzeugung einer ReportEngine mit REABean
ReportEngine repEngine = (ReportEngine)enterpriseSession.getService("","WebiReportEngine");
//Viewer erzeugen. Dazu wird die id benötigt!!!!!
int id = oInfoObject.getID();
//FALSE ?????????????????????????????????
System.out.println("docId "+id);
DocumentInstance doc = repEngine.openDocument(id);
System.out.println("doc "+(doc != null));
//FALSE ?????????????????????????????????
BinaryView view = (BinaryView)doc.getView(OutputFormatType.PDF);
byte[] content = view.getContent();
response.setContentType("application/pdf");
ServletOutputStream outStream = response.getOutputStream();
outStream.write(content);
thanks claudia