I have a custom VB.NET application that needs to publish PDF files to a Crystal Enterprise 10 server. The code that I have works fine for publishing Crystal Report files, but errors out when doing a PDF.
Here is the code:
'InfoStore object is created elsewhere in the code.
Dim pluginManager = InfoStore.PluginManager
ObjectPlugin = pluginManager.PluginInfo("CrystalEnterprise.Pdf")
Dim NewCollection = InfoStore.NewInfoObjectCollection
Dim NewObject = NewCollection.Add(ObjectPlugin)
NewObject.Files.Add(FileName)
NewObject.ParentID = ParentID
NewObject.Title = Name
InfoStore.Commit(NewCollection)
'end of code snipet
And here is the error I get:
Object reference not set to an instance of an object.
Thanks for the help!
Here is the code:
'InfoStore object is created elsewhere in the code.
Dim pluginManager = InfoStore.PluginManager
ObjectPlugin = pluginManager.PluginInfo("CrystalEnterprise.Pdf")
Dim NewCollection = InfoStore.NewInfoObjectCollection
Dim NewObject = NewCollection.Add(ObjectPlugin)
NewObject.Files.Add(FileName)
NewObject.ParentID = ParentID
NewObject.Title = Name
InfoStore.Commit(NewCollection)
'end of code snipet
And here is the error I get:
Object reference not set to an instance of an object.
Thanks for the help!