Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

****** Crystal Reports 11.5 .NET API - Report Scheduling Question*****

Status
Not open for further replies.

DaniDak

Technical User
Mar 13, 2002
44
0
0
US
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
 
There is nothing you can set in the CMC, you will have to do something within your code to change it back.

Thanks so much!
satinsilhouette
 
Well, is there a way to schedule the report that does not change the default settings using the .NET APIs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top