我想在雙面打印中打印gridview,我嘗試了下面顯示的代碼。但是這行顯示錯誤XtraReport1 r = new XtraReport1();
。如何在打印gridView時使其工作? 我得到如何在C#中打印gridview雙面打印 - devexpress
CS0246:類型或命名空間名稱'XtraReport1' 找不到。 您是否缺少using指令或程序集引用?
private void btnPrintPreview_Click(object sender, EventArgs e)
{
XtraReport1 r = new XtraReport1();
r.PrintingSystem.StartPrint += new DevExpress.XtraPrinting.PrintDocumentEventHandler(PrintingSystem_StartPrint);
r.ShowPreview();
}
private void PrintingSystem_StartPrint(object sender, DevExpress.XtraPrinting.PrintDocumentEventArgs e) {
e.PrintDocument.PrinterSettings.Duplex = System.Drawing.Printing.Duplex.Horizontal;
}
怎麼回合您發佈的實際錯誤或更好,但谷歌的錯誤。 – user6144226
也許'XtraReport r = new XtraReport();'? – LarsTech
@LarsTech是的,我得到了'CS0246:無法找到類型或命名空間名稱'XtraReport1'。錯誤 – user8066749