FAQ
1. When Unit price is 0, how to display it as Free of Charge (FOC) ?
In Memo, enter the following syntax :
[FormatFloat(',0.00;-,0.00;FOC ',<Document_Detail."UnitPrice">)]

2. How to change Cents to Sens in Document Currency Description ?
Syntax:
[Document_Currency."Description"] : [StringReplace(CurrencyToLangWord(<Main."DocAmt">,<Profile."CurrencyLang">), 'CENTS', 'SENS', TRUE)]

3. How to convert More Description into RichTextToPlainText ?
Syntax :
[RichTextToPlaintext(<Document_Detail."Description3">)]


4. How to change report paper size?
File -> Page Setting ->

5. if Qty > 10, how to change text color to red and bold?
-
Double Click on Memo
-
Click on Highlight Tab
-
Click on Add Button
-
Expression value > 10

-
Click on Font
Can set for Font Type, Font Style, Size, Color or Effects

-
Press OK
-
Right Click on Memo, Ticked Allow Expression
Result :

6. Why in Report I have placed at the position I want, but when preview it will show at bottom?
Right click on Memo, unticked Shift and Unticked Shift when Overlapped
7. How to Export PDF Logo that is blur ?

8. How to capture remark1 as a url path?
In Memo properties :
Hyperlink Expression added in the Data Field Name

Result :

9. How to print Payslip to show AL or MC only ?
-
Click on SubReport3
-
Right click on Leave MasterData Band

-
Click on Filter button
-
Enter the expression :
(<Leave."LeaveType"> ='AL') OR (<Leave."LeaveType"> ='MC') -
Press OK
-
Press OK

10. How to get Net Unit Price ?
-
Click on Memo Text
-
Place on Document Detail Band
-
Drag data field from right to left box :
[<Document_Detail."Amount"> / <Document_Detail."Qty">] -
Press OK
-
Adjust the position
-
Preview and see the result

11. How to do if UOM = UNIT, Qty display without Decimal Point, else with 2 Decimal Point ?
-
Click On Memo Text
-
Copy the below syntax and Paste into Memo:
[IIF(<Document_Detail."UOM"> = 'UNIT'>,
FormatFloat('#,0;-#,0 ', <Document_Detail."Qty">) ,
FormatFloat('#,0.00;-#,0.00 ', <Document_Detail."Qty">))]
-
Press OK
-
Result After Preview :

12. How to Get Supplier Bank in Payment Voucher?
-
Click on Memo
-
Paste this syntax inside Memo
[<GetbankName(pl_SUPPLIERBANKACC."Bank">)]
13. How to change the Amount in Word to First Character to Upper Case only?
Can use function NameCase

Before :

After :

14. Why is it not the same when preview?

Try Untick the Option Shift by right click the Memo

16. How to rename the component I use?

- Click the Red A Icon.
- Click on the place to be print/shown
- At the Object Inspector, look for Name & change the Name as you like (Only Alphanumeric & no spacing)
17. How to draw line for whole report?

- Click an empty place of outer report.
- At the Object Inspector, look for Frame & click the + sign
- Under the Frame, look for Typ & set to True for ftLeft, ftRight, ftTop & ftBottom.

Make sure the Paper Margin for Top, Bottom, Left & Right not set to 0
18. How to add spacing between 2 records?

-
Right Click on DetailData.

-
Select Add child band.
-
At the Object Inspector, look for Height & set the gap Height you want
19. My More Description is very long & it shown page 1 empty & shown in page 2

-
Right Click on DetailData.

-
Select Allow Split.
-
Click on GroupFooter:GroupFooter1.
-
Double Click OnBeforePrint

-
Remove - 60

-
Click on DetailData:DetailData1.
-
Double Click OnAfterCalcHeight

-
Enter //
20. Show Note at Header

-
Right Click on GroupHeader:GroupHeader1.

-
Select Add Child Band & Select Stretch
-
Adjust the Child band Height as you want
-
Right click on Child Band & Select Stretch
-
Move all the Title to Child:Child1
-
Click the Blue A icon (RichText Object)
-
Click on the place to be print/shown & set as below setting in Right Click
- Stretch = True
- Shift = False
- Allow Expression = False
-
At the Object Inspector, Look for & set as below
- DataSet ==> Main
- DataField ==> Note
21. Show Total Qty Excluding Item Code RTN5Cents
-
Click the Red A Icon.
-
Click on the place to be print/shown
-
Enter the below code (make sure in the report had the AdjRound pipeline & GetTotal function (refer to Sales Invoice 7 (GST 1))
[FormatFloat(<Option."StockQuantityDisplayFormat">,
IIF(Trim(<AdjRound."LocalAmount">)<>'0',
GetTotal('Qty')-1,
GetTotal('Qty'))
)]
22. How to print 2 pages in 1 A4?

- Click Margin Icon
- Adjust the Height to fit in 1 page
- Select Apply to all pages
- Click Ok
- Set the Zoom to 100% and/or Page Within
- Click Print Icon
- Set Print Mode to Scale & Print on Sheet to A4
- Click Ok to print
23. How to Load Notes/More Description to TfrRichView using script?
Just add below script on the TfrRichView OnBeforePrint
procedure Rich1OnBeforePrint(Sender: TfrxComponent);
var slOutput : TStringList;
M: TMemoryStream;
begin
slOutput := TStringList.Create;
M := TMemoryStream.Create;
try
slOutput.Text := <plST_Item."Note">; //The Note/More Description field
slOutput.SaveToStream(M);
M.Position := 0;
Rich1.RichEdit.Lines.LoadFromStream(M); //eg The TfrRichView name is Rich1
finally
slOutput.Free;
M.Free;
end;
end;
24. How to reduce the Column use when Export to Excel?
Try use Export to Excel Table (XML) option & untick the Option WYSIWYG
25. Special Display Format
How if data is Zero(0) and I wanted to be printed as - and some space on the back?
A : Just Enter as Follow code:-
[FormatFloat(',0.00;-,0.00;- ',<Main."Amount">)]
How to set a given string as this 123456121234 to show as 123456-12-1234?
A : Just Enter as Follow code:-
[FormatMaskText('000000-00-0000;0;',<Employee."NewIC">)]
How to set displayformat follow the option for Grand Total?
A : Just Enter as Follow code:-
[FormatFloat(<Option."StockQuantityDisplayFormat">, SUM(<Main."TotalQty">,MasterData1))]
OR
[FormatFloat(<Option."AccountingValueDisplayFormat">, SUM(<Main."TotalAmt">,MasterData1))]
How to set displayformat BlankWhenZero or Hide Zeros if using FormatFloat function?
A : Just set the display format at Tools | Options | Misc to
#,0.00;-#,0.00; ;
OR
A : Just Enter as Follow code :-
[IIF(SimpleRoundTo(<Document_Detail."Qty">*<Document_Detail."UnitPrice">,-2) <> 0,
FormatFloat(<Option."AccountingValueDisplayFormat">,
SimpleRoundTo(<Document_Detail."Qty">*<Document_Detail."UnitPrice">,-2)), '')]
How to Set Current Date Time plus/minus N?
procedure DBTxtTimeOnBeforePrint(Sender: TfrxComponent);
var lDT : variant;
begin
//Example deduct 1.5 hours
lDT := FormatDateTime('dd/MM/yyyy hh:mm AM/PM', Now - 0.0625); //(1.5/24)
DBTxtTime.Text := lDT;
end;
Page print count base on qty
procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
Page1.PageCount := <DocDetail."Qty">;
end;
26. How to use Line function?
By default system will use Line# this will result as
Group 1
1
2
3
Group 2
4
5
6
Use Line will result in
Group 1
1
2
3
Group 2
1
2
3
- Select System Text
- Enter as Line in the Text field
27. Can I do a running Total for each footer?
Yes just add , 2 in the SUM formula
It can't batch Printing (i.e. will keep increasing)
[SUM(<Document_Detail."Amount">,DetailData1,2)]
28. How to combine each string lines from detail without line break added?
For example,
| Items | Qty | Unit Price | Amount |
|---|---|---|---|
| RM-001 | 20 | 100 | 2000 |
| RM-002 | 40 | 200 | 8000 |
Expected result:
RM-001,20,100,2000|RM-002,40,200,8000|
var s: string;
Begin
s := Items + ',' + VarToStr(Qty) + ',' + VarToStr(Amount) +'|';
Memo1.Text := '''Copy(Memo1.Text,1,Length(Memo1.Text)-2)''' + s;
End;
29. How to make sure my report export to Excel as less column usage as possible?
- Below is the guideline

- Use align to Grid button

- No gap between two component
- Must Align between top & Bottom of component

- Untick Diagonal when using Line
- Avoid using Rich Text (TfrRichView)
- Untick Auto Width
- Tick Stretch to Max Height (for Detail)
30. Why when I export to PDF with Chinese Word become "tofu" or box box?
This is because default Font is Tahoma is not support Unicode Font
- Solution : Change the Font To Microsft YaHei in Report Designer

31. How to Maintain the QR Code Size with large Data?

32. How to Show Even Row with Color?

if <Line#> mod 2 = 1 then
TfrxBrushFill(DetailData1.Fill).BackColor := clNone else
TfrxBrushFill(DetailData1.Fill).BackColor := clSilver;
33. How to Add QR Code for E-Invoicing?
Only Available in Version 852 & above




procedure IRBM_QROnBeforePrint(Sender: TfrxComponent);
var B : Boolean;
begin
B := Trim(<Main."IRBM_ValidationLink">) <> '';
IRBM_QR.Visible := B;
IRBM_QR.Printable := B;
IRBM_QR.Hyperlink.Value := Trim(<Main."IRBM_ValidationLink">);
end;
- The measurement is in Inch
- This guide is designed for for Laser Printer only
- For Dot Matrix Printer make sure set to 1 for Height
34. How to show Document Number at every Page Footer?
-
Just add the script on procedure GroupHeader2OnBeforePrint
procedure GroupHeader2OnBeforePrint(Sender: TfrxComponent);
begin
...
Memo69.Text := <Main."DocNo">; //Add your script
end;
35. How to set A5 size to print on A4 paper?

-
Change paper size to A4
-
Set the Margin
-
Click ok GroupFooter: GroupFooter1
-
Double Click OnBeforePrint Script

-
Add the value
Might have problem if too many knock off which more then 1 page Height
36. Customise Sales Debit Note Prompt Error after upgrade
- Error

- Solution

37. How to Fix Report Tax Rate show A instead of 6% ?

-
Preview the Report format, Click on blue color link and enter into Report Design.

-
Check GST Summary using which Pipeline | This Report using plSQL_7.

-
Click on Calc Tab.

-
Click on Menu View | Select Module

-
Click on Events | Click on Main:plSQL_0 | Look for SQL_7(Refer Step 2 to see which pipeline) | Insert TaxRate

Query:
SQL_7 := 'SELECT DocKey, Tax, TaxRate, Sum(LocalAmount) LocalAmount, Sum(Qty) Qty, Sum(LocalTaxAmt) localTaxAmt, Description '+
'FROM Document_Detail ' +
'Where Tax <> ''''' +
'GROUP BY Dockey, Tax, TaxRate'; -
Click on Event Handler | Select Procedure ReportBeforePrint | Look for Pipeline SQL_7 | Insert TaxRate

Query:
LocalSQL_SELECT(plSQL_7, SQL_7, 'Dockey;Tax;TaxRate'); -
Click on SubReport1:plSQL_7 Tab

-
Click on VarTax | Right Click | Select Calculation

-
Amend the Query | Press OK
-
Before Amend:

-
After Amend:

Query:
Value := plsql_7.getfieldvalue('Tax') + ' @ ' + plsql_7.getfieldvalue('TaxRate'); -
-
File | Save

-
Close the report builder
-
Preview again the same report format.
