• 5 Subscribers
  • 114 Views
0

Need help with crystal reports. I want to set different destinations for when a report is successfully ran and when it fails. Looked at INotification but can't seem to get Destination plugins. Added code

    ISchedulingInfo sched = report.getSchedulingInfo(); 
    sched.setRightNow(true);
    INotifications notify = sched.getNotifications(); 
    IDestinations dest = notify.getDestinationsOnSuccess(); 

    /* 
    here I would like to set SMTP options manually  
    ISendable iSendable = (ISendable) infoObject;
        IDestination destination = iSendable.getSendToDestination();
        IDestinationPlugin SMTPdestinationPlugin = getDestinationPlugin(
        infoStore, "CrystalEnterprise.Smtp");
        ISMTPOptions SMTPOptions = (ISMTPOptions) SMTPdestinationPlugin.getScheduleOptions();
        SMTPOptions.getDomainName("XYZ");
        SMTPOptions.setServerName("XYZ");
        SMTPOptions.setPort("XYZ");
        //...etc
    */

    iStore.schedule(results);

0 answers in total

Answer this questsion