将多行选中的datagridview复制到另一个datagridview C#

时间:2015-04-14 08:44:55

标签: c# datagridview crystal-reports

如何将内容复制到一个DataGridview到另一个DataGridview
我想在DataGridview中选择多行并复制到另一个DataGridview,然后通过Crystal Report打印。

1 个答案:

答案 0 :(得分:0)

你可以尝试类似的东西

 //First create a crystal report then
 // you would create it's object
 crpLetter crp = new crpLetter();
 //set your dataset to report
 crp.SetDataSource(dsSrNoDigiTech);
 //create another from and drop Crystal Report Viewer on it.
 FrmReportViewer frm = new FrmReportViewer();
 //assign the Crystal Report to it's viewer
 frm.crystalReportViewer1.ReportSource = crp;
 //this will print the report 
 frm.crystalReportViewer1.PrintReport();