Print Related Functions
$$PageNo
The $$PageNo function returns the current Page Number while the $$ PartNo function returns the current Part Number of the page. These functions do not require any parameter and the return type for $$ PageNo is Number and $$ PartNo is String.
Syntax
$$PageNo
$$PartNo
Example
[Field : My PageNo]
Set as : “Page ” + $$String:$$PageNo + “ (“ + $$PartNo + “)”
$$NatLangInfo
Function $$NatLangInfo has been introduced to provide certain information like Company Name, User Name, From Date, To Date , and so on, from the Query received.
Syntax
$$NatLangInfo : <InfoType>
The valid values for <InfoType> are as follows:
- Company
- UserName
- FromDate
- ToDate
- ObjectName
Example
$$NatLangInfo :Company returns the current Company Name.
$$NatLangInfo :UserName returns the Name of the User from whom the Query is received.
- If the request is from Calculator Pane, Tally responds with the current logged in user name.
- If the request is initiated through an SMS Query, Tally responds with the name of the Tally.NET User from whose device, the request is received.
$$NatLangInfo:FromDate returns the From Date of the period, based on the received query or from the recent context.
$$NatLangInfo:ToDate returns the To Date of the period, based on the received query or from the recent context.
$$NatLangInfo:ObjectName returns the Name of the Object, based on the received query or in the recent context. For example, if Query received is – “Sales for April 2013”, then NatLangInfo will return the following:
Object Name- Sales
From Date – 1-April-2013
To Date – 30-April-2013
$$PrinterInfo
Function $$PrinterInfo has been introduced to extract the settings information for any installed printer. This function is very useful to get the information of the printer, based on which, we can determine the dimensions for pre-printed invoice, etc.
Syntax
$$PrinterInfo : <Printer Name> : <Information Type>
Where,
<Printer Name> refers to the name of the printer for which the information is required.
<Information Types> are permissible information types like PrintSizeinInches, LeftMarginInMMs, etc.
Example
$$PrinterInfo : HPLaserJet4250PCL6 : PrintSizeInInches
The list of permissible Information Types are:
- LeftMarginInMMs returns the Number which denotes the space to be left on the Left side of the page in Millimeters.
- TopMarginInMMs returns the Number which denotes the space to be left on the Top of the page in Millimeters.
- RightMarginInMMs returns the Number which denotes the space to be left on the Right side of the page in Millimeters.
- PrinterExists returns Logical value (YES/NO), indicating if the Printer Exists or not.
- PrintSizeInInches returns the dimensions which denotes the Print Area in Inches, i.e., excluding the Margins.
- PrintSizeInMMs returns the dimensions which denotes the Print Area in Millimeters, i.e., excluding the Margins.
- PrintSizeInLines returns the dimensions which denotes the Print Area in Lines, i.e., excluding the Margins.
- PaperSizeInInches returns the dimensions which denotes the Paper Size in Inches, which includes the Margins.
- PaperSizeInMMs returns the dimensions which denotes the Paper Size in Millimeters, which includes the Margins.
- PaperSizeInLines returns the dimensions which denotes the Paper Size in Lines, which includes the Margins.
- PaperType returns the selected Type of the Paper, e.g., A4, A5 Small, etc.
- PortName returns the Port Name configured for the Printer.
- Orientation returns the Orientation Type of Paper, i.e., Landscape or Portrait.