ServerReport.GetDataSources-Methode ()
Retrieves information about the data sources used for a report.
Namespace: Microsoft.Reporting.WebForms
Assembly: Microsoft.ReportViewer.WebForms (in microsoft.reportviewer.webforms.dll)
Syntax
'Declaration
'Usage
Rückgabewert
A ReportDataSourceInfoCollection containing ReportDataSourceInfo objects.
Hinweise
This method returns the data source names and user prompt strings of any data sources used in the report that can prompt for credentials.
Beispiel
private void button1_Click(object sender, EventArgs e)
{
ReportDataSourceInfoCollection rdsic=
this.reportViewer1.ServerReport.GetDataSources();
foreach (ReportDataSourceInfo rdsi in rdsic)
{
Debug.WriteLine(rdsi.Name + ":" + rdsi.);
}
}
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Dim rdsic As ReportDataSourceInfoCollection = _
ReportViewer1.ServerReport.GetDataSources
For Each rdsi As ReportDataSourceInfo In rdsic
Debug.WriteLine(rdsi.Name + ":" + rdsi.Prompt)
Next
End Sub
Siehe auch
Verweis
ServerReport-Klasse
ServerReport-Member
Microsoft.Reporting.WebForms-Namespace