Fail to schedule FullClient report (PDF, Inbox) from Java

This is occurring in XI Reports 3.1
I'm trying to schedule a Deski (FullClient) report through the Java API.
The report has a PDF format and Inbox destination...
It also has a prompt with a default value.
When I schedule the report through InfoView it does so succesfully.
When I try to perform the same action through the Java API... the scheduling does not work.
Here's a snippet of code I'm using:
=======================
loInfoObjects = moInfoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME = '" + lsRptNm + "'");
loFullClientPubl = (IFullClient)loInfoObjects.get(0);
loFullClientPubl.properties().setProperty("SI_KIND", CeKind.PDF);
loFullClientPubl.getProcessingInfo().properties().setProperty("SI_KIND", CeKind.PDF);
loFullClientPubl.getSchedulingInfo().setRightNow(true);
if (loFullClientPubl.hasPrompts())
    IFullClientPrompts loPrompts = loFullClientPubl.getPrompts();
    IFullClientPrompt loPrompt = (IFullClientPrompt)loPrompts.get(0);
    loPrompt.getValues().set(0, "123456");
    loFullClientPubl.getPrompts().set(0, loPrompt);
else //This is the scenario that executes....
    loFullClientPubl.getPrompts().add("Code").getValues().add("123456");
    loFullClientPubl.getProcessingInfo().properties().setProperty("SI_HAS_PROMPTS", true);
loFullClientPubl.schedule(); //Schedule the report
=====================================
After I execute the code, I can see that an entry has been created in CI_INFOOBJECTS but no record of the scheduling shows up in infoView, not even as a "failed" report. It's as if the report had never been scheduled.
In CI_INFOOBJECTS ...
Unlike the manual scheduling, the SI_KIND, and SI_HAS_PROMPTS properties for the failed scheduling are not set to "PDF" and "true" as expected, but remain as "FullClient" and "false"
This is the reason why I set the properties programmatically prior to scheduling the report. While this did change the values in CI_INFOOBJECTS, it still did not fix the problem of scheduling, that is no reports show up in infoView.
Have any of you guys come across this? I'm stumped...
Thank you

I think its your code.
Look at the code snippet below for scheduling.
//Retrieve the first object in IInfoObjects collection
IFullClient fcDoc = (IFullClient)oInfoObjects.get(0);
IFullClientFormatOptions reportFormat = fcDoc.getFullClientFormatOptions();
//Set schedule format.
int formatType = IFullClientFormatOptions.CeFullClientFormat.PDF;
reportFormat.setFormat(formatType);
//set prompts
IFullClientPrompts fcPrompts = fcDoc.getPrompts();
Iterator iter = fcPrompts.iterator();
while(iter.hasNext())
      IFullClientPrompt fcPrompt = (IFullClientPrompt) iter.next();
      fcPrompt.getValues().set(0,"new prompt value")
//Retrieve the ISchedulingInfo Interface for the Report object and set the schedule
//time (right now) and type (run once)
ISchedulingInfo schedInfo = fcDoc.getSchedulingInfo();
schedInfo.setRightNow(true);
schedInfo.setType(CeScheduleType.ONCE);
//Schedule the InfoObjects.
infoStore.schedule(oInfoObjects);
I haven't testing the setting prompts part but it should work. This will schedule to default location. To schedule to Inbox use the following:
IDestinationPlugin destinationPlugin = (IDestinationPlugin)infoStore.query("SELECT TOP 1 * "FROM CI_SYSTEMOBJECTS WHERE SI_NAME='CrystalEnterprise.Managed'").get(0);
//Retrieve the Scheduling Options.
//This interface is the one which allows us to add the file location for the scheduling.
IManagedOptions managedOptions = (IManagedOptions) destinationPlugin.getScheduleOptions();
managedOptions.setDestinationOption(IManagedOptions.CeDestinationOption.ceInbox);
managedOptions.setIncludeInstance(true);
managedOptions.setTargetObjectName("My Report Instance");
managedOptions.setSendOption(IManagedOptions.CeManagedSendOption.ceCopy);
//Set of users that will receive the instance. 
Set userSet = managedOptions.getDestinations();
//Query for the id of a particular user that will receive the instance.
IInfoObjects users = infoStore.query("SELECT TOP 1 SI_ID " + "FROM CI_SYSTEMOBJECTS " + "WHERE SI_NAME='Administrator' AND SI_PROGID='CrystalEnterprise.User'");
if (users.size() > 0) {
     IInfoObject user = (IInfoObject)users.get(0);     
        int id = user.getID();                                   
         userSet.add(new Integer(id));
IDestination destination = schedInfo.getDestination();
destination.setFromPlugin(destinationPlugin);
Thanks
Aasavari

Similar Messages

  • WebI does not return failed when scheduling a report which only holds parti

    WebI does not return failed when scheduling a report which only holds partial results.
    We have scheduled reports which take some time to run. When they are scheduled they sometimes show successful even though the report only holds partial results. The only indication is when you open the report as webi report you see the warning that it holds partial results.
    When running the report manually, it works file.
    The issue is not in the no of rows in the universe settings because we this unselected. The issue is that it times out.
    The reason that it times out is that a lot of resources are used for loading and processing data when the report is scheduled. When running it manually, it works because at this time the serverload is less. the time in the universe is set to 10 min.
    The version we have is BOXIR2-SP4.
    Ok. Issue identified.
    The question is - why is the report successful when it holds partial results? If this is normal behavior, noone can really trust the scheduled reports, especially when you save it to excel and send it by mail.
    Is there a solution for this except increasing the allowed query time which would not solve the issu but only allow more reports to complete?
    Edited by: Karlgren Michael on Sep 17, 2009 1:22 PM

    Hi ,
    Currently this problem exists in XI R2. This feature will be part of thenext Service Pack i.e XI R2 SP6.
    This CER will be delivered from IDC Webi and BIP Platform as part of Jupiter Sp6.
    Problem Statement:
         Scheduled WebI Reports which are partially refreshed are distributed to the destinations for Users to View and make decisions. These users arenu2019t usually aware that these reports have u201CPARTIAL RESULTSu201D
    Recomended Solution:
        Allow the Schedule Creator / Modifier to set a parameter to stop the distribution of the u201CPARTIALLY REFRESHEDu201D WebI report.
    Thanks
    Salini

  • Report in excel from java

    I'm generating report in Excel from Java.In this is it posssible to place background color upto the text in the single cell

    If you are using POI, you can set the background colour for a single cell.

  • Viewing and printing a PDF file from Java Swing Application

    Hello,
    I need to view and print PDF files from Java Swing Application.How do I do that?I appreciate your help.
    Thank you
    Sumana Somareddy

    If you have a link to the URL pointing to the PDF file, you can allow the browser to open it. Then use the print function of the browser to print the PDF document.
    Regards,
    Tak.

  • Invoking Acrobat PDF compare from Java code

    Need to invoke the Adobe Acrobat XI's PDF compare feature using Java code.
    Description:
    ========
    We are exploring the possibilities of passing 2 PDF's from Java to Adobe Acrobat XI SDK to get the compared results in new PDF.
    If anyone has explored with this feature... please share your thoughts.

    You would need to write a custom plugin to Acrobat that calls the compare APIs (as they are only accessible from C/C++).  Your plugin can then expose whatever from of IAC/IPC that it wishes to communicate with your Java code.
    Of course, this is all DESKTOP code since Acrobat can't be used on a server.

  • Need to schedule a report in background from an user exit

    Hi Experts,
    I have a requirement to execute a report in background from an <b>user exit</b>. Please advise.
    Thanks in advance,
    Vivenchandar R

    Use the <b>submit</b> statement.
    For example
    SUBMIT zipr_trans_details "VIA SELECTION-SCREEN
                                  WITH so_trdt  IN lr_tr_period
                                  WITH so_empno IN lr_emp
                                  AND RETURN.
    Where <b>zipr_trans_details</b> is the report name.
    Message was edited by:
            Naren Someneni

  • Error accessing PDF files from Java

    In CF7, I have a routine that opens submitted PDF files
    through Java to do some manipulation. Similar to CF8 PDF
    manipulation, but more complex. In almost all cases, it works fine,
    except two.
    For one, a submitted PDF was corrupted somehow -- I can't
    even open it with Acrobat. On the line:
    "reader=pdfReader.init(pdfFile);" this returns the error below.
    This is expected. But with a couple other PDF's, that do open fine
    in Acrobat, I get the same error. I even re-saved the PDF file to
    different versions of Acrobat, but java still complains. Any ideas
    what causes this, or what to do to prevent it?
    Does anyone know if CF8 java processing does anything
    different here that would prevent problems like this?
    reader=pdfReader.init(pdfFile);
    An exception occurred when instantiating a java object. The
    cause of this exception was that: .
    From the stack trace:
    java.lang.reflect.InvocationTargetException
    at
    sun.reflect.GeneratedConstructorAccessor48126.newInstance(Unknown
    Source)

    It does always happen after having successfully done others,
    as these are in a list of about a dozen that it processes at a
    time... but it is always consistent - it does all the others fine,
    and then always breaks on these particular PDF files, time after
    time, day after day. So it's not a random thing that comes and
    goes.
    The 3rd party tool is the one that's "built-in" to CF,
    com.lowagie.text.pdf.PdfReader. This is all on a shared host, and
    so I wouldn't have access to installing alternatives.

  • How to open an PDF file from Java Application

    Hi
    I am developing a GUI application in java swing.
    on clicking one button, I want to open PDF file from my swing application.
    Is there any API through which I can achieve this?
    Tapan Maru
    Sun Certified Java Programmer

    Here's a way to do it (if I understand you
    correctly). Just let explorer.exe do it for you.
    import java.awt.*;
    public class openPDF
         Desktop desktop = Desktop.getDesktop();
         public openPDF()
              open("test.pdf");
         public void open(String path)
              try
                   Runtime.getRuntime().exec("explorer.exe "+path);
    } catch(Exception e) { System.out.println("NAI!
    I! ERROR!\n"+e); }
         public static void main(String[] args)
              openPDF myApplication = new openPDF();
    Why do you have a Desktop object as a member but instead of using it, you execute a command with Runtime (which is not platform independent!)???
    -Puce

  • Opening jpg/pdf files from Java

    Hi,
    How can I open jpg/pdf files or any file in general from Java, such that they open up in the default program in Windows?
    I dont want to read in the files using Java. Just open them in their default program. Eg. PDF should open in Adobe.
    thanks,
    parsifal

    Thanks both of you for answering.
    You don't need to make a map. You need the "cmd /c
    start" command in Windows.This is what I was missing. I looked up DOS commands to open a files in window but couldnt get it. So I thought java would have some command that equals double-clicking icons on window.
    Thanks.
    best,
    parsifal

  • Failed to schedule crystal report

    Hi,
    We are using BO XI R3.1 and I am trying to schedule a crystal report in CMC in pdf format which contains parameters. After the schedule the error message am getting was Error in File ~tmp29bc61e513637d0.rpt: Failed to retrieve data from the database. Details: [Database Vendor Code: 2812 ]
    I've also checked if there is an issue with servers and all of them are running.
    However when i try to view the report manually by giving the parameters it ran fine and i was able to see the report.
    Could any one please advise me what could be the issue i really appreciate your help on this regard.
    Thanks,
    Eswar

    Well exporting a report from the viewer to pdf and scheduling to pdf both use the same conversion driver.  I can't say I've ever seen a difference in formatting when scheduling vs exporting from InfoView after a view.  Is it possible you are comparing the results from the CR designer and exporting to pdf vs scheduling to pdf?
    Do this:
    1.) open the report in the CR Designer on the server machine. Refresh it and export to pdf and save the file.
    2.) open the same report you published to the CMS and view from InfoView.  Refresh it and make sure to use the same exact parameter values you did in #1.  Export to pdf and save the document with a different name.
    3.) schedule the same report to pdf & unmanaged disk destination using the same parameter values in #1. 
    Compare all 3 files.  Are they still different? They should all be identical reports assuming the data on the db side didn't change between refreshes.  Using the same parameter values is important because this can change the data as well as the formatting you've designed the report with.  If you're still getting blank pages or the output files are different in any way, you'll probably want to open a support ticket.   Someone in support can help you compare files, formatting and the make sure the version you are using doesn't have a regression.

  • PDF export from JAVA?

    is it posible to export an PDF from a java app ?
    is there any api or sample ?

    It's very easy to do with jasper reports
    http://jasperreports.sourceforge.net/
    - create a jrxml file (very easy wiht ireports - http://sourceforge.net/projects/ireport/)
    compile your report (to a jasper file)
    java code:
    public void createPDF(String pdflFileName) {
    try {
    //compilte the report
    Map parameters = new HashMap();
    String jrxmlName = "C:\\Temp\\jasper\\ListUsers.jrxml";
    System.out.print("Compiling the report wiht jasper 1.0.1...");
    JasperDesign jasperDesign;
    jasperDesign = JRXmlLoader.load(jrxmlName);
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    JasperPrint print = JasperFillManager.fillReport(jasperReport,
    parameters,
    new JRBeanArrayDataSource(userBean.getBeanArray()));
    JasperExportManager.exportReportToPdfFile(print, pdflFileName);
    System.out.println("Your file " + pdflFileName + " is saved...");
    } catch (JRException e) {
    e.printStackTrace();
    }

  • Printing of pdf document from java application

    Hello,
    I want to print out a pdf document which I get from a server as a byte-stream. I don't want to display or preview it on the client but print it out right away. Is there a way to do this?
    Thank you very much!
    Matthias

    Hi Matthias,
    If you have got solution for this can u suggest me.
    I'm using following code
              PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
              DocFlavor flavor = javax.print.DocFlavor.INPUT_STREAM.AUTOSENSE;
              System.out.println("====================>"+flavor);
              PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
              PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
              PrintService service = ServiceUI.printDialog(null, 200, 200,printService, defaultService, flavor, pras);
              if (service != null)
                   try
                        javax.print.attribute.standard.Copies obj=new javax.print.attribute.standard.Copies(1);
                        Attribute at=(Attribute)pras.get(obj.getClass());
                        int noOfCopies=1;
                        if(at!=null){
                             try{
                                  noOfCopies=Integer.parseInt(at.toString());
                             }catch(Exception err){noOfCopies=1;}
                        for(int i=0;i<noOfCopies;i++)
                             URL url = null;
                             try{
                                  url = new URL(urlToPDF);
                                  url.openConnection();
                                  fis = url.openStream();
                             }catch(Exception err){}
                             DocPrintJob job = service.createPrintJob();
                             job.addPrintJobListener(printjoblis);
                             DocAttributeSet das = new HashDocAttributeSet();
                             Doc doc = new SimpleDoc(fis, flavor, null);
                             pras.add(Sides.ONE_SIDED);
                             job.print(doc, pras);
                   }catch(Exception err){System.out.println("=========>"+err);}
    some times i'm getting garbage values in the printout.
    Thanks & Regards,
    Surya.

  • Generating PDF doc from java..

    hello all!
    i am looking for some API that would help me generate PDF or WORD document in my JSP or servlets.
    i have to present data and some graphs in PDF document.
    suggestions are appreciated.
    thanks in adavance,
    /rahul

    thanks aswhin. iText workds just fine.
    i am also looking to generate word documents from my servlets.
    do you have any suggestions?
    thanks once again.
    /rahul

  • How to print PDF file from java application?

    Hi,
    I have a java application that needs to print an PDF files. Could any one provide me links to tutorial/sample codes for doing this?

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=print+pdf+files&subCat=&site=dev&qp=&chooseCat=javaall&col=developer-forums

  • Problem while  calling PDF file from java

    Hi,
    In my Java standalone application i need show PDF files.
    By using following code I can be able to show PDF files.
    String theUrl=""//location of the
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + theUrl);
    This is working fine with Acrobat 5, Acrobat 6 and Acrobat 7.
    But problem with Adobe Acrobat 8
    Cant be able to show PDF files using the above code.
    Please help me to resolve to this issue.
    Thanks & Regards
    TKR

    I have the exact same problem as TKR. How do we fix the problem so ADOBE 8.1.2 will work for PDF files?

Maybe you are looking for