使用fastreport怎么样在某一条数据之后强制换行?
1、我使用的是fastreport打印报表,可是需要判断第一个字段的数据,如果与上一行的内容不同则需要强制换行。
使用quickReport的方法如下:
void __fastcall TFrmPreview::DetailBand2BeforePrint(TQRCustomBand *Sender,
bool &PrintBand)
{
AnsiString temp = FrmPrint->tempQuery->FieldByName("ProjectNo")->AsString.Trim();
if(temp != "")
{
curPrj = temp;
if(curPrj != LastProject)
{
LastProject = curPrj;
if(m_first != 0)
{
QuckSeason->NewPage();
newPage = true;
}
}
}
m_first++;
QRShape48->Height = Sender->Height ;
QRShape47->Height = Sender->Height ;
QRShape46->Height = Sender->Height ;
QRShape45->Height = Sender->Height ;
QRShape44->Height = Sender->Height ;
QRShape43->Height = Sender->Height ;
QRShape42->Height = Sender->Height ;
QRShape28->Height = Sender->Height ;
}
怎么用fastreport来实现?
2、怎么在一个新页的第一个数据行中显示处理过的信息?