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

How do I change the SI_SERVER of an existing scheduled report? 1

Status
Not open for further replies.

phellis

Programmer
May 17, 2000
28
0
0
GB
Out IT department are in the process of changing our email server. I reconfigured the crystal enterprise server so that any new reports will be scheduled to the new server.

However I now have an issue where I need to change all existing scheduled reports so that they will also be sent to the new server. I can't delete and recreate the schedules as there are 300 or so!!

I want to be able to change the SI_SERVER property under the SI_DEST_SCHEDULEOPTIONS however I'm a little stuck as I can't even read this property let alone finding a way of saving it back.

Has anyone done something similar??
 
I forgot to mention that I'm using Crystal Enterprise 10
 
I think I would leave the schedules as they are and put a redirect in the hosts file on your enterprise server - any traffic to the old email server will then be redirected to the new server...

What we do on our system is to give our email server an alias name e.g. EmailServer - this way if the physical server changes it doesn't matter.
 
It must be possible because APOS Schedule Manager facilitates this, but I do not know how... Obviously by code utilising the BOE SDK.
 
Worked it out. It turns out to be fairly simple to do I just hadn't realised how deep the properties went on the the infoobjects.

Private Sub Logon(ByVal strCMS As String, ByVal strUsername As String, ByVal strPassword As String)
Dim mySessionMgr As New SessionMgr
Dim myEnterpriseSession As EnterpriseSession

Try
myEnterpriseSession = mySessionMgr.Logon(strUsername, _
strPassword, _
strCMS, _
"secWindowsNT")
Catch ex As Exception
Throw New Exception("Sorry - you could not be logged on. " & ex.Message)
End Try

myEnterpriseService = myEnterpriseSession.GetService("InfoStore")
myInfoStore = New InfoStore(myEnterpriseService)

End Sub

Private Sub UpdateScheduleDetails()



Dim strQuery As String = "SELECT TOP 10000 * FROM CI_INFOOBJECTS WHERE NOT(SI_PROGID = 'CrystalEnterprise.Folder' OR SI_PROGID = 'CrystalEnterprise.FavoritesFolder') AND SI_INSTANCE = 1 AND SI_SCHEDULE_STATUS=9"
Dim myInfoObjects As InfoObjects = myInfoStore.Query(strQuery)

Dim myInfoObject As InfoObject
'Loop through all scheduled reports and correct the SI_Server
'for those reports that aren't pointing at the correct email server
For Each myInfoObject In myInfoObjects
Dim mySchedInfo As SchedulingInfo = myInfoObject.SchedulingInfo

If mySchedInfo.Properties("SI_DESTINATION").Properties("SI_DEST_SCHEDULEOPTIONS").Properties("SI_SERVER").ToString <> "New server Name" Then
mySchedInfo.Properties("SI_DESTINATION").Properties("SI_DEST_SCHEDULEOPTIONS").Properties("SI_SERVER").Value = "New server Name"
End If

Next

'Commit the changes back
myInfoStore.Commit(myInfoObjects)


End Sub
 
can anyone tell me where and how to write the query that phellis wrote and where can i find info regarding that.

Thanks in advance
 
Yes, you'll find it in the BOE_SDK.chm file which is in the com_docs.zip file on the release media in the docs folder.
 
Hi,

I had a similar issue (wanted to globally change any id or password for a give SI_SERVER), and found out that the recurring scheduled instances did not get updated, even when using this type of format via VB.NET. I kept on getting a DBLOGIN Failure after commiting the settings in Crystal Enterprise.

I also think you may wish to consider changing the SI_CUSTOMSERVERNAME, since not all crystal enterprise reports use the default SI_SERVER within Crystal Enterprise.

Please let me know how it goes -

thanks




 
Changing the SI_SERVER (as I type) appears to be working for the 700 or so reports that were changed.

I won't know if its fully worked until the original email server is switched off!!

Fingers crossed! :eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top