Number format
I have following functions to set sub total at Group Header. And it works fine except the format of both sub total. I would like to let it become something like "$123,789.00". I tried to set both format on memo9 and memo6. But they won't work at all.
function GroupHeader1OnBeforePrint(Sender){
if (Engine.FinalPass){
Memo9.Text = formatCurrency(Get(<ADOQuery1."duedate">));
}
}
function GroupFooter1OnBeforePrint(Sender){
Set(<ADOQuery1."duedate">,
<SUM(<ADOQuery1."totalamt">, MasterData1)> -
<SUM(<ADOQuery1."totalpaid">, MasterData1)>
);
}
function GroupHeader2OnBeforePrint(Sender){
if (Engine.FinalPass){
Memo6.Text = Get(<ADOQuery1."duedate">);
}
}
function GroupFooter2OnBeforePrint(Sender){
Set(<ADOQuery1."duedate">,
<SUM(<ADOQuery1."totalamt">, MasterData1)> -
<SUM(<ADOQuery1."totalpaid">, MasterData1)>
);
}
function GroupHeader1OnBeforePrint(Sender){
if (Engine.FinalPass){
Memo9.Text = formatCurrency(Get(<ADOQuery1."duedate">));
}
}
function GroupFooter1OnBeforePrint(Sender){
Set(<ADOQuery1."duedate">,
<SUM(<ADOQuery1."totalamt">, MasterData1)> -
<SUM(<ADOQuery1."totalpaid">, MasterData1)>
);
}
function GroupHeader2OnBeforePrint(Sender){
if (Engine.FinalPass){
Memo6.Text = Get(<ADOQuery1."duedate">);
}
}
function GroupFooter2OnBeforePrint(Sender){
Set(<ADOQuery1."duedate">,
<SUM(<ADOQuery1."totalamt">, MasterData1)> -
<SUM(<ADOQuery1."totalpaid">, MasterData1)>
);
}
Comments
Memo9.Text := Format('%2.2m',[Get(<Sales."Company">)]);
Please, next time send small demo project with problem based on FRDemo database
This will accelerate the solution of the problem
Does Format( ) works in jscript?