Business Objects 7008038 Manuale Utente

Pagina di 18
Crystal Reports Server XI
 
Upgrading Crystal Enterprise 10 Embedded Edition Applications
 
Else 
‘handle error 
End If 
 
‘Get the connection information from the report document 
for the first table in the collection 
Set oDBInfo =   
    RptClientDoc.DatabaseController.GetConnectionInfos(). 
    Item(0) 
 
‘Get the connection info attributes 
Set pbLevel1 = oDBInfo.Attributes 
 
‘This 'first level' property bag will be used to define the 
‘basic database info for the report 
pbLevel1.Item("QE_ServerDescription") = Database 
 
With pbLevel1 
.Item("Database Name") = Database 
.Item("Server Name") = DSNName 
.Item("Server Type") = "ODBC - " & DSNName 
End With 
 
‘This 'second level' property bag contains info that is 
‘specific to the type of db connection 
‘in this case, it will contain our OLE DB specific 
‘information 
Set pbLevel2 = pbLevel1.item("QE_LogonProperties") 
pbLevel2.Item("DSN") = DSNName 
 
‘Attaching the QE specific properties to the 'level 1' 
‘property bag 
pbLevel1.Item("QE_LogonProperties") = pbLevel2 
 
‘Add the new property bag info to the connection object 
‘(and set the username/password) 
oDBInfo.Attributes = pbLevel1 
oDBInfo.UserName = username 
oDBInfo.Password = password 
 
‘==================================================== 
‘CHANGING THE MAIN REPORT DATABASE INFO  
3/30/2007 10:15 AM 
Copyright © 2007 Business Objects. All rights reserved.
 Page 
11 
 
crserver_xi_upgrading_from_ce10_embedded.pdf