Skip to Content
0
Former Member
Mar 05, 2009 at 05:42 AM

Set 'Use Job server default' for Unmanaged disk destination

213 Views

Hi,

I am using BO XI R2 SDK to schedule reports.

I want to set all my reports destinations to Unmanaged disk to a particular folder. I have set these in reportjobserver's destination configuration too.

Now i want create schedules through code for all my reports. I want these reports to use the job server defaults. I am unable to find a solution for this. The code i am currently using is as follows:

Code:

InfoObject diskObj = tempStoreForDisk.Query("SELECT * FROM ci_systemobjects where si_name='CrystalEnterprise.DiskUnmanaged'")[1];

DestinationPlugin destDiskPlugin = (DestinationPlugin)diskObj;

DiskUnmanaged diskUnmanaged = (DiskUnmanaged)destDiskPlugin;

DestinationOptions destinationOptions = (DestinationOptions)diskUnmanaged.ScheduleOptions;

DiskUnmanagedOptions diskUnmanagedOptions = new DiskUnmanagedOptions(destinationOptions);

diskUnmanagedOptions.DestinationFiles.Add(path);

schedulingInfo.Destinations.Add("CrystalEnterprise.DiskUnmanaged");

schedulingInfo.Destinations[1].SetFromPlugin(destDiskPlugin);

I want the italics line of code to be replaced with some code that enables the instance to use job server defaults.

If a solution for the above query is not available, is it possible to set 'specific filename with extension' in the unmanaged destination through code?

Could anyone please help me with any pointers?

Thanks.