Skip to Content
author's profile photo Former Member
Former Member

How to delete the reports from BO Server which are scheduled through SDK.

Hi Guys,

I see that whenever users go to web app, and schedule report, and sends the PDF to their inbox. But it's also storing the refreshed PDF report in BusinessObjects server, which I consider is unnecessary.

For more schedules, it will be keep on storing the reports in BO server. After users received the reports in their email, not sure why we have to store them in BO server.

Now I've to change the SDK program not to store the instance once it is emailed out to users.

Can I do it before ending the session? Deleting reports from servers once it is send out is good way or it has any side affects? Please suggest me...

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 24, 2012 at 05:55 PM

    DeletionCriteria criteria=new DeletionCriteria();

    here "criteria" should be popultaed with the values that would filter and delete

    biPlatform.cleanInstances(sessionInfo, "INFO_OBJECTS_PATH", criteria);

    This worked perfectly for me.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 17, 2012 at 10:38 AM

    Hi,

    normally to avoid them stored in BO server when scheduling through Infoview, you need to deselect the option: "Keep an instance in the history" on the Destination.

    Through the SDK you need to set the IDestinations.setCleanup(boolean) to true.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Aasavari Bhave

      I get error message after I set the value to true. I 've included the code from which my reports are scheduled. The SMTP is also included below. Some part of code is not included, if you need further info just let me know.

      CODE:

      public class ReportScheduler {

      public void scheduleReport() throws RemoteException, ServiceException {

      FullClient obj = getFullClientObject("reportName");

      //Here I had my setCleanup(TRUE)

      obj.getSchedulingInfo().setCleanup(true);

      setSchedule(obj);

      setPromptValues(obj,new String[] {"String1","String2"});

      setFormat(obj, FullClientFormatEnum.PDF);

      setDestination(obj);

      // execute scheduling of report

      InfoObjects objs = new InfoObjects();

      objs.setInfoObject(new InfoObject[] { obj });

      // I get error message from here

      biPlatform.schedule(sessionInfo.getSessionID(),objs);

      }

      public FullClient getFullClientObject(String reportName) throws RemoteException {

      //ResponseHolder r = biPlatform.get(sessionID, path, options);

      ResponseHolder rh = biPlatform.get(sessionInfo.getSessionID(),INFO_OBJECTS_PATH + "/" + reportName + "@*[SI_KIND='FullClient']",

      null);

      InfoObjects infoObjects = rh.getInfoObjects();

      return (FullClient) infoObjects.getInfoObject(0);

      }

      private void setSchedule(final FullClient obj) {

      SchedulingInfo schedInfo = new SchedulingInfo();

      schedInfo.setRightNow(Boolean.TRUE); // run immediately

      obj.setSchedulingInfo(schedInfo);

      }

      public void setDestination(final FullClient obj) {

      // Set the smtp options

      SMTPScheduleOptions smtpOptions = new SMTPScheduleOptions();

      smtpOptions.setMessage("Your %SI_NAME% Report is attached.");

      smtpOptions.setSubject("Your report has been created.");

      smtpOptions.setToAddresses(new ToAddresses(new String[] {"example@example.com}));

      smtpOptions.setSenderAddress(FROM_ADDRESS);

      smtpOptions.setAttachmentsEnabled(Boolean.TRUE);

      // Add attachmentss

      smtpOptions.setAttachments(new Attachments(new Attachment[] {

      new Attachment("%SI_NAME%" + ".pdf","application/pdf", null)

      }));

      // pass the collection of destinations back to the scheduling info

      obj.getSchedulingInfo().setDestinations( new Destinations(new Destination[] {

      new Destination(smtpOptions,"CrystalEnterprise.SMTP",null, null)

      }));

      }

      }

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.