Invoke a Sub Form from Voucher

Discussion in 'Tally Developer' started by vanandd, Sep 8, 2014.

    
  1. vanandd

    vanandd Member


    Dear Admin,

    Please help me, how to invoke a sub form from Voucher. I mean, I made one form with user inputs. The users will enter the data and save it. But, I want this form should invoke when User select a particular ledger in payment, journal vouchers. So, I used as follows,

    [#Field: ACLSLed]
    Sub Form: My Report Name : ##SVVoucherType = "Payment" AND $LedgerName = "Test Man"

    I tried this with payment voucher only. By this code its not working. So, please help me to resolve this issue.
    And also, I want to know, how to place the cursur in last line.

    Please help me on this...

    Thanks
    vanandd
     


  2. HVPatel

    HVPatel Active Member


    Try this, It May be work.
    [#Field: ACLSLed]
    Sub Form: My Report Name : ##SVVoucherType = "Payment" AND ##LedgerName="Test Man"
    OR
    Sub Form: My Report Name : ##SVVoucherType = "Payment" AND $PartyLedgerName="Test Man"
     


  3. vanandd

    vanandd Member


    Dear HVPatel Sir,

    These above codes also not working sir. Please find enclosed my code for your reference sir...
    Please check and give me solution sir..

    Regards,

    vanandd
     

    Attached Files:

    • FAR.txt
      File size:
      5.5 KB
      Views:
      130


  4. Ritesh Mehta

    Ritesh Mehta New Member


    Dear Vanandd

    Use as below and you get result.

    [#Field: ACLSLed]
    Sub Form: FixedAssetReport:##SVVoucherType = "Payment" And $$Value = "Test Man"



    Regards,

    Ritesh Mehta
     


  5. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,
    I tried by your code also but not working sir...
    Please find enclosed my TDL for your reference. Kindly check and let me know the solution sir. and also, I tried SAMPLE TDL's from Tally solutions. that also not working sir...

    Waiting for your reply...

    Regards,

    vanandd
     


  6. Ritesh Mehta

    Ritesh Mehta New Member


    Dear Vanandd,

    Code which send you earlier is working fine in "Payment" voucher with single entry mode with ledger name = "Test Man", I think you are using "Payment" voucher with double entry (Cr/Dr) mode so herewith I attached your file back which works with "Payment" voucher with Single entry Mode & Double Entry Mode & Journal voucher also.

    Hope you get solution with attached file.

    Regards,
    Ritesh Mehta
     

    Attached Files:

    • FAR.txt
      File size:
      5.9 KB
      Views:
      163


  7. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,

    The code is working fine and thank you so much for your guidance. I am requesting you to guide in future also...

    Thanks

    vanandd
     


  8. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,

    Sir, I have one doubt in the Same TDL. Because, I am trying to get the Primary Group Name of Ledger. But, it showing only the latest parent name. For Ex. I created Ledger "Computers ----> Office Furniture & Equipment ----> Fixed Assets
    Computers --- > Ledger Name
    Office Furniture & Equipment ---> Ledger Group under Fixed Assets
    Fixed Assets ---> Primary Group in Tally.
    I tried by this code :
    " Sub Form : FixedAssetReport : @@RMPymtVch Or @@RMJrnlVch And $(Ledger, $LedgerName).Parent = "Fixed Assets" "
    Here its working If, create directly under Fixed Assets. But, through other groups under the same "Fixed Assets" group is not working. So, can you please tell me how to check the primary Ledger Group name. Is there any way to get this or need to give all group name created under "Fixed Assets".

    Please help me on this sir...

    Regards,

    vanandd
     


  9. Ritesh Mehta

    Ritesh Mehta New Member



  10. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,
    Thank you very much for your assistance and I got it through the Link. But, I failed to get some thing. What is that, I am entering some data in the voucher sub form like SlNo, Bill No, bill Name, Print data after selecting the "Bill Collection" Ledger in Receipt. I want to retrieve that data and need to make report. So, I tried in normal way to get the UDF Values. But, that data's are not appearing. I have a doubt whether I am trying in correct way or not. So, I have attached my TEST FILE for your reference. Can you please check and give me solution for this. I am waiting for your answer...
    Regards,
    vanandd
     

    Attached Files:



  11. Ritesh Mehta

    Ritesh Mehta New Member


    Dear Vanandd,

    I can't understand why you use below code?
    [Collection: MyTESTColle]
    Type: BAgree : Company
    Child Of: ##SVCurrentCompany
    First you need to understand <ObjectType>:<ParentType>. You want data from "Voucher" then why you fetch data from Company (Parent Type)?

    Kindly refer Tally's Daybook and all other report where it show data of voucher and write proper code then only you get it.

    Also check sample tdl codes in that there are good examples which show to create your own new report.

    Regards,

    Ritesh Mehta
     


  12. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,

    I am sorry to say, because I got little bit confusion to fetch the data from Parent Type or Object Type. But, I got the data from Object Type and its working fine now. Thank you so much for your support sir..

    Regards,

    vanandd
     


  13. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,

    Please find enclosed my TDL and requesting you to advice on this. And also, I need another help from you, can we make the date control on our Report. Fox example, I have fetched the data from the Voucher like Voucher Number, Voucher Date, Invoice No, Invoice Date and so on. When you open our Report it shows all the entries. But, I want to filter by the dates which used by our Voucher Date Column in Report. Please run my TDL then you can understand. So, I have gone through some TDL's and book but no idea. So, can you please guide me on this...

    Regards,

    vanandd
     

    Attached Files:



  14. priya

    priya Member


    This thread is really an ideal one. Mr.vanandd asks simple directions and Mr. Ritesh Mehta is guiding him properly, advising him the need to write proper codes, the reasons behind it and also referring him to relevant threads to understand properly. This is like sitting in a class room with the instructor properly teaching the subject. Very Good Effort and the patience, care shown by Mr. Ritesh is commendable. Bye and thanks to both of you, you not only educate an individual, but the entire members of the site.
     


  15. Ritesh Mehta

    Ritesh Mehta New Member


    Dear Vanandd,

    Add as below.

    [Collection:RepFixedRegColl] ;; This is your collection, add below 2 lines in your collection
    ParmVar: SVFromDate : Date : ##SVFromDate
    ParmVar: SVToDate : Date : ##SVToDate

    Also add below code.

    [Report : RepFixedAsset] ;; Add below 2 lines to by default report view for current date / month
    Set : SVFromDate : $$MonthStart:##SVCurrentDate
    Set : SVTodate : $$MonthEnd:##SVCurrentDate

    Regards,

    Ritesh Mehta
     


  16. vanandd

    vanandd Member


    Dear Mr. Ritesh Mehta,

    I wish to submit my thanks to you...My report is working fine with your help....
    Thanks a lot....
    I hope the same in future also....

    Regards,

    vanandd
     


  17. priya

    priya Member


    I wanted to test this tdl; even after amending your TDL, with the suggestions of Mr. Ritesh Mehta, I am unable to use it. Would you mind providing the TDL. that you found working. Thanking you
     


  18. vanandd

    vanandd Member


    Dear Ms. Priya,
    Please note the following steps,
    1. Load the TDL.
    2. Create a Ledger under Fixed Asset Group.
    3. Make a payment Voucher like Dr. Fixed Asset Group Ledger and Cr. to Cash or Bank
    4. When you select the particular ledger in Payment or Journal, the sub form invoke to get some details regarding the Fixed Asset. Please enter the details and save the voucher.
    5. Open the "Fixed Asset Register", Display --> Fixed Asset Register..
    6. You can see, what ever you entered the details in voucher and this can be filtered by the voucher date wise.

    Note 1 : Why I made Sub form in Payment or Journal ?

    Answer : The user may forget to enter the fixed asset details if, we have separate register.

    Note 2: Why I asked for Date Control ?

    Answer: When you open the report, it will take more time to display the whole period. So, Date control is most important for speed.

    I hope you understand the concept.

    Regards

    vanandd
     


  19. Zain Raza

    Zain Raza New Member


    Dear this code will work in single entry mode:
    [#Field : ACLSLed]
    Sub Form : FixedAssetReport : $$IsPayment:##SVVoucherType AND ($$IsLedofGrp:$LedgerName:"YourGroupName")
     


  20. priya

    priya Member


     


  21. priya

    priya Member


    Mr. vanandd,
    A the outset, I thank you for the detailed procedures involved in operation of the TDL and also your explanatory notes about the logical importance of it. I shall try it, as per your instructions. I bow my head in respect for the care you have evinced, to reply in spite of your daily schedule, and also your anxiety to the members to properly understand and get benefited by the usage of it. Members, such as you, make the forum more useful and highly educative. Bye and a Happy New Year,2015 to you, though belated.
     


  22. chintamani

    chintamani New Member


    Dear All
    I have written a code wherein a sub form is invoked from the first report. Now I want to display a report wherein fields from the main report as well as sub form are to be displayed on one line. I am able to get fields from sub form but not the main form
     


Share This Page