Database Class
Provides properties to get information about the database accessed by a report.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Class Database
Inherits EngineObjectBase
Implements IDisposable
public class Database : EngineObjectBase, IDisposable
Remarks
Use this class to get the collection of Tables and the collection of TableLinks from a report. Retrieve a Database object through the Database property of the ReportDocument object.
Example
This example searches for the table link by index.
'Declaration
Private Function GetTableLinkByIndex(ByVal myReportDocument As ReportDocument, ByVal index As Integer) As TableLink
If index >= 0 And index < myReportDocument.Database.Links.Count Then
GetTableLinkByIndex = myReportDocument.Database.Links.Item(index)
Exit Function
End If
End Function
private TableLink GetTableLinkByIndex(ReportDocument reportDocument, int index)
{
if (index >= 0 && index < reportDocument.Database.Links.Count)
{
return reportDocument.Database.Links[index];
}
return null;
}
Inheritance Hierarchy
Object
EngineObjectBase
Database
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
Database Members
CrystalDecisions.CrystalReports.Engine Namespace