Optio Object Reader Report
DocumentDunning Letter
Creation date6/10/2003
Last modified6/11/2003
FilenameMil_Dun_EU.dcl
Report date05/09/2003
Report typeDocumentation
DocumentDunning Letter
Code Before
// Beginning of Code Before
IF doc_env <> "TEST"
THEN
LOAD "~fun/mil_dunlet.fun"
ELSE
LOAD "~fun/test/mil_dunlet.fun"
END IF
CALL "dunlet_InitGlobals"
Author
Some poor user
Text InputDunning Letter
Input mappingText Data Datamap
Code Before
LET FirstInvoice = FALSE
Region/SegmentHeader
Parent Section
None
FieldHeaderWatch
Field type
Watch field
Field type
Regularexpression
Expression
[ ]\{60\}[a-zA-Z]\{9,5\}
FieldBillToAddr
Grow with section
Yes
Region/SegmentDunLetLines
Parent Section
None
Repeating Section
Yes
FieldInvAmountKey
Field type
Key field
Field type
Is Numeric
FieldInvNr
Code After
IF CI("InvAmountKey") > 0 AND FirstInvoice = FALSE THEN
LET sqlInv = CI("InvNr")
LET FirstInvoice = TRUE
END IF
Region/SegmentHeaderDate
Parent Section
None
FieldHeaderDateWatch
Field type
Watch field
Field type
Regularexpression
Expression
20[0-9]\{2\}$
FieldStartText
Grow with section
Yes
Custom input reformat
=BMArrayTrimBottom({})
Region/SegmentCurrency
Parent Section
None
FieldCurrencyWatch
Field type
Watch field
Field type
Regularexpression
Expression
Currency:
Region/SegmentTotals
Parent Section
None
Repeating Section
Yes
FieldTotalsKey
Field type
Key field
Field type
Regularexpression
Expression
Subtotal:
Region/SegmentLetter
Code After
//Begin Code After - Header

CALL "dunlet_FormatHeaderVariables"

//End Code After - Header
Parent Section
None
Repeating Section
Yes
FieldLetterKey
Field type
Key field
Field type
Regularexpression
Expression
Bottom Text
FieldLetterLine
Grow with section
Yes
Custom input reformat
=BMArrayTrimBottom({})
INPUT_SQLSQL_LangLabels
Lookup Source
Yes
SQL Statement
SELECT  a.TEXT,  b.ORIGINAL_TEXT,  b.ITEM_NAME,  NVL(a.TEXT, b.ORIGINAL_TEXT) INTO $sqlTrans, $sqlDefault, $sqlVarName, $sqlLabel FROM  XX_FORM_BP_LANGUAGES_TL a, XX_FORM_BP_LANGUAGES b WHERE (b.ITEM_NAME LIKE 'AR_%'  OR b.ITEM_NAME LIKE 'MONTH_%' )  AND b.CANVAS_TYPE = 'TEXT' AND b.MODULE_NAME = 'REPORT' AND a.LANGUAGE(+) = $sqlLangCode2 AND a.ITEM_NAME(+) = b.ITEM_NAME AND a.MODULE_NAME(+) = b.MODULE_NAME  AND a.CANVAS_TYPE(+) = b.CANVAS_TYPE;
INPUT_SQLSQL_BillToNr
Lookup Source
Yes
SQL Statement
SELECT bill_to_site_use_id 
INTO sql_BillToNr
FROM ra_customer_trx_all
WHERE trx_number = &sqlInv
AND org_id = &sqlOrgID
Laser printer OutputLaser Printer
Printer Queue
\\server\printer
LayoutDunning Letter
Code Before
IF @@Page = 1 THEN
LET StartPos = 1200
ELSE
LET StartPos = 300
END IF
Region/SegmentBackground
Parent Section
None
FieldImage2
When to execute field
bTestDoc = TRUE
Region/SegmentHeader1
Parent Section
None
Region/SegmentHeaderDate1
Parent Section
None
Region/SegmentCurrency1
Parent Section
None
Section starting position
=StartPos
FieldPONrLabel
Content
="Votre Commande"
Region/SegmentDunLetLines1
Parent Section
None
Repeating Section
Yes
Region/SegmentTotals1
Parent Section
None
Repeating Section
Yes
FieldTotalsKey
Content
="Total dû :    " & Layout.Currency1.CurCode
Region/SegmentLetter1
Parent Section
None
Repeating Section
Yes