One of the simplest ways to programmatically interact with a report's data source is to logon to a report database. The ReportClientDocument object model allows you to submit the logon credentials for any databases that a report connects to instead of forcing the user to do so when they attempt to view the report. The logon method applies the logon credentials to all report database connections, while the LogonEx method will only apply those credentials to a specific database's connections.
|
Visual Basic |
|
|
DatabaseController myDatabaseController = rcd.DatabaseController |
|
|
C# |
|
|
DatabaseController databaseController = rcd.DatabaseController; |
|
|
|
|
If all the report databases require the same logon credentials, use the logon method and pass in only the user name and password. |
|
Visual Basic |
|
|
Dim server As String = "<hostname>:<port>" |
|
|
C# |
|
|
string server = "<hostname>:<port>"; |
|
The following code sets the logon credentials for all connections in a report database.
|
Visual Basic |
|
|
Private Sub DatabaseLogon(ByVal rcd As ISCDReportClientDocument) |
|
|
C# |
|
|
private void DatabaseLogon(ISCDReportClientDocument rcd) |
|
This list includes the namespaces used by the sample code:
© 2021 SAP AG. All rights reserved.
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Created with the Personal Edition of HelpNDoc: Easy EPub and documentation editor