on 04-07-2015 7:04 AM
Hi,
Am trying to execute a java code through a jar file which is binded with a program object.
Program object runs successfully but the intended action needs to be performed by code does not.
I gave logon parameters of administrator.
Am trying to execute a report via SDK and save it in a destination.
Program object runs successfully but does not generate the output.
Am i going wrong somewhere?
Thanks
Mohammed Shoaib
Your code do not have any destination options set to schedule a report to destination.
For your report with SI_ID=8632, check under history, you would find excel instances generated for successful run of the program object.
Thanks,
Prithvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Prithvi.
I added the destination and ran the code. History of the report does not have any instance created after it runs successfully.
I have attached the code.. Please review if it is fine.
Am i going wrong somewhere??
Do i need to provide enterprise login and password in the code. I provided the logon parameters in program object. Object runs successfully but gives no output. No output file created in the directory.
Any help would be really appreciable.
Thanks
Mohammed Shoaib
Hi Shoaib,
Once you run the program object, can you click on the program object instance under history, it will download the text file. Paste the contents of the text file here. Usually program object instance shows status as success and doesn't capture the errors generated through the java code. The text file should contain the error stack trace.
Thanks,
Prithvi
I see class cast exceptions in the logs. Make sure you are compiling your java class using the jars from the current version of BO product.
The list of jar files and location can be found from the developers guide for BusinessObject SDKs available at
Also in the below lines of your code
IInfoStore IInfoStore = (IInfoStore)enterprisesession.getService("InfoStore"); make sure not to use the object name same as interface name. Its not a good practice and can at times cause problems in your code.
Schedule comand is missing in your code. Include the below line at the end of your code to schedule the report
infostore.schedule(infoObjects); (infostore is the object of IInfoStore interface and infoObjects an object of IInfoObjects interface)
Thanks,
Prithvi
Message was edited by: Prithviraj Shekhawat
Thanks Prithvi!
I am working in a BO server. I have added all the jar files from the location D:/BO/Business Objects 4/Java/Lib
Only this library is present as of business objects.
Am using eclipse 3.5.2 galileo. any issues with jre files might be?
Any help would be really great.
Regards
Mohammed Shoaib
You would need to case the infoobject as IWebi instead of IReport as IReport is an interface to reference crystal reports. Please refer to the dev guides available at help.sap.com for understanding the SDK's better.
Below is the example how to do it
IWebi boReport = (IWebi)boInfoObjects.get(0);
IWebiFormatOptions boReportFormat = (IWebiFormatOptions)((IWebiProcessingInfo)boReport).getWebiFormatOptions();
//Set report format.
int boFormatType = IWebiFormatOptions.CeWebiFormat.EXCEL;
boReportFormat.setFormat(boFormatType);
Also if you are on BI 4.x version, you would not be able to schedule webi reports with prompts using the BusinessObjects Enterprise Platform Java SDKs, however simple schedule is still possible.
You would need to go for the Restful webservice sdks for that. Search on the scn forum and you will find a lot of posts which would explain why you cannot schedule a webi report with prompts from BI 4.x
For any queries regarding Restful API's refer to the below forum. It has many blogs and documents which might help you
scn.sap.com/community/restful-sdk
Thanks,
Prithvi
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.