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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Enterpris 10 SDK Unmanaged Disk

Status
Not open for further replies.

rajeshgooner

IS-IT--Management
Feb 3, 2004
31
GB
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...?
 
Still no joy with this, if anyone has any ideas then please let me know

 
Since the username/password are to write the file, can you run the page server service under an account with the permissions to write to that location? (might be the job server, can't remember which does export)

I think that would accomplish the same thing...?



Chris
Data Intelligence Group
 
Chris,

Thanks for the reply. I seem to have sorted the problems out:

1. Failure to write all files to disk was occuring because there were multiple job servers running of which not all had the correct account details. I switched them off and kept just one running with success.

2. The other issue was adding to the destination files objects. This kept on writing to the same filepath and name. This is because the schedule job was always reading the first item in the destinationfiles.object. This seems to have been resolved by deleting the current item in the destinationfiles object and adding a new one. In addition, the scheduleinfo object was cleared and closed in each loop:

schedulingInfo.Close
set schedulingInfo = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top