Query Why does the cursor jump back to the first visible field from the middle during entering/editing? Solution This usually happens when there is an Option, Switch or an Invisible condition specified for any Part or Line and the condition is based on the user input within the same form. Example If user selects Bank Ledger, then display Cheque No. Field else make it Invisible. Hence, when the line is being removed or added, the entire form gets repainted as if we are entering this Report from a Menu Item. The Solution to this issue is instead of having an Option, Switch or Invisible condition, set all the fields within the required line to Inactive based on condition. Here, the form need not refresh since there is no new line getting added or removed as the line is always available. Only the field contents are inactive.
Good information !. I made correction in my TDL as per this information. Now cursor does not go back to the first visible field. Thank you Admin !
Dear Sir, Thanks in advance for sharing the above code based on this i have create two formats for sales SMALL BILL AND A4 its working fine when selecting bill format SMALL OR A4 again cursor is jumping to date filed please check this below code ;;;;;;;;;;;;;;; ;;PRINT SMALL OR A4 PAPER ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [#Part: VCH Narration] Add: Option: Select Bill Format : $$IsSales:$VoucherTypeName [!Part: Select Bill Format ] Add: Line: At Beginning: Select Bill Format Line [Line: Select Bill Format Line] Field: Short Prompt, Select Bill Format Field Local: Field: Short Prompt: Info : "Bill Format : " [Field: Select Bill Format Field] Use : Name Field Table : BillSelectionTable Show Table : Always Storage : BillFormat [Table: BillSelectionTable] Title : "LIST" List : " ","Small" , "A4" [System: UDF] BillFormat : String : 1666 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [#Form : Sales Color] Option : SmallPrint : $BillFormat contains "Small" Option : A4Print : $BillFormat contains "A4" ;;;;;;;;;;;;; for small print;;;;;;;;;;;;;;;;;; [!Form : SmallPrint] Delete rint Add rint khrInvocieSmall [Report : PkhrInvocieSmall] Use : Voucher Form : PkhrInvocieSmall PrintSet : Report Title : If NOT (##OptionalFlag) AND @@IsSales then $VchPrintTitle:VoucherType:##SVVoucherType else @@InvTitle PrintSet : Report SubTitle : @@InvSubTitle PrintSet : SVPrintCopies : @@InvCopies Print : VCHPrintConfigure Delete : Set [Form : PkhrInvocieSmall] Parts : AMains,InvHeading, GI OpPgBrk, Global Invoice Body Bottom Parts: Global Invoice Bottom Page Break : GI ClPgBrk, GI OpPgBrk ;Width : 210 mms Height : 5.9 INCH Space Top : 2% Page Space Bottom : 2% Page Space left : 5% Page Space Right : 4% Page ;;;;;;;;;;;;;;;;;;;;;;; for A4 PRINT ;;;;;;;;;;;;;;;;; [!Form : A4Print] Delete rint Add rint khrInvociea4 [Report : PkhrInvociea4] Use : Voucher Form : PkhrInvociea4 PrintSet : Report Title : If NOT (##OptionalFlag) AND @@IsSales then $VchPrintTitle:VoucherType:##SVVoucherType else @@InvTitle PrintSet : Report SubTitle : @@InvSubTitle PrintSet : SVPrintCopies : @@InvCopies Print : VCHPrintConfigure Delete : Set [Form : PkhrInvociea4] Parts : AMains,InvHeading, GI OpPgBrk, Global Invoice Body Bottom Parts: Global Invoice Bottom Page Break : GI ClPgBrk, GI OpPgBrk ;Width : 210 mms Height : 11.27 INCH Space Top : 2% Page Space Bottom : 2% Page Space left : 5% Page Space Right : 4% Page
IF we use the field name instead of storage this can be overridden. ie., field name is sdkname and storage is Name then use #sdkname inthe place of $name but if we add option in the form , this may fail.