cancel
Showing results for 
Search instead for 
Did you mean: 

Specify Destination for Scheduled Report in WSSDK?

Former Member
0 Kudos

I'm trying to schedule a Crystal Report using the WSSDK. I've got everything ironed out except specifying the filename and folder. The example code for this is:


            Dim oDestination(1) As Destination
            oDestination(0) = New Destination
            oDestination(0).Name = "CrystalEnterprise.DiskUnmanaged"
            Dim diskOptions As New DiskUnmanagedScheduleOptions
            Dim destinationFile(1) As String
            destinationFile(0) = "C:\" + oReport.Name + ".pdf"
            diskOptions.DestinationFiles = destinationFile
            oSchedulingInfo.Destinations = oDestination

This seems simple enough. Only problem is that it doesn't work. If I had to guess I need to figure out some way to send diskOptions to ODestination(0). I checked the C# version and it seems to be the same story.

Can anyone help?

Thanks in advance,

J

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Found it.

Former Member
0 Kudos

Well thankfully this wasn't too much of a brain buster(I just had to add one line). Here is the working code.


            Dim oDestination(1) As Destination
            oDestination(0) = New Destination
            oDestination(0).Name = "CrystalEnterprise.DiskUnmanaged"
            Dim diskOptions As New DiskUnmanagedScheduleOptions
            Dim destinationFile(1) As String
            destinationFile(0) = "C:\" + oReport.Name + ".pdf"
            diskOptions.DestinationFiles = destinationFile
            'my code
            oDestination(0).DestinationScheduleOptions = diskOptions
            'end my code
            oSchedulingInfo.Destinations = oDestination

Posted for posterity.

J

=:)