How to use Java SDK to schedule a report in business objects
hi guys i am having a scenario , were the Java SDK will be passing the parameters dynamically to the report in business objects . the Java SDK is kicked by the file based events. this Java SDK will be on the unix server and the business object is also on the unix server. I am having the crystal reports in boe which need to be triggered by the Java SDK . such that the report is scheduled to a particular location on the unix for every week,when the java passes the parameters to the report in boe
Edited by: americansalt on Nov 4, 2010 11:30 AM
You can do this by using the BOE SDK. Here are some samples:
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/806fc83f-18ba-2b10-f2b9-cbb49963fc93
Regards,
Stratos
Similar Messages
-
SAP BO Report Scheduling and Save as report using Java SDK
Hi All,
We have a java product which is integrated with SAP BO using Java SDK and we have certain java screen through which we select report prompt values and webi report gets run.
Now we want to give a functionality to save report to BO repository.
When user select certain check box from java screen a separate copy of the webi report should get saved under default folder on BO repository.
Also, we want user to choose the scheduling option from java screen only (and not the one which we use from BI Launchpad) due to certain access restriction. User does not have access to BI Launchpad. Only he can run report by selecting values through Java screen.
If i need to create a separate screen for scheduling as well as saving webi report then also i am ok with it.
P.S. i guess we need to work on Java SDK level. But could somebody please help me with the right direction?
Let me know in case requirement is not clear.Hi Ketan,
As you are on version BI 4.0 SP5 and would be migrating to BI 4.1, the best SDKs to use would be the Restful Webservices SDKs.
You have the options to schedule a webi report with prompts as well as the save feature which you require.
Please refer to the webi restful guides avialble at
For BI 4.0 SP5
http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp5_webi_restful_ws_en.pdf
For BI 4.1 SP4
http://help.sap.com/saphelpiis_sbo41sp4wi-sdk/frameset.htm
Refer to the below blog to understand the Restfull Webservices SDKs.
http://scn.sap.com/community/restful-sdk/blog/2013/09/07/scripting-web-intelligence-the-restful-raylight-web-services--learing-it
More blogs on Rest are available at
http://scn.sap.com/community/restful-sdk/content#filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bblogpost%5D
You can find the samples from the below link
http://scn.sap.com/community/restful-sdk/content#filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bdocument%5D
You would need to refer to the community below in case you have concerns about Rest SDKs.
http://scn.sap.com/community/restful-sdk
Thanks,
Prithvi -
Can I use Webservices SDK for scheduling Reports?
Hi All,
I have a requirement to use Webservices SDK. The process flow is explained as below:-
PeopleSoft calls Java component which schedules the BO Reports by calling BO program Objects. I was using BOE SDK before. But SAP advised to move to Webservices SDK as to remove CORBA connection issues.
Can I use Webservices SDK for scheduling Reports?
Please update.
Thanks,
AnuIts possible to schedule reports from web services SDK. Its stated in the Web services SDK Doc.
-
Creating a sample report using JAVA SDK
Hi,
I am trying to create a sample report using JAVA SDK.
I slelect 4 "free cells" and pass 4 different strings to it.
I even slelect the font colour and size. When i run the class and try to view the report in Infoview, I only seeblank blocks without any data. Now if I edit the report from infoview, and save the changes, I am able to see the data.
My issue is, Why am I not able to see the data when I run the java code.
Please find teh code below.
package com;
import java.awt.Color;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.businessobjects.rebean.wi.BinaryView;
import com.businessobjects.rebean.wi.DataProvider;
import com.businessobjects.rebean.wi.DataProviders;
import com.businessobjects.rebean.wi.DataSource;
import com.businessobjects.rebean.wi.DataSourceObject;
import com.businessobjects.rebean.wi.DocumentInstance;
import com.businessobjects.rebean.wi.DocumentLocaleType;
import com.businessobjects.rebean.wi.FontImpl;
import com.businessobjects.rebean.wi.FreeCell;
import com.businessobjects.rebean.wi.HTMLView;
import com.businessobjects.rebean.wi.OutputFormatType;
import com.businessobjects.rebean.wi.PageHeaderFooter;
import com.businessobjects.rebean.wi.Query;
import com.businessobjects.rebean.wi.Recordset;
import com.businessobjects.rebean.wi.Report;
import com.businessobjects.rebean.wi.ReportBody;
import com.businessobjects.rebean.wi.ReportCell;
import com.businessobjects.rebean.wi.ReportContainer;
import com.businessobjects.rebean.wi.ReportElement;
import com.businessobjects.rebean.wi.ReportEngine;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.plugin.CeKind;
public class Aug7th {
* @param args
public static void main(String[] args) {
// TODO Auto-generated method stub
String CMS = "pundl8136:6400";
String userID = "srivas";
String password = "morcom123";
String auth = "secEnterprise";
List<String> entire =new ArrayList<String>();
List<String> country =new ArrayList<String>();
List<String> resort =new ArrayList<String>();
IEnterpriseSession enterpriseSession;
try
ISessionMgr mySessionMgr = CrystalEnterprise.getSessionMgr();
enterpriseSession = mySessionMgr.logon(userID, password, CMS,auth);
if (enterpriseSession != null)
{//Create and store useful objects for the session.
IInfoStore iStore = (IInfoStore)enterpriseSession.getService("InfoStore");
ReportEngine reportEngine = (ReportEngine)enterpriseSession.getService("WebiReportEngine");
IInfoObject infoView = null;
String str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS WHERE (SI_KIND = '"+CeKind.WEBI+"' OR SI_KIND='FullClient') " +
"AND SI_INSTANCE = 'false' AND SI_NAME='Structure Test_001_Java' ORDER BY SI_NAME ASC ";
//String str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS ORDER BY SI_NAME ASC ";
IInfoObjects objInfoObjectsWIDs = (IInfoObjects) iStore.query(str);
System.out.println(objInfoObjectsWIDs.size());
IInfoObject objInfoObjectWID = (IInfoObject) objInfoObjectsWIDs.get(0);
DocumentInstance doc = reportEngine.openDocument(objInfoObjectWID.getID());
DataProviders dps = doc.getDataProviders();
// Retrieve the 1st data provider
DataProvider dp = dps.getItem(0);
// Retrieve the universe objects
DataSource ds = dp.getDataSource ();
Query q = dp.getQuery();
Recordset rs = dp.getResult(0);
// 0: assume query has one flow
rs.first();
// Print the column types. They can be Integer, String,
// or Date.
for (int i = 0; i < rs.getColumnCount(); i++) {
Class c = rs.getColumnType(i);
StringBuffer sbt = new StringBuffer();
if ( c.equals(Integer.class) )
sbt.append("Integer");
if ( c.equals(String.class) )
sbt.append("String");
if ( c.equals(Date.class) )
sbt.append("Date");
sbt.append(";");
System.out.println(sbt.toString());
System.out.println(rs.getColumnCount());
while (!rs.isLast()) {
// column names
StringBuffer sbn = new StringBuffer();
StringBuffer sbd = new StringBuffer();
for (int j = 0; j < rs.getColumnCount(); j++) {
sbn.append( rs.getColumnName(j).toString() );
sbn.append(";");
System.out.println("sbn "+sbn.toString());
// data
for (int k= 0; k< rs.getColumnCount(); k++) {
sbd.append( rs.getCellObject(k).toString() );
sbd.append(";");
entire.add(rs.getCellObject(k).toString());
System.out.println("sbd "+sbd.toString());
rs.next();
System.out.println(entire.size());
for(int i=0;i<entire.size();i++){
country.add(entire.get(i));
i++;
System.out.println("entireList "+entire.get(i));
resort.add(entire.get(i));
DataSourceObject city = ds.getClasses().getChildByName("Country");
DataSourceObject resorts = ds.getClasses().getChildAt(1);
dp.runQuery();
ReportContainer report = doc.createReport("Resort");
PageHeaderFooter header = report.getPageHeader();
FreeCell headerCell = header.createFreeCell("Resort Report");
PageHeaderFooter footer = report.getPageFooter();
FreeCell footerCell = footer.createFreeCell("Report Ends");
ReportBody body = report.createReportBody();
for(int k=0;k<resort.size();k++){
FreeCell res=body.createFreeCell(resort.get(k));
res.getAttachTo();
res.setHeight(15d);
res.setWidth(30d);
Color c = new Color(255,255,255);
Color c1 = new Color(255,0,0);
FontImpl fnt = (FontImpl)res.getFont();
fnt.getDecoration().setTextColor(c1);
res.setFont(fnt);
//res.deleteAttachment();
//res.setAttachTo(body,VAnchorType.BOTTOM,HAnchorType.NONE);
doc.applyFormat();
doc.refresh();
final String l_docToken = doc.getStorageToken();
final DocumentInstance l_docToSave = reportEngine.getDocumentFromStorageToken(l_docToken);
doc.saveAs("mor31",835,null,null);
doc.closeDocument();
str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS WHERE (SI_KIND = '"+CeKind.WEBI+"' OR SI_KIND='FullClient') " +
"AND SI_INSTANCE = 'false' AND SI_NAME='mor31' ORDER BY SI_NAME ASC ";
//String str = "SELECT SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS ORDER BY SI_NAME ASC ";
objInfoObjectsWIDs = (IInfoObjects) iStore.query(str);
System.out.println(objInfoObjectsWIDs.size());
objInfoObjectWID = (IInfoObject) objInfoObjectsWIDs.get(0);
DocumentInstance doc1 = reportEngine.openDocument(objInfoObjectWID.getID());
String token = doc1.getStorageToken();
DocumentInstance doc2 = reportEngine.getDocumentFromStorageToken(token);
doc2.saveAs("123123", 835, null, null);
// doc.refresh();
//doc.save();
enterpriseSession.logoff();
catch(Exception e)
e.printStackTrace();duplicate post:
Sample report using JAVA SDK -
Error while trying to save a report using Java SDK for CR server 2011
I use the java sdk to update the report database jndi alias and then save the report. While saving the report, the utility throws the following exception. It only happens to 3 reports out of more than 70 reports. What could be the problem with report that is causing this problem ?
Thanks.
com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Failed to read data from report file C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\Data\CrystalRep
ortsRasServer\temp\{56586260-E771-4C63-BF8B-F3CF14BB508A}.rpt. Reason: Repository object could not be found.---- Error code:-2147467259 [CRSDK00000000] Error code name:failed
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(ReportSDKServerException.java:109)
at com.crystaldecisions.proxy.remoteagent.ExceptionHelper.throwResultInfoException(ExceptionHelper.java:192)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.sendSyncRequest(ReportClientDocument.java:803)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.doSave(ReportClientDocument.java:820)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.save(ReportClientDocument.java:2245)The error points to the report using a repository object that it cannot be found. What happens if you try and update the reports using the Crystal Report Designer instead of the SDK?
-
How to use java source in Oracle when select by sqlplus.
How to use java source in Oracle when select by sqlplus.
I can create java source in Oracle
import java.util.*;
import java.sql.*;
import java.util.Date;
public class TimeDate
public static void main(String[] args)
public String setDate(int i){
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(new Date((long)i*1000));
System.out.println("Dateline: "
+ calendar.get(Calendar.HOUR_OF_DAY) + ":"
+ calendar.get(Calendar.MINUTE) + ":"
+ calendar.get(Calendar.SECOND) + "-"
+ calendar.get(Calendar.YEAR) + "/"
+ (calendar.get(Calendar.MONTH) + 1) + "/"
+ calendar.get(Calendar.DATE));
String n = calendar.get(Calendar.YEAR) + "/" + (calendar.get(Calendar.MONTH) + 1) + "/" + calendar.get(Calendar.DATE);
System.out.print(n);
return n;
I have table name TEST
ID DATE_IN
1 942685200
2 952448400
When I write jsp I use method setDate in class TimeDate
The result is
ID DATE_IN
1 1999/11/16
2 2003/7/25
Thanks you very much.It is unclear where you are having a problem. Is your issue at runtime (when the form runs in the browser) or when working in the Builder on the form?
Also be aware that you will need to sign your jar and include some new manifest entries. Refer to the Java 7u51 documentation and blogs that discuss the changes.
https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html -
I am creating a cloud service on azure with 2 virtual machines using java sdk API. Service created successfully.
My input endpoint details are as follows.
INPUT ENDPOINTS
Head : 191.238.144.47:2400
Head : 191.238.144.47:22
Node0 : 191.238.144.47:43211
For Head instance port 2400 is for HTTPS and port 22 is for SSH and for Node0 instance port 43211 is for SSH.
But I am having problem with doing a ssh on Head instance. Sometimes it works sometimes doesn't. Same problem with HTTPS also.
I have some application running over there but when i try to access it thru browser sometimes it works but most of the time doesn't. When I restart the instances from azure portal, its works after
that(not always but most of the time).
Now I am confused what is going on there. I am creating cloud service and virtual machines using java sdk and setting input endpoints also. After creation of all instances i restart every instance programmatically .
I am not sure whether restart is required or not. It must be something to do with input endpoints only but not able to get the right thing i guess. When i do the same thing thru azure portal(creation of cloud service with virtual machines and setting up input
end points) everything works fine but not achieving the result when implementing it by java sdk API. Please help me.HI Nithin,
Thanks for your reply. I am setting the endpoints after creating my instances using update call. Here's the code snippet.
AzureService aServ = new AzureService(session);
if(aServ.checkNameAvailability(clusterName)) {
aServ.createHostedService(clusterName, "dbX cluster");
// Creating head instance
aServ.createHead(clusterName, imgName, headType, userName, pswd);
// Setting end points for head node
String name = "ssh";
int port = 22;
aServ.updateVMInputEndpoint(clusterName, "Head", name, port);
// Restarting head instance
aServ.restartVM(clusterName, "Head");
String roleName = "Node";
String tmpRoleName = "";
for(int i=0; i<noi; i++) {
port = 43210+(i+1);
tmpRoleName = roleName + i;
// Creating node instance
aServ.createVM(clusterName, tmpRoleName, imgName, nodeType, userName, pswd);
// Setting end points for node instance
aServ.updateVMInputEndpoint(clusterName, tmpRoleName, name, port);
// Restarting node instance
aServ.restartVM(clusterName, tmpRoleName);
// Method to update the input endpoint details
public void updateVMInputEndpoint(String clusterName, String vmName, String name, int port)
throws Exception {
VirtualMachineGetResponse resp = computeManagementClient.getVirtualMachinesOperations().
get(clusterName, clusterName, vmName);
VirtualMachineUpdateParameters updateParameters = new VirtualMachineUpdateParameters();
//get the configuration list
ArrayList<ConfigurationSet> configlist = resp.getConfigurationSets();
//get inputendpoint list and update it
ArrayList<InputEndpoint> endpointlist = configlist.get(0).getInputEndpoints();
InputEndpoint inputEndpoint = new InputEndpoint();
inputEndpoint.setEnableDirectServerReturn(false);
inputEndpoint.setPort(port);
inputEndpoint.setLocalPort(port);
inputEndpoint.setName(name);
inputEndpoint.setProtocol(InputEndpointTransportProtocol.TCP);
endpointlist.add(inputEndpoint);
// Open port for https on head node
if(vmName.equals("Head")) {
inputEndpoint = new InputEndpoint();
inputEndpoint.setEnableDirectServerReturn(false);
inputEndpoint.setPort(2400);
inputEndpoint.setLocalPort(2400);
inputEndpoint.setName("https");
inputEndpoint.setProtocol(InputEndpointTransportProtocol.TCP);
endpointlist.add(inputEndpoint);
updateParameters.setConfigurationSets(configlist);
//required for update
OSVirtualHardDisk osVirtualHardDisk = resp.getOSVirtualHardDisk();
updateParameters.setOSVirtualHardDisk(osVirtualHardDisk);
updateParameters.setRoleName(resp.getRoleName());
OperationResponse updtResp = computeManagementClient.getVirtualMachinesOperations().update(clusterName, clusterName, resp.getRoleName(), updateParameters);
And every time i am creating a new cloud service along with head and node instances. Region is "South Central US".
I am setting ProvisionGuestAgent field to true at instance creation time. Thank you. -
How can install java sdk for mac os x 10.6.8
How can install java sdk for mac os x 10.6.8?
Deanwdd wrote:
I mean to update Quicktime for Mac Os X 10.6.8...
If you're running 10.6.8, Apple menu > Software Update. What version of QT do you have? -
Hi Experts,
please help me ,
How TO Use Java Mapping In XI?
Thanks
MaheshHi,
Just refer the following links for java mapping:-
1./people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
2./people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
Regards,
Ashwin M
Reward if helpful -
JNI - how to use java access function in TypeLibrary( .tlb file) HELP ME PL
Hey All
I got one project which can be done by calling up functions in xxxx.tlb
(window type library) file, that is no problem.
How to use java to access those functions???
I know there are some classes which can be used to access function in
DLL file e.g. JAWIN.
Is the .tlb file related to one DLL file??? if so, how to locate the
DLL file through .tlb file???
Thanks a lot.
SteveUse JNI to create a link between Java class and a DLL, then you can load that DLL (or TLB) from that class.
Read the JNI Tutorials. -
How to use java integrate with ondemand
Hi All,
As i'm new to integration, can anyone help me to use java integrate with ondemand that inserts some records in ondemand and deletes some records from ondemand in secheduled interval basis.?
Thanks in advance..!
regards
sowmGreetings,
hi forum...
how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
thanks
minduRegards,
Tony "Vee Schade" Cook -
How to use Java Beans In JSTL?
Hi
I want to know how to use Java bean in JSTL
please explain this with giving any one example.
Thanks-
SwapneelA bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.
-
How to use java script when popups are blocked in browser
How to use java script when popups are blocked in browser
Not. When people install a popup blocker they don't WANT popups, so stop trying to force them down their throats.
-
How to use java api for function activity in embed oracle workflow?
because i can't install standalone oracle workflow successfully.
pls tell me how to use java api for function activity in embed oracle workflow?
are there some patch or pulg-in package?
ths a lot...........The Java Function Activity Agent is not certified for Oracle Workflow embedded in Oracle Applications. Installing standalone workflow should be a lot easier than what you have found, although it looks like you did hit a Pentium 4 issue with the Oracle Universal Installer. I suggest you contact Oracle Support or Oracle Consulting for assistance.
because i can't install standalone oracle workflow successfully.
pls tell me how to use java api for function activity in embed oracle workflow?
are there some patch or pulg-in package?
ths a lot........... -
How to use Java code inside WebDynpro-ABAP
Hi,
How to use Java code inside WebDynpro-ABAP.
Could any one provide sample code.
Cheers,
SamHi Sam,
We can't Bring Java Inside the ABAP. Both are running in different Environments.
and also ABAP Codes are runs on BASIS.
-Basis is a middleware between ABAP codes and Ur OS.
-Contains set of programs to load,RUN,intepret the ABAP program..
So Both are Different.
Regards,
Ramganesan K.
Maybe you are looking for
-
Capture Video FCExpressHD 3.0.1-General Error
I have an iMac G5 pre intel with 2.5 gb or Ram, My camera is a Panasonic DVG60 it has been capturing video fine until today ( 30 hrs) It is now giving me a GENERAL ERROR when I try to capture video. I can capture files in iMovieHD OK, and import them
-
Kernel panic in Yosemite 10.10.3
Problem description: Kernel panic in Yosemite 10.10.3. 1 or 2 times a day. Not sure if it is software or hardware. I did not have this problem with Mavericks. I require full functionality of Adobe Creative Suite Master Collection (CS6), Logic Pro X,
-
I've been having trouble on my 4S since the update. If I restore it, will I lose my notes and photos?
-
I want to insert (or update) into a table with a relationship to another table. But I do not have the FK value, just another value from the father table. In some SQL databases I have used the following stataments: INSERT INTO emp (empno,ename,deptno)
-
Compatability problems with adobe elements
After installing adobe elements 4 I have had problems importing itunes and iphotos to my imovie08 projects