Explore Categories

 

 PDF

Form Related Attributes

Background

The attribute Background is used to set the Background Color of a Form in Display mode.

Syntax

[Form : <Form Name>]

Background : <Color Name Formula>

Example:

[Form : Salary Detail Configuration]

Background : @@SV_CMPCONFIG

Print BG

The Print BG attribute is used to set the Background Color of a Form in Print mode.

Syntax

[Form : <Form Name>]

Print BG : < Color Name Formula>

Repeat

The Form level attribute Repeat is used to repeat data of a collection column-wise in the reports created using productivity suites, using the function TplColumnObject.

Syntax

Repeat : <Token Name> : <Collection Name>

Where,

<Collection Name> is the name of the collection or a sub-collection.

<Token Name> is the name of the token specified in the document template for evaluating the value using the attribute XML Map.

Resource

The attribute Resource at Form definition is used to specify the name of the Resource definition, which provides the details of the document template. This document template is used for exporting/printing the Form.

Syntax

[Form: <Form Name>]

Resource : <Resource Name>

Where,

Resource Name > is the name of the resource definition.

XML Map

XML Map is a Form level list type attribute, used to provide correct value for the token(s) specified in the document template. Token is an alpha-numeric value without any spaces, prefixed with $. No special characters are allowed in the token name. It is an expression specified in the document template to map the values from TallyPrime.

For example, $Name, $CmpName, $FrDate, $Val1

When the document template is used for exporting/printing:

  • The defined tokens in the document template are substituted with the respective values by evaluating the expression in XML Map attribute, against the defined token.
  • If the token is not defined in the document template, it evaluates as a method in current object context. A token refers to a method of current object context. In this case, defining XML Map is not necessary.
  • XML Map also allows specification of repeatable data, when it is referenced in TallyPrime. It creates a required number of rows/entries for each object in the collection.

Syntax:

[Form: <Form Name>]

XML Map: <Map Name>: <Expression >[:<Collection Name>]

Where,

< Map Name > is the name of the token specified in the document template for evaluating the value.

Expression > is a valid TDL expression such as method, variable, system formula.

Collection Name > is specified where the token is defined for repeating the data. It is an optional parameter.

Example

[Resource: InvoiceWord]

Source : “D:WorkInvoiceWord.xml”

;;It is the word document saved as .xml(WORDXML)

Resource Type : Word XML

[Form: InvFrm]

Resource : InvoiceWord

XML Map  : BasicSDN : @@DelNoteNo

XML Map  : SVCompany : ##SVCurrentCompany

XML Map  : Rate : $Rate : Inventory Entries

[System: Formula]

DelNoteNo : $BasicShipDeliveryNote

In the example, InvoiceWord is the name of the resource. BasicSDN , SVCompany and Rate are the tokens which are defined in the document template, and values are taken from the respective second parameters, @@ DelNoteNo, ## SVCurrentCompany and $Rate:Inventory Entries.

You can use a relative path in the attribute Source as given below:

[Resource: InvoiceWord]

Source : “ResourceInvoiceWord.xml”

;;It is the word document saved as .xml(WORDXML). The specification of resource always accepts the relative path as the TDL Folder and not the TallyPrime application folder. If you mention a relative path, it is concatenated along with the absolute path of the folder where TDL File exists.

Resource Type : Word XML

[Form: InvFrm]

Resource: InvoiceWord

XML Map : BasicSDN : @@DelNoteNo

XML Map : SVCompany : ##SVCurrentCompany

XML Map : Rate : $Rate : Inventory Entries

[System: Formula]

DelNoteNo : $BasicShipDeliveryNote

Use the following code to prevent printing values of  Not Applicable or  End of List .

[System: Formula]

DelNoteNo : If $$IsEmpty:$BasicShipDeliveryNoteor $$IsSysName:$BasicShipDeliveryNote then ” ” + else $BasicShipDeliveryNote

Note: Microsoft Word has a limitation to print the special character used in TallyPrime for the SysNames, Not Applicable or End of List .

For every token, TallyPrime looks for an XML Map definition

  • If TallyPrime finds the specified token in the XML Map definition, it evaluates and replaces the specified expression.
  • If TallyPrime does not find the specified token in the XML Map definition, it treats the token as a method in current object context, and evaluates the value.
  • If the value corresponding to a token is not found in the XML Map or in any of the object storages/methods, the token is printed as it is in the document.
  • For example, $DutyValue is the token, and there is neither XML Map with this name nor any storage/method in that object context, then the system prints $DutyValue as it is, indicating that the value corresponding to the token is not available.
  • When the collection name is specified, the specified paragraph or row in the docu­ment template is repeated for every collection object. When the objects are not found in the collection, paragraph or row is not displayed.
Post a Comment

Is this information useful?
YesNo
Helpful?