Currently, Tally supports printing of multiple forms within a single report in single orientation only, i.e., all the forms within a report can be printed either in Portrait or in Landscape format only, as specified in the report.
In order to support printing of multiple forms within a single report in different orientations, the behaviour of Variable SVPrintOrientation has been enhanced.
To achieve this behaviour, the local declaration of the Variable SVPrintOrientation at Report level is mandatory, and its value must be set using the form level attribute ‘Set Always’ in individual forms.
This will be very useful in scenarios where multiple forms are being printed from a single report. For example, from a Payment Voucher, one needs to print both Voucher and Payment Advice. However, the Payment Voucher needs to be printed in ‘Portrait’ form, and the Payment Advice in ‘Landscape’.
[Report: TSPL Smp VarSVPrintOrientation Extended]
Form : TSPLSmpVarSVPrintOrientationFrm + TSPLSmpVarSVPrintOrientationFrm2
;; Mandatory Local declaration of Variable SV Print Orientation
Variable : SV Print Orientation : String
[Form: TSPL Smp VarSVPrintOrientation Frm1]
;; Orientation of this Form is set to ‘Portrait’
Set Always : SV Print Orientation : "Portrait"
[Form : TSPL Smp VarSVPrintOrientation Frm2]
Use : TSPL Smp VarSVPrintOrientation Frm1
;; Orientation of this Form is set to ‘Landscape’
Set Always : SV Print Orientation : "Landscape"
In this example, the report TSPLSmpVarSVPrintOrientation Extended has two forms, viz. TSPLSmpVarSVPrintOrientationFrm1 and TSPLSmpVarSVPrintOrientationFrm2 .
Based on the value set to the variable SV Print Orientation , both the forms are being printed in the respective orientation.