📄 miquickrep1.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "MIQuickRep1.h"
#include "DataModule.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TMIQuickRep1Form *MIQuickRep1Form;
//---------------------------------------------------------------------------
__fastcall TMIQuickRep1Form::TMIQuickRep1Form(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TMIQuickRep1Form::ColumnHeaderBand1BeforePrint(
TQRCustomBand *Sender, bool &PrintBand)
{
AnsiString str;
Route1QRLabel->Caption="";
Route2QRLabel->Caption="";
MastData->MIRoute->First();
while(!MastData->MIRoute->Eof)
{
str=MastData->MIRouteRouteName->Value;
if(Route1QRLabel->Caption.Trim()!="")
{
Route1QRLabel->Caption=Route1QRLabel->Caption+"->"+str;
}
else
{
Route1QRLabel->Caption=str;
}
MastData->MIRoute->Next();
if(MastData->MIRouteRouteNo->Value>11)
{
break;
}
}
while(!MastData->MIRoute->Eof)
{
str=MastData->MIRouteRouteName->Value;
Route2QRLabel->Caption=Route2QRLabel->Caption+"->"+str;
MastData->MIRoute->Next();
}
}
//---------------------------------------------------------------------------
void __fastcall TMIQuickRep1Form::TitleBand1BeforePrint(
TQRCustomBand *Sender, bool &PrintBand)
{
PrepregQRLabel->Caption="";
AnsiString str,strempty;
strempty="";
int strn;
if(MastData->MIBasePrepregANum->Value!=0)
{
PrepregQRLabel->Caption="PƬ: ";
str=MastData->MIBasePrepregA->Value;
strn=MastData->MIBasePrepregANum->Value;
PrepregQRLabel->Caption=PrepregQRLabel->Caption+str+"*"+IntToStr(strn);
strempty=" ";
}
if(MastData->MIBasePrepregBNum->Value!=0)
{
str=MastData->MIBasePrepregB->Value;
strn=MastData->MIBasePrepregBNum->Value;
if(PrepregQRLabel->Caption.Trim()!="")
{
PrepregQRLabel->Caption=PrepregQRLabel->Caption+strempty+str+"*"+IntToStr(strn);
}
else
{
PrepregQRLabel->Caption="PƬ: ";
PrepregQRLabel->Caption=PrepregQRLabel->Caption+strempty+str+"*"+IntToStr(strn);
}
strempty=" ";
}
if(MastData->MIBasePrepregCNum->Value!=0)
{
str=MastData->MIBasePrepregC->Value;
strn=MastData->MIBasePrepregCNum->Value;
if(PrepregQRLabel->Caption.Trim()!="")
{
PrepregQRLabel->Caption=PrepregQRLabel->Caption+strempty+str+"*"+IntToStr(strn);
}
else
{
PrepregQRLabel->Caption="PƬ: ";
PrepregQRLabel->Caption=PrepregQRLabel->Caption+strempty+str+"*"+IntToStr(strn);
}
}
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -