C++ Builder中 Memo 强制换行问题的
在C和C++中,会写printf("good!\n");其中\n实现换行求在C++Builder中的强制换行符?...
在C和C++中,会写printf("good!\n");其中 \n 实现换行
求在C++ Builder中的强制换行符? 展开
求在C++ Builder中的强制换行符? 展开
2个回答
展开全部
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 ;
}
使用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 ;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询