ServerReport.GetDataSources 메서드 (Boolean%)

보고서 데이터 소스에 필요한 모든 자격 증명이 제공되었는지 여부를 포함하여 보고서에 사용된 보고서 원본에 대한 정보를 검색합니다.

네임스페이스:  Microsoft.Reporting.WebForms
어셈블리:  Microsoft.ReportViewer.WebForms(Microsoft.ReportViewer.WebForms.dll)

구문

‘선언
Public Function GetDataSources ( _
    <OutAttribute> ByRef allCredentialsSet As Boolean _
) As ReportDataSourceInfoCollection
‘사용 방법
Dim instance As ServerReport
Dim allCredentialsSet As Boolean
Dim returnValue As ReportDataSourceInfoCollection

returnValue = instance.GetDataSources(allCredentialsSet)
public ReportDataSourceInfoCollection GetDataSources(
    out bool allCredentialsSet
)
public:
ReportDataSourceInfoCollection^ GetDataSources(
    [OutAttribute] bool% allCredentialsSet
)
member GetDataSources : 
        allCredentialsSet:bool byref -> ReportDataSourceInfoCollection 
public function GetDataSources(
    allCredentialsSet : boolean
) : ReportDataSourceInfoCollection

매개 변수

  • allCredentialsSet
    유형: System.Boolean%
    [out] 서버 보고서에 사용된 데이터 소스에 필요한 모든 자격 증명이 제공되었는지 여부를 나타냅니다.

반환 값

유형: Microsoft.Reporting.WebForms.ReportDataSourceInfoCollection
ReportDataSourceInfo 개체를 포함하는 ReportDataSourceInfoCollection

주의

이 메서드는 자격 증명을 요청하도록 구성된 보고서에 사용된 데이터 소스의 데이터 소스 이름과 사용자 프롬프트 문자열을 반환합니다.

다음 예제에서는 ReportViewer 컨트롤에서 현재 활성 상태인 서버 보고서에 대한 자격 증명을 요청하는 모든 데이터 소스를 나열합니다.

private void button1_Click(object sender, EventArgs e)
{
   bool bCreds;

   ReportDataSourceInfoCollection rdsic=
      this.reportViewer1.ServerReport.GetDataSources(out bCreds);

   Debug.WriteLine("All credentials supplied: {0}", 
      bCreds.ToString());

   foreach (ReportDataSourceInfo rdsi in rdsic)
   {
      Debug.WriteLine(rdsi.Name + ":" + rdsi.Prompt);
   }
}

참고 항목

참조

ServerReport 클래스

GetDataSources 오버로드

Microsoft.Reporting.WebForms 네임스페이스