0
私は取得していますエラーがマイクロソフトレポートビューアドリルスルー使用した複数のデータソース
I持っている2つのデータソース、AssetSummaryDataSetとAssetLatencyCompleteDataSet
「データ・ソース・インスタンスは、データ・ソース 『AssetLatencyCompleteDataSet_fsAssetLatencyComplete』のために供給されていない」であります1つのデータインスタンスしか選択できません。私は見回して、1つのレポートに追加のデータソースを追加する必要があり、ここに表示されているレポートビューアのコントロール内にデータが入るはずです。
私はDrillThroughハンドラを作成しましたが、私はまだ上記のエラーが発生します。
レポートビューアに欠落しているデータソースインスタンスを追加するにはどうすればよいですか?
{
public partial class frmAssetSummaryRpt : Form
{
public frmAssetSummaryRpt()
{
InitializeComponent();
}
private void frmAssetSummaryRpt_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'assetSummaryDataSet.fsAssetRecoverySummaryByClientWO' table. You can move, or remove it, as needed.
this.fsAssetRecoverySummaryByClientWOTableAdapter.Fill(this.assetSummaryDataSet.fsAssetRecoverySummaryByClientWO);
reportViewer1.Drillthrough += new DrillthroughEventHandler(reportDrillthroughEventHandler);
this.reportViewer1.RefreshReport();
}
void reportDrillthroughEventHandler(object sender, DrillthroughEventArgs e)
{
LocalReport localReport = (LocalReport)e.Report;
localReport.DataSources.Add(new ReportDataSource("fsAssetLatencyComplete", (object)assetLatencyCompleteDataSet.fsAssetLatencyComplete));
}
private void button1_Click(object sender, EventArgs e)
{
frmAssetLatencyFullRpt AssetLatencyFullReport = new frmAssetLatencyFullRpt();
AssetLatencyFullReport.Show();
}
}
}