分类目录

链接

2012 年 11 月
 1234
567891011
12131415161718
19202122232425
2627282930  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > .NET > 正文
FastReport同时加载两种不同的报表
.NET 暂无评论 阅读(2,066)
  1. //func:FastReport同时加载两种不同的报表   
  2.  //date:2012-11-24       
  3.  //author:http://blog.peos.cn
  4. FastReport.Report report1 = null;
  5.  
  6. string officePath = Application.StartupPath + "//ReportTemplates//office.frx";
  7. string businessPath = Application.StartupPath + "//ReportTemplates//business.frx";
  8.  
  9. report1 = new FastReport.Report(); 
  10.  
  11. List<Model.OrganReport> organReportList=new BLL.OrganReportBLL().GetList(OrganID);
  12. foreach(Model.OrganReport item in organReportList)
  13. {
  14.    if(item.IsOffice==1)
  15.    {
  16.       this.report1.Load(officePath);
  17.    }else{
  18.       this.report1.Load(businessPath);
  19.    } 
  20.    this.report1.RegisterData(reportList, "OrganReport"); 
  21.    this.report1.Prepare(true);
  22. }
  23.  
  24. this.report1.ShowPrepared(); 
  25.  
  26.  
  27.  
  28.  

 

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:FastReport同时加载两种不同的报表 | Bruce's Blog

发表评论

留言无头像?