当前位置: 代码迷 >> ASP.NET >> DevExpress XrtaReport 报表的有关问题
  详细解决方案

DevExpress XrtaReport 报表的有关问题

热度:4132   发布时间:2013-02-25 00:00:00.0
DevExpress XrtaReport 报表的问题?
WEB报表,DevExpress XrtaReport

1:某列多行合并显示怎么搞啊?比如第一列的多行都是同一个部门,那么就合并一下啊

2:个人资料显示的时候,哪怕一页下面有多余的空白,也不能显示其他人的资料,其他人的资料一定要在第二页显示,现在的问题是个人资料连续显示了,也就是一页里可能显示两个人的资料

------解决方案--------------------------------------------------------
public DevExpress.XtraReports.UI.XtraReport

 CreateMasterReport(List<XtraReport> subReports)

 {
XtraReport mainReport = new XtraReport();

List<Subreport> subList = new List<Subreport>();

foreach (XtraReport report in subReports)

{

report.bindingSource1.DataSource = _datas;

report.MasterReport = mainReport;

report.CreateDocument();



Subreport sub = new Subreport();

sub.ReportSource = report;

subList.Add(sub);

}



DevExpress.XtraReports.UI.ReportHeaderBand band = new 
DevExpress.XtraReports.UI.ReportHeaderBand();



//ensure the main report has the same dimension as subreports

mainReport.PaperKind = System.Drawing.Printing.PaperKind.A4;

mainReport.Margins.Left = 64;

mainReport.Margins.Right = 42;

mainReport.Margins.Top = 100;

mainReport.Margins.Bottom = 100;

mainReport.Bands.Add(band);

foreach(Subreport sr in subList)

band.Controls.Add(sr);

mainReport.CreateDocument();

return mainReport;

 }

------解决方案--------------------------------------------------------
public DevExpress.XtraReports.UI.XtraReport

> CreateMasterReport(List subReports)

> {

> XtraReport mainReport = new XtraReport();

> List subList = new List();

> foreach (XtraReport report in subReports)

> {

> report.bindingSource1.DataSource = _datas;

> report.MasterReport = mainReport;

> report.CreateDocument();

> Subreport sub = new Subreport();

> sub.ReportSource = report;

> subList.Add(sub);

> }

> DevExpress.XtraReports.UI.ReportHeaderBand band = new
> DevExpress.XtraReports.UI.ReportHeaderBand();

> //ensure the main report has the same dimension as
> subreports

> mainReport.PaperKind =
> System.Drawing.Printing.PaperKind.A4;

> mainReport.Margins.Left = 64;

> mainReport.Margins.Right = 42;

> mainReport.Margins.Top = 100;

> mainReport.Margins.Bottom = 100;

> mainReport.Bands.Add(band);

> foreach(Subreport sr in subList)

> band.Controls.Add(sr);

> mainReport.CreateDocument();

> return mainReport;

> }
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Wed May 23 01:40:41 CST 2018
  • 最近登录:Wed May 23 01:40:41 CST 2018
  • 最近登录:Wed May 23 01:40:41 CST 2018
  • 最近登录:Wed May 23 01:40:41 CST 2018
  • 最近登录:Wed May 23 01:40:41 CST 2018