wkchin
10th September 2008, 04:00
Dear all,


We have new cheque format recently. I'm now customise the report script to suit new cheque printing format.

But there's one problem i hit as when i try to print out the amount in word. For example, "THREE HUNDRED FIFTY SEVEN THOUSAND EIGHT HUNDRED SEVENTY SEVEN AND 70/100" should be printed out into 2 lines.

But the output of my cutomised layout is "THREE HUNDRED FIFTY SEVEN THOUSAND EIGHT" at 1st line, and "AND 70/100" at 2nd line. The "HUNDRED SEVENTY SEVEN" is missing.

I go through the report script and noticed that there's one function used in it, itfcmg0005. Is it possible for me to change the length? As currently new cheque length is shorter - only 45 character per line, not 65 character.


Please help.

Thanks.

wkchin

sushil
10th September 2008, 08:29
Hello,

If you have the src for the Program "tfcmg0005" just debug , else you could cust ur self .

even i had the problem last 8 months backs - the following links was a grt help for me

http://www.baanboard.com/baanboard/showthread.php?t=26405

http://www.baanboard.com/baanboard/showthread.php?t=24151

Regards,
Sushil Kumar Mudaliar

Beniabdullah
10th September 2008, 09:51
U can grap the script from Cheque Report in Financial Module.

function decode.amount()
{
domain tfgld.serl lnga
domain tfgld.serl lngb
domain tfgld.serl lngc
domain tfgld.serl lngd
domain tfgld.serl lnge
tcmcs.dll0006.decode(total, true, amount.desc, amount.desc1,
amount.desc2, amount.desc3)
lnga = len(amount.desc1)
lngb = len(amount.desc2)
lngc = len(amount.desc3)
lngd = lnga + lngc
lnge = lngb + lngc
if isspace(amount.desc2) then
if lngd > 65 then
amount.desc1 = "*" & shiftr$(amount.desc1) & "*"
amount.desc2 = "*" & shiftl$(amount.desc3) & "*"
amount.desc3 = ""
else
amount.desc1 = "*" & concat$(" ",amount.desc1,
amount.desc3) & "*"
amount.desc3 = ""
endif
else
if lnge > 65 then
amount.desc1 = "*" & shiftr$(amount.desc1) & "*"
amount.desc2 = "*" & shiftr$(amount.desc2) & "*"
amount.desc3 = "*" & shiftl$(amount.desc3) & "*"
else
amount.desc1 = "*" & shiftr$(amount.desc1) & "*"
amount.desc2 = "*" & concat$(" ",amount.desc2,
amount.desc3) & "*"
amount.desc3 = ""
endif
endif

amount.desc1 = toupper$(amount.desc1)
amount.desc2 = toupper$(amount.desc2)
amount.desc3 = toupper$(amount.desc3)
}

wkchin
16th September 2008, 04:40
Thanks a lot~ The info did help me to solve my problem.

I added in a new sub function with the new length assinged, keeping the existing function as a backup, and the output seems nice. =D

Once again, thank you so much!