首页 > 代码库 > XtraReport3

XtraReport3

DataTable dt = new DataTable();

            dt.Columns.Add("f0", System.Type.GetType("System.String"));           

         //   Add rows for DataTable           //Initialize the row

            for (int i = 0; i < 14; i++)            

{                 DataRow dr = dt.NewRow();                

dr[0] = "A"+ i.ToString();

dr[8] = "程序员该如何过好他的整个职业生涯?"; //+ "· 若机器人可以做大部分工作,人类如何保住自己的“饭碗";

                dt.Rows.Add(dr);             };

            this.DataSource = dt;             

xrLabel14.Text = "ORD170118002";            

xrTableCell4.DataBindings.Add("Text", null, dt.Columns[0].Caption);// xrLabel22.Text = "hello:" + xrLabel22.Text;

            xrPictureBox1.Image = Image.FromFile(@"E:/ping/hello/bin/Debug/top.jpg");        

string path = System.AppDomain.CurrentDomain.BaseDirectory; 

  xrPictureBox1.Image = Image.FromFile(path + @"src\top.png");

 

using DevExpress.XtraReports.UI;//调用XTRAREPORT时引用

            XtraReport3 xr = new XtraReport3();               

  xr.ShowPreviewDialog();

调 用XREPORT 指定引用路径就不需要一个个添加

            C:\Program Files (x86)\DevExpress 16.2\Components\Bin\Framework\

XtraReport3