rajeshgooner
IS-IT--Management
Hi,
Am having problems trying to customise the web samples to schedule to an unmanaged disk destination. I need to set the password and username to the unmanaged disk but am not sure of the exact syntax:
Dim disks
' Gets the Disk InfoObject from the CMS. Note that the SI_PARENTID will always be 29.
Set disks = iStore.Query("Select SI_DEST_SCHEDULEOPTIONS, SI_PROGID From CI_SYSTEMOBJECTS Where SI_PARENTID=29 and SI_NAME='CrystalEnterprise.DiskUnmanaged'")
' Gets the actual DiskUnanaged object and its ScheduleOptions.
If (disks.Count = 0) Then
redirectWithError "../Error.asp", "The disk could not be found."
End If
Dim disk
Set disk = disks.Item(1)
Dim diskSchedulingOptions
Set diskSchedulingOptions = disk.PluginInterface("").ScheduleOptions
diskSchedulingOptions.DestinationFiles.Add("\\COMPUTERNAME\test.pdf")
diskSchedulingOptions.Password = 'password'
diskSchedulingOptions.UserName = 'User'
' Copies the disk options into the report's scheduling options. This will cause the
' report's instance to be copied to the directory.
scheduleInfo.Destination.SetFromPlugin(disk)
The part to set the options is where I think I'm going wrong and I'm sure I'm not setting the password and username correctly. CAn anyone help please...?
Am having problems trying to customise the web samples to schedule to an unmanaged disk destination. I need to set the password and username to the unmanaged disk but am not sure of the exact syntax:
Dim disks
' Gets the Disk InfoObject from the CMS. Note that the SI_PARENTID will always be 29.
Set disks = iStore.Query("Select SI_DEST_SCHEDULEOPTIONS, SI_PROGID From CI_SYSTEMOBJECTS Where SI_PARENTID=29 and SI_NAME='CrystalEnterprise.DiskUnmanaged'")
' Gets the actual DiskUnanaged object and its ScheduleOptions.
If (disks.Count = 0) Then
redirectWithError "../Error.asp", "The disk could not be found."
End If
Dim disk
Set disk = disks.Item(1)
Dim diskSchedulingOptions
Set diskSchedulingOptions = disk.PluginInterface("").ScheduleOptions
diskSchedulingOptions.DestinationFiles.Add("\\COMPUTERNAME\test.pdf")
diskSchedulingOptions.Password = 'password'
diskSchedulingOptions.UserName = 'User'
' Copies the disk options into the report's scheduling options. This will cause the
' report's instance to be copied to the directory.
scheduleInfo.Destination.SetFromPlugin(disk)
The part to set the options is where I think I'm going wrong and I'm sure I'm not setting the password and username correctly. CAn anyone help please...?