Retrieved the instance(s) of scheduled reports

Hello
I am writing a Java command-line program in order to schedule reports (in "right now" mode) in BO XI R2 running on a Windows Server 2003 server.
This program will be launched from an third part scheduler which needs to know the final status of the scheduled report.
My idea is to code an active loop (with sleep) that checks uppon instance status until it is COMPLETED or FAILED.
First, is there another, more elegant way to do it? (maybe using some kind of listener mecanism or something)
Otherwise, how can I retrieve a reference of the instance scheduled using the Schedulable.schedule() method?
I was thinking about using the Schedulable.getLatestInstance() method but there is no garantee that this is REALLY the one that this program has just scheduled, is there?
Thanks
Guillaume

Very usefull answer, thanks.
I experienced a difference between scheduling a report from the InfoView and from the SDK:
When a report is scheduled from InfoView, it goes to the 'RUNNING' status right away but when scheduled from the Java SDK, it stays in the 'PENDING' status for a minute or so before going to the 'RUNNING' status.
Any idea why?
Here is a snippet of code I am using (just in case):
               ISchedulable reportSchedulable = (ISchedulable) infoObject;
               IInfoObject reportObj = infoObject;
               ISchedulingInfo reportScheduleInfo = reportSchedulable.getSchedulingInfo();
               reportScheduleInfo.setType(CeScheduleType.ONCE);
               reportScheduleInfo.setRightNow(true);
               infoObjects = infoStore.query("select top 1 * from CI_SYSTEMOBJECTS where SI_NAME = 'CrystalEnterprise.Managed'");
               IManaged managed = (IManaged) infoObjects.get(0);
               IManagedOptions managedOptions = (IManagedOptions) managed.getScheduleOptions();
               managedOptions.setDestinationOption(IManagedOptions.CeDestinationOption.ceInbox);
               managedOptions.setSendOption(IManagedOptions.CeManagedSendOption.ceCopy);
               Set destinations = managedOptions.getDestinations();
               for(int i = 0; i < recipients.length; i++) {
                    infoObjects = infoStore.query("select top 1 * from CI_SYSTEMOBJECTS where SI_KIND = '"+ recipients<i>[0] +"' and SI_NAME = '"+ recipients<i>[1] +"'");
                    IInfoObject userOrGroup = (IInfoObject) infoObjects.get(0);
                    destinations.add(new Integer(userOrGroup.getID()));
               IDestination managedDestination = reportScheduleInfo.getDestinations().add(managed.getProgID());
               managedDestination.setFromPlugin(managed);
               infoStore.schedule(reports);
               Object newJobId = reportObj.properties().getProperty("SI_NEW_JOB_ID").getValue();
               int newJobStatus;
               String query = "select top 1 * from CI_INFOOBJECTS where SI_ID = '"+ newJobId +"'";
               boolean loop = true;
               while(loop) {
                    infoObjects = infoStore.query(query);
                    newJobStatus = ((IInfoObject) infoObjects.get(0)).getSchedulingInfo().getStatus();
                    loop = newJobStatus != ScheduleStatus.COMPLETE && newJobStatus != ScheduleStatus.FAILURE;
                    String statusStr;
                    switch(newJobStatus) {
                    case ScheduleStatus.COMPLETE:
                         statusStr = "COMPLETE";
                         break;
                    case ScheduleStatus.FAILURE:
                         statusStr = "FAILURE";
                         break;
                    case ScheduleStatus.PAUSED:
                         statusStr = "PAUSED";
                         break;
                    case ScheduleStatus.PENDING:
                         statusStr = "PENDING";
                         break;
                    case ScheduleStatus.RUNNING:
                         statusStr = "RUNNING";
                         break;
                    default:
                         statusStr = "UNKOWN";
                    ToolBox.log("La plannification est au statut '"+ statusStr +"'.");
                    if(loop) {
                         Thread.sleep(1000);
               session.logoff();

Similar Messages

  • How can I retrieve the same figure twice in report?

    Hi guys,
    If we have the same selection twice in the same report, it only retrieves the figure once (see example below, were the same period has been chosen twice). Is there any setting I can adjust, so it will retrieve the figures for double-selected members also?
    Thanks,
    Dorthe

    Hi Dorthe,
    No issues in my system (BW 7.3, BPC SP12, EPM SP16 patch1):
    B.R. Vadim

  • Retrieve the link from Bookmark of Report view on Enterprise Poral

    Hi All,
    We are running the BEx queries on Enterprise Portal. When I try to Bookmark a particular View of the query it says:
    "Bookmark 4XX9XXYJF84229XXQF2TBAZZD saved".
    If at a later stage I want to run the same view of the report, from where can I retrieve the 'Link' of this Bookmark (considering I did not save the link initially).
    I tried to T-code 'RSWR_BOOKMARK_REORG', but that does not give me the link.
    Regards,
    Shreyas.

    Please take a look at the FAQ for Portal.It has a section on the same topic.
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Milan:
    I have made a form in Portal EA 3.0.6.3.3, and I have tried to find a way to link the forms result to a report (as input).
    The Form is base on a non-updateable view and is use in order to use LOVs. The report is showing the details based on the search result of the form.
    What I need is a way to link the result of the form with the report parameters.
    I know I should use the On successful submission of a form, execute this PL/SQL block or PL/SQL procedure: in the firs form tap.
    I is should be something like this call('http://artemis/pls/portal30/APPS.RPT_DETAIL.show');.
    Artemis = local host/server
    APPS.RPT_DETAIL.show = the reports call interface
    I do a make the link with appropriate parameters???
    Yours thankfully<HR></BLOCKQUOTE>
    null

  • How to find all the instances for specific recurring report

    How can I use UQery Builder to find out all the instance related to specific Recurring job. I have tried using following query to get the result with poor performance.
    select SI_ID, IS_SCHEDUILE_STATUS from ci_infoobjects where SI_NEW_JOB_ID = 2604480
    Since I find that SI_ID stores the current instance id and SI_NEW_JOB_ID stores the recurrign job's ID.
    Please Help.
    Edited by: Gabriel Luk on Feb 14, 2011 5:21 PM

    I can not find 'SI_KEYWORD' is a indexed properties in following SAP Notes.
    1364250 - Which BusinessObjects Enterprise InfoObject properties are indexed
    1499196 - Which of the InfoObject properties are indexed
    Edited by: Gabriel Luk on Feb 15, 2011 5:09 AM

  • Cancel A Scheduled report from Infoview/Application

    Hi,
    Is it possible to cancel the schedule of a crystal report which is deployed on crystal report server?
    In crystal report Server XI, there is an option to reschedule the report and replace the existing schedule. However there is no option to cancel the schedule of a report forever.

    Retrieve the InfoObject for that scheduled instance, and invoke InfoObject.DeleteNow.
    Sincerely,
    Ted Ueda

  • How to reverse the changes made in a report program

    Hi Friends,
        I want to change a report program,but this report program is locked under one tp which is not yet released and it is in development only .I want to change the same report program but don't want to keep the changes done in the existing tp.I want to keep only changes which i will do.
    Please help me to achieve this task.
    Thanks in advance.
    Regards,
    Rajesh

    hi
    if u have done<b> Version Management</b> then u can retrieve the previous version of ur report
    <b>Version Management is done in utilities -> versions ->Version Management</b>
    otherwise its not possible.
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • How can i save and retrieve blob data through forms and reports...

    I have blob data type column and I want to save word, html, gif
    document in oracle database through forms 6 and retrieve the
    data into forms and reports.
    Details : I want to open .doc,.html,.gif file through a button
    and save it ..and i want retrieve the data into text item same
    in reports....
    If anybody have the answer then send me at
    [email protected]

    use ole container
    initialize the container with the filename (doc or gif)
    Edited by: arshid on Feb 8, 2009 1:57 PM

  • Setting the page orientation for a report

    Hi
    Currently, in infoview I have observed that we can set the page orientation for a report in a webi document , i.e. whether the report is to be viewed in landscape mode or portrait mode.
    Currently, in the BO SDK, I have come across the classes like Orientation, but am not able to figure out how to use them.
    Can you please paste some code snippet, how to use this class for setting the orientation of the document.
    Thanks in advance,
    Shruti

    Hi Shruti,
    To retrieve the Reportcontainer for an existing report on a WebI document, you can do the following:
    ReportStructure oReportStructure = oDocumentInstance.getStructure();
    ReportContainer oReportContainer = (ReportContainer) oReportStructure.getReportElement(0);
    Hope this helps.
    Regards,
    Dan

  • Schedule reports - Email config

    Can somebody provide me the steps for enable schedule report options and the email configuration.
    Would Email,SMTP configuration enable us to schedule reports provided we have permissions assigned ?
    Please provide any steps or configurations..Thanks..

    Hi John,
    I have the SMTP address with the ports and we have our mail server.
    As per admin guide, what would be the user for the destination ?
    User Name
    Provide the Job Server with a user name that has permission to send email
    and attachments through the SMTP server.
    Password
    Provide the Job Server with the password for the SMTP server.
    Can i just leave the user name and password so that the users email will be taken ?
    Please refer to SAP Note 455140 to configure the SMTP plug-in to send emails. However there is no section in SAPconnect to enable you to add a user and password as a means of authentication. You will have to enter the IP address of your sending SAP application server to your mail server as a means of authentication to enable emails to be correctly relayed to your mail server.
    Hope this helps
    Michael

  • Monitor Scheduled Reports

    Hi All.
    I am currently monitoring an application which generates reports via SSRS.  There are a number of scheduled reports in SSRS which output to a file share on an hourly basis. 
    I am looking for a way to monitor SSRS in order to ensure that the reports have executed successfully.  I thought this might be possible via SQL Agent Jobs.  However, the job names for Scheduled reports appear to be a GUID - not particularly useful.
    Is anyone aware of a way to achieve this?
    Cheers
    shaun

    Can you not monitor the jobs? Doesn't matter if it's a guid, it's still a data source. You should be able to resolve the guid in the monitor implementation.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • SCHEDULED REPORT RUNS FINE BUT UNABLE TO PULL UP THE RESULTS

    Hello all,
    I can create a new report in against Discoverer with no problem. The report can be run as a scheduled report....and the
    results pulled up with no problem.
    EXISTING reports that were converted during our 9i to 10G can be scheduled and run. However, when the user attempts to see
    the results they receive an error message stating:
    The results run for this scheduled workbook can no longer be used because the query has been changed.
    Do you want to query the database for the new results?
    After installing a patch some of the workbooks were able to be retrieved. It seems like there is some commonality in the workbooks that don't seem to work from the scheduled reports. It seems that any workbook that has an admin created calculation in the EUL as one of the selected fields or as a condition of the report, causes a problem.
    If anyone of you came across this situation please guide us.
    Thanks
    Manohar

    Hi Manohar
    By resaving I mean opening the workbook in Plus then clicking the Save button to force Discoverer to save a clean copy. You should then reschedule this and see what happens.
    Here's another trick from way back in the early days of Discoverer that might help. You said that the issue was with an admin created calculation. So, try this:
    Create a brand new calculation in your workbook and load the admin calculation into it. Then change all references for the admin calculation, conditions etc, to point at the new calculation.
    Believe it or not, this trick can sometime force Discoverer to work when it otherwise will not. At any rate, its worth a try don't you think?
    Best wishes
    Michael

  • Strange error while scheduling but can see the scheduled report

    Hi,
      When I schedule a Deski Report from my Favorite folder to my repository folder the instance fails and has this error message
    destination DLL disabled. []: [CrystalEnterprise.Smtp] .
    But when I see inbox I can see the report scheduled in required format.
    For information - I m using XIR3.1 SP2 and using a server group for scheduling this.
    Please help me identifying why the schedule fails.

    Hi,
         Please note, the error occurred when system tryng to push your completed scheduled report into a particular destination. In you case, the Repository Folder Path.
         Regardless, the solution provided by the previous post contained the same solutions you need to apply.
         In summary, you need to make sure you have permission to that particular path where the report will eventually reside.
    Regards,
    Ken

  • How to cancel or update a scheduled report instance?

    Is it possible to update or cancel a scheduled report instance?  How is this done in the java API, is there an example?
    If a report is scheduled by mistake as a recurring report there has to be some way to stop it, correct? 
    We are using Crystal Reports 2008.
    Thanks,
    --Jeff Hall.

    Thanks very much for your reply Adam!!
    Is there a way to pause the instance?  Is there example code to implement some of the functions in the Instance Manager portion of the CMS Console?
    Thanks,
    --Jeff.

  • How do we retrieve the category instances matching a search expression?

    Consider the following (simplified) example:
    We archive consolidated reports. Reports come from different branches each containing the data for multiple departments. We create a category containing attributes for the branch, department, and report date. We apply multiple instances of the category to each report, one for each department contained in the report.
    We can specify the department for our search and get back the reports with matching category instances; however, since the report dates are not necessarily predictable we can't qualify the search by date. What we'd like to do is retrieve the matching category instances and display them; the user would then select the desired instance to specify the report for retrieval.
    We tried requesting the categories and custom attributes with the search, but it appears ContentDB first finds the qualifying reports then returns all the category instances on those reports--not just the ones that matched the search expression.
    I see the SEARCH_FOR_DOCUMENTS, SEARCH_FOR_FOLDERS, etc. search options, but not one for SEARCH_FOR_CATEGORIES (or equivalent). Is there a way to retrieve just the category instances that matched the search expression?

    Unfortunately no.
    As you have found out, requesting Attributes.CATEGORIES on the document will return all category instances. You would currently need to do client-side processing to locate the specific matching category instance by recursing through the category item[] and checking first that the CATEGORY_CLASS matches, and second, the value of the particular category attribute matches.
    If you are building a custom application front-end, maybe you could consider applying a single instance of some master category to the report that has a String array attribute containing all of the associated unique department ids to which the report applies.
    Then having applied the 10.1.2.3.1 patchset (and in particular Enh 5171342 NEED SEARCH EXPRESSION SUPPORT FOR ARRAY TYPE CATEGORY ATTRIBUTES), you could quickly locate the reports of interest for a specific department.
    The master category instance could also potentially contain an array of DeptID:CategoryInstanceId pairs that allow you to quickly retrieve a specific category instance given a department id.
    Matt.

  • Can we get the list of all BO report scheduled to be sent(or have been sent) for a specified day?

    Hi all,
    For all BO reports scheduled to be sent out, can we get the list of all BO report to be sent(or have been sent) for a specified day?(For example, today or nex Monday).    Thank you.
    Regards,
    Eton.

    Hi Eton,
    To check the instances which have ran today, you can use the below query in query builder.
    SELECT SI_NAME,SI_ID FROM CI_INFOOBJECTS WHERE SI_INSTANCE=1 AND  SI_STARTTIME > '2014.08.20 00:00:00' Order by SI_STARTTIME DESC
    To check the instances which would be running in the future, that means you have recurring schedules. Check for the SI_NEXTRUNTIME to get the details of instances which will run in the future as per the recurrences.
    Thanks,
    Prithvi

Maybe you are looking for

  • How can I get Flash to install please?

    Hi, trying to install FP 11.7.700.169 on Imac OSX 10.6.8 with Safari 5.1.9.  Have tried on numerous occasions over days. Downloads fine, click on icon, installs, says installed successfully.  When I go to site requiring it, prompts me to install late

  • Submit Button for Email Form

    I have searched the forum (my apologies if I missed the correct solution) and have done my fair share of Googling on this topic to no avail. Is there a "simple" solution to setting up a submit button to send a form to email. I have the action of the

  • How can I get rid of the path in Type on a Path?

    Greetings Now I really feel stupid. First I couldn't find the magin tabs, now I can't get rid of the path. I have a feeling I might need to start over, but is there a way to lose the path and still have the text?

  • Invalid handle runtime error

    Enter name of file: Exception in thread "main" java.io.IOException: The handle is invalid at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java

  • Adapter setup

    Hi Experts, SOAP, JDBC and JMS Adapter setup(driver Installation) are comes under Post-Installation step of PI 7.0 or developer needs to install those things? Regards Sara