Download Free Tools for Tally ERP
FREE utilities for Tally Accounting Software

Wednesday, February 7, 2007

Example 5: Using Font-styles, Colors in TDL

This program shows how you can use different font-styles, colors in TDL

;;Modifies the "Gateway of Tally" menu, and adds a new menu-option
[#Menu: Gateway of Tally]
Add: Item: Fonts Style,Colors: Display: rptMyReport



;;Report definition
;;==========================================
[Report : rptMyReport]
Form : frmMyForm



;;Form definition: Size is 50% of the screen
;;Margins kept at TOP and BOTTOM
;;==========================================
[Form : frmMyForm]
Space Top:2
Space Bottom: 2
Part : prtMyPart
Height: 50% screen
Width: 50% screen



;;Part definition - Contains 8 lines
;;==========================================
[Part : prtMyPart]
Line : lnMyLine1
Line : lnMyLine2
Line : lnMyLine3
Line : lnMyLine4
Line : lnMyLine5
Line : lnMyLine6
Line : lnMyLine7
Bottom Line: lnMyLine8



;;Line definitions
;;==========================================
[Line: lnMyLine1]
Field : My Field1



[line : lnMyLine2]
Field : My Field2



[line : lnMyLine3]
Field : My Field3



[line : lnMyLine4]
Field : My Field4



[line : lnMyLine5]
Field : My Field5



[line : lnMyLine6]
Field : My Field6



[line : lnMyLine7]
Field : My Field7



[line : lnMyLine8]
Field : My Field8



;;Field definitions
;;==========================================
[Field: My Field1]
Space Left: 5
Space Right: 5
Set as: "This line is BOLD"
Style: styMyStyle1



[Field: My Field2]
Space Left: 5
Space Right: 5
Set as: "This line is Italics"
Style: styMyStyle2



[Field: My Field3]
Space Left: 5
Space Right: 5
Set as: "This line is BOLD and ITALICS"
Style: styMyStyle3



[Field: My Field4]
Space Left: 5
Space Right: 5
Set as: "This line is right-aligned"
Width:60
Alignment:Right



[Field: My Field5]
Space Left: 5
Space Right: 5
Set as: "This line is center-aligned"
Width:60
Alignment:Center



[Field: My Field6]
Space Left: 5
Space Right: 5
Set as: "This line is left-aligned"
Width:60
Alignment:left



[Field: My Field7]
Space Left: 5
Space Right: 5
Set as: "This line appears in Red color with Yellow Background"
Background: Yellow
Color: Red



[Field: My Field8]
Space Left: 5
Space Right: 5
Set as: "This line appears at bottom in 15-pt font size"
Style: styMyStyle4



;;Style definitions
;;==========================================
[Style: styMyStyle1]
Font: Verdana
Bold: Yes
Height: 10



[Style: styMyStyle2]
Font: Verdana
Italic: Yes
Height: 10



[Style: styMyStyle3]
Font: Verdana
Bold: Yes
Italic: Yes
Height:10



[Style: styMyStyle4]
Font: Verdana
Height:15


Click here to download the Example 5 compiled file and the source-code.
Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions", Bangalore.