需要引用
Using Devexpress.Xtrareport.UI;
Using Devexpress.XtraPrinting.Localiztion
实例化报表,xtrareport my=new Xtrareport(ds);
my.showPreviewDialog(); //打印预览方法
my.PrintingSystem.ShowMarginsWarning = false; //打印margins警告