Create a Crystal Report using Java
807580Jun 12 2009 — edited Mar 4 2010Hi
Im Using Java 6 to connect to a Crystal Reports server. Im trying to create a common API that we can use throughout our office for integration with Crystal Reports.
But Im having troubles with my method to upload/create a report. If I create a new Report Object via the Business Objects Central Management Console then everything is fine, but I get some funnies when I do it via Java.
My upload code is like this :
IInfoObjects newObjs = infoStore.newInfoObjectCollection();
IPluginInfo pluginInfo = infoStore.getPluginMgr().getPluginInfo(CeProgID.REPORT);
IInfoObject newObj = newObjs.add(pluginInfo);
IReport myReport = (IReport)newObj;
myReport.setTitle("title");
myReport.setParentID(parentId);
IFiles files = myReport.getFiles();
files.addFile(file);
infoStore.commit(newObjs);
Now that all works fine and I get no errors. When I look at the Central Management Console I can see the newly created Report, but when I click on it I dont get any of the standard tabs. i.e. 'Properties', 'History' etc, but I do get an error message on the screen that simply says "An internal error has occurred"
I cant find anything in the logs to tell me what this error is, and my steps to create/upload the report seem to match every example I have found.
Can anyone help with this problem?
Thanks for your time