Aceept value from a form and display on a report

Discussion in 'Requests' started by jainitya, Jul 23, 2014.

    
  1. jainitya

    jainitya New Member


    Hi
    I want create a form,accept user value and display it in a new report.
    I have created a sample code for this
    Code:
    [Variable: lConfirmation]
        Type:Number
     
    [#Menu: Gateway of Tally]
        Item: My DialogBox: Alter: Rpt Confirmation
     
    [Report: Rpt Confirmation]
        Form: frm Confirmation
        Variable: lConfirmation
        Set: lConfirmation: 5
        Title: "Confirm"
       
    [Form: frm Confirmation]
        Part: Prt Title, Prt YesNo
        Full Width  : No
        No Confirm  : Yes
        Space Left  : 5
        Space Right : 5
        Space Top  : 3
        Space Bottom: 3
        On:Form Accept:Yes:Display :rptMyReport
        [Part: Prt Title]
            Horizontal Align: Centre
            Lines          : Form SubTitle
            Local          : Field : Form SubTitle : Info : "Are you sure [Yes/No]"
     
        [Part: Prt YesNo]
            Horizontal Align: Centre
            Lines          : ln Confirmation
     
        [Line: ln Confirmation]
            Add: Field: fldConfirmation
     
        [Field: fldConfirmation]
            Use: Number Field
            Set as: ##lConfirmation           
            Modifies: lConfirmation
     
     
    [Report: rptMyReport]
        Add: Form: frmMyForm
    [Form: frmMyForm]
        Add: Part: prtMyPart
        Width: 40% screen
      Height: 50% screen
    [Part: prtMyPart]
        Add: Line: lnMyLine
    [Line: lnMyLine]
        Add: Field: fldMyField
    [Field: fldMyField]
        Set as : ##lConfirmation
    But when I am running it ,it display me the default value,
    while I am asspecting it to show the value entered by the user.

    Can any body please help me for this

    Thanks
     


  2. jainitya

    jainitya New Member


    Can anyone help me on this??
     



  3. Hi Jainitya,

    Use method/udf instead of variables to store values. In your code values are not getting stored anyware hence you facing the issue.
     


  4. jainitya

    jainitya New Member


    Hi Aaradhya
    I do not want to store this value,I just want to show a report based on this input
    For example , as user input as 10 ,it will show the trail balance for last 10 days only
    Do I still used the UDF for this??

    Thanks
     
    Last edited: Jul 26, 2014


  5. mpal2311

    mpal2311 Active Member




  6. Yes as mPal2311 said... :)
     


  7. jainitya

    jainitya New Member


    Hi Now I am trying to do it with UDF, but still not able to get value submitted by user,and also there is no input box is displayed
    Code:
    
    [#Menu: Gateway of Tally]
    
        Add    : Item    : Before : @@locQuit    : Rpt Confirmation    : Display    : Rpt Confirmation
    
    [Report: Rpt Confirmation]
        Form: frm Confirmation
       
       
    [Form: frm Confirmation]
        Part: Prt Title, Prt YesNo
        Full Width  : No
        No Confirm  : Yes
        Space Left  : 5
        Space Right : 5
        Space Top  : 3
        Space Bottom: 3
        On:Form Accept:Yes:Display :rptMyReport
        [Part: Prt Title]
            Horizontal Align: Centre
            Lines          : Form SubTitle
            Local          : Field : Form SubTitle : Info : "Enter Number:"
    
        [Part: Prt YesNo]
            Horizontal Align: Centre
            Lines          : ln Confirmation
    
        [Line: ln Confirmation]
            Add: Field: fldConfirmation
    
        [Field: fldConfirmation]
            Use: Number Field
            Storage:lConfirmation
    
    
    [Report: rptMyReport]
        Add: Form: frmMyForm
    [Form: frmMyForm]
        Add: Part: prtMyPart
        Width: 40% screen
      Height: 50% screen
    [Part: prtMyPart]
        Add: Line: lnMyLine
    [Line: lnMyLine]
        Add: Field: fldMyField
    [Field: fldMyField]
        Set as : $lConfirmation
       
    [System: UDF]
    lConfirmation : Number : 20003
    
    Please suggest where I am doing it incoreectly.
    Thanks
     



  8. use Execute attibute instead of display
     


  9. jainitya

    jainitya New Member


    updated Display with execute ,but still do not get the luck
    Input box is present but do not get the value on report

    Code:
    [#Menu: Gateway of Tally]
    
        Add    : Item    : Before : @@locQuit    : Rpt Confirmation    : Execute    : Rpt Confirmation
    [Report: Rpt Confirmation]
        Form: frm Confirmation
      
      
    [Form: frm Confirmation]
        Part: Prt Title, Prt YesNo
        Full Width  : No
        No Confirm  : Yes
        Space Left  : 5
        Space Right : 5
        Space Top  : 3
        Space Bottom: 3
        On:Form Accept:Yes:Execute :rptMyReport
        [Part: Prt Title]
            Horizontal Align: Centre
            Lines          : Form SubTitle
            Local          : Field : Form SubTitle : Info : "Enter Number:"
        [Part: Prt YesNo]
            Horizontal Align: Centre
            Lines          : ln Confirmation
        [Line: ln Confirmation]
            Add: Field: fldConfirmation
        [Field: fldConfirmation]
            Use: Number Field
            Storage:lConfirmation
    [Report: rptMyReport]
        Add: Form: frmMyForm
    [Form: frmMyForm]
        Add: Part: prtMyPart
        Width: 40% screen
      Height: 50% screen
    [Part: prtMyPart]
        Add: Line: lnMyLine
    [Line: lnMyLine]
        Add: Field: fldMyField
    [Field: fldMyField]
        Set as : $lConfirmation
       
    [System: UDF]
    lConfirmation : Number : 20003
     


  10. jainitya

    jainitya New Member


    can anybody help me on this ??
     


  11. jainitya

    jainitya New Member


    Can anyone Pls help me on this ??
     


  12. mahgs

    mahgs Member


    dear Jainitya

    use Alter attibute instead of Execute
     


  13. nasir

    nasir Member


    Can we use this code as can we fetch deta from report to a single form from udf fields plzzz
     


Share This Page