ServerReport.GetDataSources メソッド (Boolean)
公開日: 2016年4月
レポート データ ソースに必要なすべての資格情報が指定されているかどうかなど、レポートに使用するデータ ソースに関する情報を取得します。
名前空間: Microsoft.Reporting.WinForms
アセンブリ: Microsoft.ReportViewer.WinForms (Microsoft.ReportViewer.WinForms.dll 内)
構文
public ReportDataSourceInfoCollection GetDataSources(
out bool allCredentialsSet
)
public:
ReportDataSourceInfoCollection^ GetDataSources(
[OutAttribute] bool% allCredentialsSet
)
member GetDataSources :
allCredentialsSet:bool byref -> ReportDataSourceInfoCollection
Public Function GetDataSources (
<OutAttribute> ByRef allCredentialsSet As Boolean
) As ReportDataSourceInfoCollection
パラメーター
allCredentialsSet
Type: System.Boolean[out] サーバー レポートで使用するデータ ソースに必要なすべての資格情報が指定されているかどうかを示します。
戻り値
Type: Microsoft.Reporting.WinForms.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);
}
}
関連項目
GetDataSources オーバーロード
ServerReport クラス
Microsoft.Reporting.WinForms 名前空間
トップに戻る