C# winfrom FastReport 变量设计加载


1、源码

 DataTable dt5 = new DataTable();
                dt5 = SqlHelper.SqlGetDataTable(StrSql, "tbEmpCont");
                dst.Tables.Add(dt5.Copy());
                //string reportpath = AppDomain.CurrentDomain.BaseDirectory+"\OtDevPgCard.frx";
                //FsReport.Load(@"..\OtDevPgCard.frx");
                FsReport.Load(@"FastReport\OtEmpRecord.frx");
                FsReport.RegisterData(dst.Tables[0], "tbEmpRecord");
                FsReport.RegisterData(dst.Tables[1], "tbEmpEduca");
                FsReport.RegisterData(dst.Tables[2], "tbEmpSociety");
                FsReport.RegisterData(dst.Tables[3], "tbEmpTech");
                FsReport.RegisterData(dst.Tables[4], "tbEmpCont");

                textBarcode = dt.Rows[0]["IDCard"].ToString() + "  " + dt.Rows[0]["Name"].ToString();
                TextObject pTextPrint = FsReport.FindObject("TextPrintTime") as TextObject;
                (FsReport.FindObject("Barcode1") as BarcodeObject).Text = textBarcode;
                pTextPrint.Text = SystemTime;
                FsReport.Show();
                FsReport.Dispose();

2、报表设计

 

注:报表树名字要有。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM