Table of Contents

 

Capabilities for Template-based Invoice Customization

Form Attributes

Form Attribute – Color

The Color attribute, introduced at the form level in TallyPrime Release 7.1, allows you to define the font color for the entire form in display mode. All fields within the form inherit this color unless a specific color is defined at the field level.

Syntax

[Form: <Form Name>]

Color: <Color Name>

Where,

<Form Name> specifies the name of the Form in which the Color is defined.

<Color Name> specifies the name of the color to be applied to the Form.

Behaviour

  • Applies to all fields inside the Form.
  • Field-level Color takes priority over Form-level Color.
  • If not defined at either level, default system color is used.

Example

[Form: TSPLSMPLPrintCust]

Color: Blue

In the example, as Color is set to Blue, the Form TSPLSMPLPrintCust uses Blue as the font color in display mode. All fields within the Form inherit this color unless a specific color is defined at the field level.

Form Attribute – Style

The Style attribute, introduced at the form level in TallyPrime Release 7.1, allows you to define the font style for the entire form in display mode. All fields within the form inherit this style unless a specific style is defined at the field level.

Syntax

[Form: <Form Name>]

Style: <Style Name>

Where,

<Form Name> specifies the name of the Form in which the Style is defined.

<Style Name> specifies the name of the style to be applied to the Form.

Behaviour

  • Applies to all fields inside the Form.
  • Field-level Style takes priority over Form-level Style.
  • If not defined at either level, default system style is used.

Example

[Form: TSPLSMPLPrintCust]

Style : Normal Bold

In the example, as Style is set to Normal Bold, the Form TSPLSMPLPrintCust uses Normal Bold as the font style in display mode. All fields within the Form inherit this style unless a specific style is defined at the field level.

Form Attribute – Print FG

The Print FG attribute, introduced at the form level in TallyPrime Release 7.1, allows you to define the font color for the entire form in print mode. All fields within the form inherit this color unless a specific print color is defined at the field level.

Syntax

[Form: <Form Name>]

Print FG : <Color Name>

Where,

<Form Name> specifies the name of the Form in which the Print FG is defined.

<Color Name> specifies the font color to be applied in print mode.

Behaviour

  • Applies in Print, Print Preview, PDF Export, and JPEG Export.
  • Field-level Print FG takes priority over Form-level Print FG.
  • If not defined, default print color is used.

Example

[Form: TSPLSMPLPrintCust]

PrintFG : White

In the example, as Print FG is set to White, the Form TSPLSMPLPrintCust uses White as the font color in print mode. All fields within the Form inherit this color unless a specific Print FG value is defined at the field level.

Form Attribute – Print Style

The Print Style attribute, introduced at the form level in TallyPrime Release 7.1, allows you to define the font style for the entire form in print mode. All fields within the form inherit this style unless a specific Print Style value is defined at the field level.

Syntax

[Form: <Form Name>]

Print Style : <Style Name>

Where,

<Form Name> specifies the name of the Form in which the Print Style is defined.

<Style Name> specifies the font style to be applied in print mode.

Behaviour

  • Applies in Print, Print Preview, PDF Export, and JPEG Export.
  • Field-level Print Style takes priority over Form-level Print Style.
  • If not defined, default print style is used.

Example

[Form: TSPLSMPLPrintCust]

Print Style : Normal Bold

In the example, as Print Style is set to Normal Bold, the Form TSPLSMPLPrintCust uses Normal Bold as the font style in print mode. All fields within the Form inherit this style unless a specific Print Style value is defined at the field level.

Form Attribute – Background Theme

The Background Theme attribute is introduced at the Form level in TallyPrime Release 7.1 to specify the theme background color at Form level. The selected theme color is applied only to components where Apply Theme is set to Yes.

Syntax

Form : <Form Name>

Background Theme : <Color Name>

Where,

<Form Name> Specifies the name of the Form in which the attribute is defined.

<Color Name> Specifies the theme background color.

Behaviour

  • Does not apply automatically to the entire Form.
  • Applies only to Parts, Lines, or Fields where Apply Theme : Yes is specified.
  • Overrides existing Background color of that component.
  • Works in both display and print modes.

Example

[!Form: VPC TMPL ModernLayoutOne GST India]

Use : VPC TMPL Sales
Part : VPC TMPL MLOne TopSection, VPC TMPL MLOne InvGSTDtls GSTIndia
Page Break : VPC TMPL MLOne ClPageBreak, VPC TMPL MLOne OpPageBreak

Background Theme : Light Aqua

Option : VPC TMPL Bottom Footer Image : NOT $$InSampleMode

This example modifies the existing Form VPC TMPL ModernLayoutOne GST India and applies additional settings like Background Theme.

  • Background Theme : Light Aqua – Sets Light Aqua as the theme background color for the Form. This color is applied only to Parts, Lines, or Fields where Apply Theme : Yes is specified.

Form Level Attribute – Watermark

The Watermark attribute, introduced at the Form level in TallyPrime Release 7.1, is used to apply a Watermark definition to a Form.

A Watermark definition contains the required properties to display the watermark as Text or Image, such as content, size, color, alignment, and opacity.

When the Watermark attribute is defined at the Form level, the specified Watermark definition is used while rendering the Form.

Syntax

[Form : <Form Name>]

Watermark : <Watermark Name>

Where,

<Form Name> specifies the name of the Form in which the attribute is defined.

<Watermark Name> specifies the name of the Watermark definition to be applied.

Example

[!Form: VPC TMPL Imagewatermark]

Watermark : VPC TMPL Imagewatermark

In the example, as Watermark is defined, the Form VPC TMPL Imagewatermark applies the Watermark definition VPC TMPL Imagewatermark while rendering the Form.

Field Attributes

Field Attribute – Sample Set As

The Sample Set As attribute, introduced in TallyPrime Release 7.1, is defined at the field level to assign a value to a field specifically for Sample Display mode.

This attribute is considered only when the report is opened using the Sample Display action and is ignored in all other modes such as Create, Alter, and Display.

In Sample Display mode, Sample Set As takes the highest priority and overrides both Info and Set As.

The effective priority order in Sample Display mode is:

Sample Set As → Info → Set As

Syntax

[Field : <Field Name>]

Sample Set As : <String>

Where,

<Field Name> specifies the name of the Field in which the attribute is defined.

<String> specifies the value to be displayed or printed in Sample Display mode.

Example

[Field: VPC TMPL BL BuyerSecondaryNo Arabic]

Use           : VPC TMPL Field
Set as        : @@VPCBuyer_SecondaryNo_BL_KSAeInv_English
Note          : @@VPCLocSecondaryNo
Sample Set As : $$Sprintf:@@VPCPHFormat:@@VPCBuyer_BL_SecNo_Label_KSAeInv_Arabic

In the example, as Sample Set As is defined, the field VPC TMPL BL BuyerSecondaryNo Arabic displays the formatted sample value returned by $$Sprintf:@@VPCPHFormat:@@VPCBuyer_BL_SecNo_Label_KSAeInv_Arabic when the report is opened in Sample Display mode. This value takes priority over the regular Set As value in that mode.

Field Attribute – Label Field

The Label Field attribute, introduced in TallyPrime Release 7.1, is defined at the field level to mark a field as a label and control whether the label can be edited or hidden/disabled.

A label field is always a simple field and can also be used as a subfield of a compound field.

Syntax

Field: <Field Name>

Label Field: <Logical Value1>[ : <Logical Value2> : <Logical Value3>]

Where,

<Field Name> Specifies the name of the Field in which the attribute is defined.

<Logical Value1> Specifies whether the field is a label field. Supported values: Yes / No. Mandatory.

<Logical Value2> Specifies whether the label field is editable. Supported values: Yes / No.Optional.

<Logical Value3> Specifies whether the label field can be hidden/disabled. Supported values: Yes / No. Optional.

  • The second and third parameters are considered only when the first parameter is set to Yes.
  • If the first parameter is No, the remaining parameters are ignored.
  • The default value for all parameters is No.
  • Invalid values are treated as No.

Behaviour

  • A label field must be a simple field and can also be a subfield.
  • A line can contain multiple label fields, but only one can be hided. If multiple hided labels exist, only the first is considered.
  • Normal fields use label association at line level; subfields use label association at compound field level.
  • The attribute is ignored at compound field / parent field level.
  • A compound field can have at most one label field.
  • This capability is static and not intended for runtime dynamic changes.

Example

[Field: VPC TMPL Prompt]

Use : VPC TMPL DoubleClick
Width : 0%
Page Style : VPC TMPL Small
Case : Title Case Label
Field : Yes:No:No

In the example, as Label Field is set to Yes : No : No, the field VPC TMPL Prompt is marked as a label field. The label is not editable and cannot be hidden or disabled.

A data field is any field that is not marked as a label field, and a line can contain data fields with or without a label field.

Field Attribute – Apply Text BG

The Apply Text BG attribute, introduced in TallyPrime Release 7.1, is defined at the field level to control whether the Change Field Background action applies the background color only to the text or to the entire field.

By default, the background color is applied to the entire field. When this attribute is set to Yes, the background color is applied only to the text portion of the field.

This attribute is useful in scenarios where highlighting only the text improves readability without affecting the full field width.

Syntax

[Field : <Field Name>]

Apply Text BG : <Logical Value>

Where,

<Field Name> specifies the name of the field in which the attribute is defined.

<Logical Value> specifies whether the background color should be applied only to the text or to the entire field. Supported values are Yes and No. The default value is No.

Example

[Field: VPC TMPL ApplyTextBG]

Apply Text BG : Yes

In the example, as Apply Text BG is set to Yes, the background color is applied only to the text portion of the field VPC TMPL ApplyTextBG, and not to the entire field width.

Field Attribute – Note

The Note attribute, introduced at the field level in TallyPrime Release 7.1, is used to define helper text or a description for a field.

This attribute is useful when additional context needs to be shown for a field, such as in field property or customization scenarios where users need to understand the purpose of the field.

The Note attribute is applicable only to simple fields and not to compound fields.

This capability is intended to be static. While expressions are supported, they are evaluated during the initial configuration phase and are not intended to change dynamically at runtime.

Syntax

[Field : <Field Name>]

Note : <String Expression>

Where,

<Field Name> specifies the name of the Field in which the attribute is defined.

<String Expression> specifies the helper text or description to be used for the field.

Example

[Field : Bill To]

Note : “Bill To Properties in Modern Templates”

In the example, as Note is defined, the field Bill To uses “Bill To Properties in Modern Templates” as its helper text or description.

Part Attribute

Part Attribute – Next Page

The Next Page attribute, introduced at the Part level in TallyPrime Release 7.1, is used to control whether a Part should start on the current page or move to the next page based on a logical condition.

At the Part level, this attribute determines whether the Part and its following content continue on the current page or begin from the next page.

This capability is useful when a complete Part must remain intact on a single page, such as headers, totals, grouped sections, or summary blocks.

The Next Page attribute is commonly used with the function $$DoesPartFit, which returns Yes if the Part fits on the current page, otherwise No.

Syntax

[Part : <Part Name>]

Next Page : <Logical Expression>

Where,

<Part Name> specifies the name of the Part in which the attribute is defined.

<Logical Expression> specifies the condition that determines whether the Part should begin on the next page. The expression must evaluate to Yes/No or True/False.

Example

[Part : Amount Chargeable]

Next Page : NOT $$DoesPartFit

In the example, the Part Amount Chargeable moves to the next page when it does not fit in the remaining space of the current page. This helps keep the complete Part together on a single page.

Part/Line/Field Attribute

Part/Line/Field Attribute – Apply Theme

The Apply Theme attribute is introduced at the Form level in TallyPrime Release 7.1 to control whether the Background Theme defined at Form level should be applied to a Part, Line, or Field.

Syntax

Part/Line/Field : <Part/Line/Field Name>

Apply Theme : <Logical Value>

Where,

<Part Name> specifies the Part in which the attribute is defined.

<Line Name> specifies the Line in which the attribute is defined.

<Field Name> specifies the Field in which the attribute is defined.

<Logical Value> specifies whether the theme should be applied. Supported values: Yes / No. Default value is No.

Behaviour

  • Works only when Background Theme is defined at Form level.
  • Yes – Applies the Form’s Background Theme to the component.
  • No – Theme is not applied to the component.
  • If applied at Line level, all fields in that Line inherit the theme unless explicitly set to No.
  • If applied at Part level, contained Lines and Fields inherit the theme unless explicitly set to No.
  • In striped reports, themed lines use the Background Theme as stripe color.
  • Cursor and selection highlight colors remain unchanged.
  • Existing Background Theme takes priority over component-level Background.

Example

[Part: VPC TMPL MLOne eInvTitle]

Use : VPC TMPL eInv Title
Apply Theme : Yes
Width : 10% Page
Space Bottom : 0.25

In the example above Apply Theme is set to Yes which applies the Background Theme defined at the Form level to this Part. In this example, the Part “VPC TMPL MLOne eInvTitle” will use the Form’s theme background color for its background. Since the theme is enabled at Part level, the applied theme takes priority over any regular background color defined for this Part.

Line/Field Attribute

Line/Field Attribute – Skip Common Border

The Skip Common Border attribute, introduced in TallyPrime Release 7.1, is defined at the line or field level to control whether the common border should be drawn when it passes through a component.

This attribute is useful in layouts where the common border overlaps or cuts through a component, resulting in cluttered or incorrect rendering.

Syntax

[Line/Field : <Line/Field Name>]

Skip Common Border : <Logical Value>

Where,

<Line Name> specifies the Line in which the attribute is defined.

<Field Name> specifies the Field in which the attribute is defined.

<Logical Value> specifies whether the common border should be skipped. Supported values are Yes or No. The default value is No.

Behaviour

  • When set to Yes, the common border is not drawn for the line or field where the attribute is applied.
  • When set to No (default), the common border is drawn as usual.
  • The effect applies only when the common border intersects the component area.

Functions

Function: $$InSampleMode

The $$InSampleMode function, introduced in TallyPrime Release 7.1, is used to determine whether a report is accessed in Sample Display or Sample Alter mode.

This function returns Yes only when the report is invoked through an action such as Sample Display or Sample Alter from a Menu, Button, or Key.

Internally, the platform evaluates the first non-auto report in the owner hierarchy and checks the action through which the report was invoked.

Syntax

$$InSampleMode

This function does not accept any arguments.

Returns Logical (Yes / No)

Example

Option : VPC TMPL ScrollFlow : NOT $$InSampleMode

In the example, the option VPC TMPL ScrollFlow is applied only when the report is not accessed in Sample Display or Sample Alter mode. When the report is opened in Sample mode, the condition evaluates to No.

Function: $$IsLabelField

The $$IsLabelField function, introduced in TallyPrime Release 7.1, is used to check whether the current field in context is a label field.

This function is useful in field property and template customization scenarios where the behavior or title needs to vary depending on whether the current field is a label field or a data field.

Syntax

$$IsLabelField

This function does not accept any arguments.

Returns Logical (Yes / No)

Example

VPC DefTitle : If $$IsLabelField Then $$LocaleString:”Set Title Style” Else $$LocaleString:”Set Field Properties”

In the example, the value of VPC DefTitle changes based on whether the current field is a label field. If the current field is a label field, the title is displayed as Set Title Style; otherwise, it is displayed as Set Field Properties.

Behaviour

  • The function evaluates the current Edit Field in the active report context.
  • If the current Edit Field is a label field, the function returns Yes; otherwise, it returns No.
  • When used from an auto-report or sub-form, the function evaluates the current Edit Field from the main owner report context.
  • If the function is used in a context where no report or current Edit Field is available, it returns Error.
Is this information useful?
YesNo
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
TARA