안녕하세요...
이번에 저희 시스템을 dll로 전환중입니다..
메인폼과 퀵리포트 폼이 use되어있구요..
현재 잘 돌아가고 있습니다..
dll로 전환할때도 특별히 고친부분은 없구요...
그런데 출력만 하면
Econvert error with message ''' is not a integer value
라고 나옵니다..
소스중에 inttostr 부분이 하나 있습니다만
에러처리를 해주었구요.. 문제가 거기가 아닌거 같네요...
리포트 폼의 소스입니다..
이거 오늘까지 해결못하면 집에 못갑니다... --;;
고수님들의 도움을 부탁드리겠습니다....
interface
uses
Windows, SysUtils, Classes, Graphics, Controls, Forms,
StdCtrls, Mask, Buttons, ExtCtrls, TXClient, Db, DBTables, Qrctrls,
quickrpt;
type
TACS301RF = class(TForm)procedure SetForm(vp_SlipFlag,vp_Flag,vp_DeptCode,vp_DeptNm,vp_Ymd,
vp_SlipNo1, vp_SlipNo2, vp_acct_unit : string);
procedure FormCreate(Sender: TObject);
procedure QRLabel6Print(sender: TObject; var Value: String);
procedure qrl_DeptCodePrint(sender: TObject; var Value: String);
procedure qrl_DeptNmPrint(sender: TObject; var Value: String);
procedure QRLabel7Print(sender: TObject; var Value: String);
procedure QR_PrintNeedData(Sender: TObject; var MoreData: Boolean);
procedure lb5Print(sender: TObject; var Value: String);
procedure lb7Print(sender: TObject; var Value: String);
procedure lb8Print(sender: TObject; var Value: String);
procedure QRBand_SummaryBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
procedure lb13Print(sender: TObject; var Value: String);
procedure lb14Print(sender: TObject; var Value: String);
procedure lb12Print(sender: TObject; var Value: String);
procedure QR_PrintBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
procedure QR_PrintStartPage(Sender: TCustomQuickRep);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ACS301RF: TACS301RF;
g_rowcnt : integer; //fetch된 건수
implementation
uses ACS300R;
{$R *.DFM}
var
g_SlipFlag : string; //전표구분
g_Flag : string; //1:전체,2:전표번호
g_DeptCode : string; //부서코드
g_DeptNm : string; //부서명
g_Ymd : string; //발생일자
g_SlipNo1 : string; //전표번호 from
g_SlipNo2 : string; //전표번호 to
g_acct_unit : string; //회계단위
CurrentCount : integer;
g_tot_dr_amt : double; //차변합계
g_tot_cr_amt : double; //대변합계
g_tot_cnt : double; //총건수
procedure TACS301RF.SetForm(vp_SlipFlag,vp_Flag,vp_DeptCode,vp_DeptNm,vp_Ymd,
vp_SlipNo1, vp_SlipNo2, vp_acct_unit : string);
begin
g_SlipFlag := vp_SlipFlag;
g_Flag := vp_Flag;
g_DeptCode := vp_DeptCode;
g_DeptNm := vp_DeptNm;
g_Ymd := vp_Ymd;
g_SlipNo1 := vp_SlipNo1;
g_SlipNo2 := vp_SlipNo2;
g_acct_unit := vp_acct_unit; //회계단위
QR_Print.ReportTitle := '[ACS301R]';
end;
{DB 생성}
procedure TACS301RF.FormCreate(Sender: TObject);
begin
if Not TXClient_Print.Open Then
begin
DispErrMessage(TXClient_Print);
exit;
end;
end;
procedure TACS301RF.QRLabel6Print(sender: TObject; var Value: String);
begin
value := '전표번호:';
end;
procedure TACS301RF.qrl_DeptCodePrint(sender: TObject; var Value: String);
begin
value := g_DeptCode; //부서코드
end;
procedure TACS301RF.qrl_DeptNmPrint(sender: TObject; var Value: String);
begin
value := g_DeptNm; //부서코드명
end;
procedure TACS301RF.QRLabel7Print(sender: TObject; var Value: String);
begin
if g_slipflag = 'N' then value := '미승인전표'
else value := '승인전표';
end;
procedure TACS301RF.QR_PrintNeedData(Sender: TObject;
var MoreData: Boolean);
var
dAmt : double;
iFlag : integer;
// i,j,k : integer;
begin
// ACS301.Fields[0].AsInteger := k;
lb5.Caption := '0';
lb7.Caption := '0';
lb8.Caption := '0';
IF CurrentCount < g_rowcnt THEN
begin
lb1.Caption := TXClient_Print.StrVal('FML_STR7', CurrentCount); //계정코드
lb2.Caption := TXClient_Print.StrVal('FML_STR17', CurrentCount); //과목명
lb3.Caption := TXClient_Print.StrVal('FML_STR27', CurrentCount); //항목명
lb4.Caption := TXClient_Print.StrVal('FML_STR37', CurrentCount); //세목명
// ACS301.Fields[6].AsFloat := TXClient_Print.DblVal('FML_DBL10', j); //건수
lb5.Caption := FloatToStr(TXClient_Print.DblVal('FML_DBL10', CurrentCount)); //건수
g_tot_cnt := g_tot_cnt + TXClient_Print.DblVal('FML_DBL10', CurrentCount); //총건수
dAmt := TXClient_Print.DblVal('FML_DBL11', CurrentCount);
iFlag := strtointdef(TXClient_Print.StrVal('FML_STR10', CurrentCount),1);
case iFlag of
1:
begin
lb6.Caption := '현금';
lb8.Caption := FloatToStr(dAmt);
g_tot_dr_amt := g_tot_dr_amt + dAmt; //차변합계
end;
2:
begin
lb6.Caption := '현금';
lb7.Caption := FloatToStr(dAmt);
g_tot_cr_amt := g_tot_cr_amt + dAmt; //대변합계
end;
3:
begin
lb6.Caption := '대체';
lb8.Caption := FloatToStr(dAmt);
g_tot_dr_amt := g_tot_dr_amt + dAmt; //차변합계
end;
4:
begin
lb6.Caption := '대체';
lb7.Caption := FloatToStr(dAmt);
g_tot_cr_amt := g_tot_cr_amt + dAmt; //대변합계
end;
end;
end;
inc(CurrentCount);
MoreData := CurrentCount <= g_rowcnt;
end;
procedure TACS301RF.lb5Print(sender: TObject; var Value: String);
begin
value := FormatCurr('#,0',StrToCurr(lb5.Caption));
end;
procedure TACS301RF.lb7Print(sender: TObject; var Value: String);
begin
value := FormatCurr('#,0',StrToCurr(lb7.Caption));
end;
procedure TACS301RF.lb8Print(sender: TObject; var Value: String);
begin
value := FormatCurr('#,0',StrToCurr(lb8.Caption));
end;
procedure TACS301RF.QRBand_SummaryBeforePrint(Sender: TQRCustomBand;
var PrintBand: Boolean);
begin
lb12.Caption := FloatToStr(g_tot_cnt);
lb14.Caption := FloatToStr(g_tot_dr_amt);
lb13.Caption := FloatToStr(g_tot_cr_amt);
end;
procedure TACS301RF.lb13Print(sender: TObject; var Value: String);
begin
value := FormatCurr('#,0',StrToCurr(lb13.Caption));
end;
procedure TACS301RF.lb14Print(sender: TObject; var Value: String);
begin
value := FormatCurr('#,0',StrToCurr(lb14.Caption));
end;
procedure TACS301RF.lb12Print(sender: TObject; var Value: String);
begin
value := FormatCurr('#,0',StrToCurr(lb12.Caption));
end;
procedure TACS301RF.QR_PrintBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
CurrentCount := 0;
PrintReport := True;
g_tot_dr_amt := 0; //차변합계
g_tot_cr_amt := 0; //대변합계
g_tot_cnt := 0;
end;
=================이 아래부분이 의심스러운 부분입니다...================
procedure TACS301RF.QR_PrintStartPage(Sender: TCustomQuickRep);
begin
if g_Flag = '1' then //전체(계정별)
begin
// qrl_SlipNo.Caption := copy(g_SlipNo,1,2);
qrl_Ymd.Caption := FormatMaskText('0000/00/00;0',g_Ymd);
lb11.Caption := TXClient_Print.StrVal('FML_STR8', 0); //JS코드명
lb9.Caption := TXClient_Print.StrVal('FML_STR4', 0); //전표번호 from
lb10.Caption := TXClient_Print.StrVal('FML_STR4', 1); //전표번호 to
end
else if g_Flag = '2' then //전표번호별 g_Flag => 2
begin
// qrl_SlipNo.Caption := '';
qrl_Ymd.Caption := FormatMaskText('0000/00/00;0',g_Ymd);
lb11.Caption := TXClient_Print.StrVal('FML_STR8', 0); //JS코드명
lb9.Caption := TXClient_Print.StrVal('FML_STR4', 0); //전표번호 from
lb10.Caption := TXClient_Print.StrVal('FML_STR4', 1); //전표번호 to
end;
// qrl_Header.Caption := vv_Header; //타이틀명
(* qrl_Ymd.Caption := FormatMaskText('0000/00/00;0',g_Ymd);
lb11.Caption := TXClient_Print.StrVal('FML_STR8', 0); //JS코드명
lb9.Caption := TXClient_Print.StrVal('FML_STR4', 0); //전표번호 from
lb10.Caption := TXClient_Print.StrVal('FML_STR4', 1); //전표번호 to *)
end;
end.