|
볼로 님이 쓰신 글 :
: 퀵리포트에 컬럼의 개수를 동적으로 줄이거나 늘리고
:
: 또 그 컬럼의 너비나 폰트등을 자유롭게 다룰 수 있는 방법 알려주세요.
:
: 오늘이 벌써 몇일째인지 모르겠습니다.
:
: 퀵리포트 넘 어려워요!!!!
int i, m, fld_soo, fld_num, fld_gb;
String k_fld_nam, s_fld_nam;
fld_soo = togong->Prn_modl[print_pg_num].toTal_field;
TQRDBText *dbText[20];
TQRExpr *dbExp[20];
TQRExpr *dbSum[20];
QRBand2->Height = 48;
m = 0;
for(i = 0; i < fld_soo ; i++) {
fld_num = togong->Prn_modl[print_pg_num].fld_num[i];
fld_gb = togong->Prn_modl[print_pg_num].fld_unit[i];
dbText[m] = new TQRDBText(QuickRep1);
dbText[m]->Name = "dbText" + IntToStr(m);
dbText[m]->Alignment = taRightJustify;
dbText[m]->AutoSize = true; //false;
dbText[m]->DataSet = DataMod->tab_tog_tmp;
dbText[m]->DataField = k_fld_nam;
dbText[m]->Height = 14;
dbText[m]->Left = togong->Prn_modl[print_pg_num].fld_pos[m] - Text_Width - Text_Width / 8.0;
dbText[m]->Top = 3;
dbText[m]->Width = 40.0; //Text_Width;
dbText[m]->Enabled = true;
dbText[m]->ParentReport = QuickRep1;
dbText[m]->Visible = true;
DetailBand1->InsertControl(dbText[m]);
dbExp[m] = new TQRExpr(QuickRep1);
dbExp[m]->Name = "dbExp" + IntToStr(m);
dbExp[m]->Alignment = taRightJustify;
dbExp[m]->AutoSize = false;
dbExp[m]->AutoStretch = true;
dbExp[m]->Expression = "SUM(tab_tog_tmp." + k_fld_nam + ")";
dbExp[m]->Mask = "#,##0.00";
dbExp[m]->Height = 14;
dbExp[m]->Left = togong->Prn_modl[print_pg_num].fld_pos[m] - Text_Width - Text_Width / 8.0;
dbExp[m]->Top = 30;
dbExp[m]->Width = 50.0; //Text_Width;
dbExp[m]->Enabled = true;
dbExp[m]->ParentReport = QuickRep1;
dbExp[m]->Visible = true;
QRBand2->InsertControl(dbExp[m]);
|