Hi,
I'm using the Crystal .NET APIs to schedule a report on Crystal Enterprise Server. (Snippet code bellow).
Everything works fine, I can schedule the report and everything, but the issue I have is that if I change the default option, lets says this time around users schedule the report to be emailed, and the format from Default RPT to PDF.
Now the problem is that by doing so, this know becomes the default option.
My question is, is there an option in Crystal Enterprise (CMC) to reset the default options after every report runs, or do I have to do something different in the code when I schedule the report so I don't override the default options
for the report, just one time change.
...
DestinationPlugin destinationPlugin = (DestinationPlugin)infoObject;
//Downcast the DestinationPlugin instance to a Smtp instance.
smtp = (Smtp)destinationPlugin;
//Retrieve a DestinationOptions instance from the ScheduleOptions property of the Smtp instance.
destinationOptions = smtp.ScheduleOptions;
smtpOptions = new SmtpOptions(destinationOptions);
smtpOptions.ToAddresses.Add("example@example.com");
...
schedulingInfo.Destination.SetFromPlugin(smtp);
_infoStore.Commit(infoObjects);
....
//Schedule the report
_infoStore.Schedule(infoObjects);
Thanks,
Dan
I'm using the Crystal .NET APIs to schedule a report on Crystal Enterprise Server. (Snippet code bellow).
Everything works fine, I can schedule the report and everything, but the issue I have is that if I change the default option, lets says this time around users schedule the report to be emailed, and the format from Default RPT to PDF.
Now the problem is that by doing so, this know becomes the default option.
My question is, is there an option in Crystal Enterprise (CMC) to reset the default options after every report runs, or do I have to do something different in the code when I schedule the report so I don't override the default options
for the report, just one time change.
...
DestinationPlugin destinationPlugin = (DestinationPlugin)infoObject;
//Downcast the DestinationPlugin instance to a Smtp instance.
smtp = (Smtp)destinationPlugin;
//Retrieve a DestinationOptions instance from the ScheduleOptions property of the Smtp instance.
destinationOptions = smtp.ScheduleOptions;
smtpOptions = new SmtpOptions(destinationOptions);
smtpOptions.ToAddresses.Add("example@example.com");
...
schedulingInfo.Destination.SetFromPlugin(smtp);
_infoStore.Commit(infoObjects);
....
//Schedule the report
_infoStore.Schedule(infoObjects);
Thanks,
Dan