2015-04-14 103 views
-1

如何複製內容在一個DataGridview另一個DataGridview
我想在DataGridview選擇多行並複製到另一個DataGridview然後通過水晶報表打印。複製多行選擇的datagridview到另一個datagridview的C#

+0

TNX答覆卻 沒什麼.... 我已篩選在datagridview的數據我想選擇行並複製另一個datagridview的然後通過水晶報表打印 有沒有其他辦法做到這一點 –

+0

試試這個 http://stackoverflow.com/questions/6891267/copying-rows-from-one-datagridview-to-another 我希望這幫助您poject。 :-) –

+0

tnx兄弟我做了 那麼現在如何用水晶報表打印它......? –

回答

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(); 
相關問題