Creating Schedule With CalendarDays Using WS-SDK Seems To Miss Days

I've tried to create a couple of schedules in Business Objects using the WS-SDK, creating schedules that run on a monthly basis.
The parameters all appear correctly in the InfoView application, but the next run time misses out the first possible instance. E.g.
Creation Time:              5/26/2011 3:47 PM (Start time is 5/26/2011 11:02 PM)
Next Run Time:      7/1/2011 11:02 PM (Should have been 6/3/2011 11:02 PM)
Recurrence Type:      Object runs every month on the Friday of week 1.
Creation Time:              5/26/2011 12:33 PM (Start time is 5/27/2011 9:32 AM)
Next Run Time:      7/2/2011 9:32 AM (should have been 6/4/2011 9:32 AM)
Recurrence Type:      Object runs every month on the Saturday of week 1.
Any ideas why the first month in the range is missed out?

I fixed this by not specified the start date and end date in the CalendarDays object I was passing in.

Similar Messages

  • 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

  • How to create cross tab reports using RAS SDK api with Crystal Reports XI

    Hi Everybody,
    Iam generating reports in a web-based application with Crystal Reports XI using Report Application Server(RAS) SDK API. The columns in my report exceed that of an A4 sized page. So, when I export that report to pdf, only those columns that fit to a page are showing up. To solve, this problem, I thought of using cross tab. But, I donot know how to generate cross tab report using RAS SDK API. I have tried to get some code from the internet. But, I did not find any java code for that.Can some one give me some sample code.It is very urgent.
    Thanks in advance.

    Hi,
    The easiest way I use is to create the worksheet as regular table and then when i verify the data I get (non aggregate) I duplicate it as a cross tab.
    In the duplication wizard I just need to define the axis (using drag and drop).
    if you want to create a cross tab from the beginning you need to define that in the new workbook wizard (check the "cross tab" rather then "table"), chose your fields and define the place you want them.
    The data point (the center of the cross tab) is aggregated as to your machine definition and will happen automatically.
    for example: to find the amount of receipt by months:
    On the left put the "Buyer Name", on top put the "Months" and in the data point put the amount.
    What you'll get is something like:
    months: jan feb mar apr ......
    buyer_name
    jhon_smith 100 50 30 250 ......
    jhon_doe 80 45 90 453 ........
    and so on.....

  • How to create a blank PDF using acrobat SDK in perl or c#

    please help me with creating blank pdf using acrobat SDK in c# or in perl

    Hi, can you please let me know which version of Adobe you used in this tutorial?
    I have the Adobe Reader XI - is there a similar tutorial for this version?
    Thank you.

  • Help creating .dll with c using JNI

    Hi. I have created a JNI application that uses C to call Java. Now, I am trying to create the .dll for windows. I am using VS C++ compiler. My program compiles; however, it doesn't seem to start the JVM. I am not sure how to pass the arguments in VS C++ while builiding and running. Please let me know. Thanks.

    Hey,
    Thanks. I apologize for not being clear. I have created the dll file and an application that links to that dll and executes the code. It creates the .exe file and when I execute it, it goes through the sample() function that just prints "Hello", and then it goes through the startJVM() function where the JVM is intended to start; however, the status of JVM is returning -1. It's not able to start JVM. I have included the path for the jvm.dll and jvm.lib. But, still won't work. Please reply with suggestions/comments. Thanks again.

  • Creating variables in BO using BO SDK

    Hi,
    We can create variables which can be formulas applied on objects using infoview.
    Is there any way, these variables can be created using java BO SDK?
    Please paste some sample code for us.
    Cheers,
    Shruti

    Please find below a snippet code based on java managed RAS api that adds a formula onto the report. I hope this answer your question.
    <%@ include file="logon.jsp"%>
    <%
        ReportClientDocument oReportClientDocument;
        IReportAppFactory oReportAppFactory;
        IInfoObjects oInfoObjects=null;
         IInfoObject oInfoObject=null;
         String reportName = "SimpleRCAPIReport.rpt";
        // Retrieve report to be modified
        oInfoObjects = iStore.query("Select * from CI_INFOOBJECTS where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0 and SI_NAME = '" + reportName + "'");
         oReportAppFactory = (IReportAppFactory)es.getService("", "RASReportService");
         oReportClientDocument = oReportAppFactory.openDocument((IInfoObject)oInfoObjects.get(0), 0, java.util.Locale.ENGLISH);
         // First create the formula field
         FormulaField newFormulaField = new FormulaField();
         //  Set the parameters (assume it's a string and Crystal Syntax)
        newFormulaField.setText("{Customer.Contact First Name} + ' ' + {Customer.Contact Last Name}");
        newFormulaField.setName("CustomerName");
        newFormulaField.setSyntax(FormulaSyntax.crystal);
        newFormulaField.setType(FieldValueType.stringField);
        // Now add it to the report
        oReportClientDocument.getDataDefController().getFormulaFieldController().add(newFormulaField);
         // Now that the formula has been created, add the newly created formula to the report
         // First determine which section to add the formula field to - in this case the details section
         ISection sectionToAddTo = oReportClientDocument.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0);
         // Get back all the formulafields in the report
         Fields formulaFields = oReportClientDocument.getDataDefController().getDataDefinition().getFormulaFields();
         int formulaFieldIndex = formulaFields.find("{@CustomerName}", FieldDisplayNameType.formulaName, java.util.Locale.ENGLISH);
         Field formulaField = (Field)formulaFields.getField(formulaFieldIndex);
         // Set the type of field this is
         formulaField.setType(FieldValueType.stringField);
         // Now create a new Field object which will be added to the report
         FieldObject oFieldObject = new FieldObject();
         // Set the datasource of this field object to the formula form of the above Database Field Object
         oFieldObject.setDataSourceName(formulaField.getFormulaForm());
         oFieldObject.setFieldValueType(formulaField.getType());
         // Now set the co-ordinates of where the field will go
         oFieldObject.setLeft(8000);
         oFieldObject.setTop(1);
         oFieldObject.setWidth(1911);
         oFieldObject.setHeight(226);
         // And finally Add it to the report
         oReportClientDocument.getReportDefController().getReportObjectController().add(oFieldObject, sectionToAddTo, -1);
         // Now display the report
       session.setAttribute("reportSource", oReportClientDocument.getReportSource());
       response.sendRedirect("CrystalReportViewer.jsp");
    %>
    Cheers
    Alphonse

  • Create SR with Attachment using WSDL

    Anybody knows how to create a SR on CRMOD, with an Attachment consuming WSDL?

    Dear Dmitry Rassakhatsky
    Can you please elaborate what you are trying to achive using BAPI_DOCUMENT_CREATE02  and SAP XI.
    We would be in better position to suggest solution.
    Also most of us will not be able to understand Technical ABAP so request you to provide detail scenario.
    With Warm Regards
    Mangesh Pande

  • Create Bom with alternative using CSAP_MAT_BOM_MAINTAIN

    Hi all,
    I am trying to create a new alternative BOM and thought I had to use the function CSAP_MAT_BOM_MAINTAIN. Creating new BOMs with CSAP_MAT_BOM_CREATE works as well as maintaining them with CSAP_MAT_BOM_MAINTAIN, but I fail in creating a new alternative BOM. In the function
    CS_DI_HEADER_OBJECT_CHECK (called within the maintain-function ) it says (close to the failure )
    "*Anlegen von Alternativen über CSAP nicht erlaubt"
    "creation of alternative using csap not allowed" ....
    Well, sounds like I am using the wrong function, but which should I use instead ???
    Thanx in advance,
    Karsten

    Hi,
    Use : CS_BI_BOM_CREATE_BATCH_INPUT1 To Create a new BOM or New Alt. BOM.
    Use : CS_BC_BOM_CHANGE_BATCH_INPUT to maintain the BOM.

  • Can't create text with PHP using imagettftext [SOLVED]

    I think that after the upgrade of PHP to the modular one I can't create text using TTF fonts. Before I file a bug report could someone confirm if it works or not for them? I might just have screwed something in my box.
    This code should create a text image and display it in the browser (it assumes you have DejaVu fonts in the default directory):
    <?php
    // Set the content-type
    header("Content-type: image/png");
    // Create the image
    $im = imagecreatetruecolor(400, 30);
    // Create some colors
    $white = imagecolorallocate($im, 255, 255, 255);
    $grey = imagecolorallocate($im, 128, 128, 128);
    $black = imagecolorallocate($im, 0, 0, 0);
    imagefilledrectangle($im, 0, 0, 399, 29, $white);
    // The text to draw
    $text = 'Testing...';
    // Replace path by your own font path
    $font = '/usr/share/fonts/TTF/DejaVuSans.ttf';
    // Add some shadow to the text
    imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
    // Add the text
    imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
    // Using imagepng() results in clearer text compared with imagejpeg()
    imagepng($im);
    imagedestroy($im);
    ?>
    Could someone with an up to date php with GD enabled tell me if it works or him/her?
    Thanks.
    EDIT: Ok, I solved it. The error reporting is turned off by default now, so I was not getting any error. After turning it on I found out it was related to the open_basedir directive being enabled now in php.ini. Turning it off allowed me to access the TTF for drawing text.
    Last edited by Bogart (2007-11-01 00:43:33)

    Aha!  I figured it out.  I used File...Open As to open it as a Camera RAW file.  In the ACR editor, it was showing as 16-bit depth.  Changed it to 8-bit and saved it.  Now the Text tool works!
    Ken

  • Creating PDF with IMAGE using CFDOCUMENT TAG

    Hi Guys,
    I m facing problem while creating the PDF using CFDOCUMENT
    tag.
    Actually my clients want the IMAGEs in PDF document.
    Problem is most of the images in JPG format and while I am
    going to attach images in PDF document it takes lots of time for
    creating PDF. In most of time it cause timeout.
    I have try to convert images JPG to PNG, yes I some what
    better performance than JPG format but still it is work for 20 - 25
    images. In my case I want to attach normally 50-100 images in PDF
    (sometimes it is more 200).
    PLZ, Help me.. F1...F1...F1
    thanks in advance
    Pritesh
    Coldfusion Programmer

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

  • Creating snapshops with API using Forms 5.0

    We're trying to create snapshots on an Olite database using the
    API. We've problems below are not yet solved:
    1. It's impossible to create complex snapshots. A complex
    snapshot uses a union or a join.
    2. It's impossible to create a snapshot for a view.
    3. It's impossible to create a snapshot that contains single
    quotes. For example: The snapshot "select 'A' from dual" can't
    be created.
    null

    We're trying to create snapshots on an Olite database using the
    API. We've problems below are not yet solved:
    1. It's impossible to create complex snapshots. A complex
    snapshot uses a union or a join.
    2. It's impossible to create a snapshot for a view.
    3. It's impossible to create a snapshot that contains single
    quotes. For example: The snapshot "select 'A' from dual" can't
    be created.
    null

  • Help me in creatting MenuItem with sortcut using ctrl + O

    How to use sortcut(ctrl + o) in awt menuitem.......

    From the API:
    (in java.awt.MenuItem)
    void setShortcut(MenuShortcut s)
    Set the MenuShortcut object associated with this menu item.
    (In java.awt.MenuShortcut)
    (ctor)
    MenuShortcut(int key)
    Constructs a new MenuShortcut for the specified virtual keycode.
    (from java.awt.event.KeyEvent)
    (field)
    static int VK_O
    Hopefully that should tell you everything you need to know - if not, check the API docs out, they will answer these kinds of questions a lot faster than posting to the forums will
    Good Luck
    Lee

  • Create material with reference using BAPI

    Hi
    I need to create material using refrence to another material for all material Views. Can I use BAPI_MATERIAL_SAVEREPLICA.
    Which parameter I need to fill for reference materia
    Moderator message: please do your own research before asking.
    Edited by: Thomas Zloch on Jan 12, 2011 3:18 PM

    Hi Goutam,
    You can use the BAPI BAPI_MATERIAL_SAVEDATA, which will create/update the material. You can pass the reference material in the filed BAPI_MARA-PL_REF_MAT. And you can pass reference material for all view like this.

  • Creating PO with me21 using call transaction

    hi,
    I need some help regarding the application:
    i have to build a custom screen having fields for creating PO using me21 transaction using call transaction.
    would anybdy please guide me how to do it.
    i wd appreciate ur help

    Hi Harpreet
               For creating a custom screen you will ve to use a screen exit. For purchase order 'MM06E005' will be useful. Explore it in XN SMOD.
    Regards
    PRAFUL

  • Create PO with attachement using BAPI_POEC_CREATE

    I'm using bapi BAPI_POEC_CREATE to create a PO in SRM but i also need to add an attachment.
    The bapi has parameter I_PO_ATTACH but i need an URL for the attachment, what do i need to do in order to upload the attachment and get the URL?
    Thank you in advance.
    Regards,
    Pedro.

    anyone?

Maybe you are looking for