on 09-24-2008 8:17 AM
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
Found it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
=:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.