Home > Net >  Devexpress XtraReport custom printing problems, a great god
Devexpress XtraReport custom printing problems, a great god

Time:04-20



Situation:
1, this report use Devexpress xtrareport do,
Global. GRows=6;
//judgment according to the set of rows per page paging
Private void Detail_BeforePrint (object sender, System. Drawing. Printing. PrintEventArgs e)
{
//control report article number each page
if (i !=0 & amp; & I==int. Parse (Global) GRows))//each page shows article 7
{
The Detail. PageBreak=DevExpress. XtraReports. UI. PageBreak. BeforeBand;
i=0;
}
The else
{
The Detail. PageBreak=DevExpress. XtraReports. UI. PageBreak. None;

}
i++;
}
//set less than the number of rows per page, insert a blank line
Private void Detail_AfterPrint (object sender, EventArgs e)
{
Int _rowcount=0;
Int _insertRow=0;//to insert rows
_rowcount=this. DsDrugInStorNew1. Tables [0]. Rows. Count;
If (Global) IsBlankRow=="0") return;
If (_rowcount & gt; 0)
{
_insertRow=Global. CalcMultiple (_rowcount) - _rowcount;
for (int i=0; I & lt; _insertRow; I++)
{
This. DsDrugInStorNew1. Tables [0]. Rows. The Add ();
}
}
}
2, according to the above, the query result set if the first line displays for six lines, total value is right, starting from the second page, line number, the aggregate amount are two pages in total (line 12, line 12 aggregate amount),
Question:
According to set the number of rows per page total row, amount

Pray god give directions

CodePudding user response:


Statement true colors, GroupFooter1 PageBreak AfterBand set
  •  Tags:  
  • C#
  • Related