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;