how can i get the value from a text box where place at form

impotenceimpotence Member Posts: 20
Hi all,

i am the new hand of NAV , and my company is using NAVision SP 5.1 now.
Now i have design a form(form1) for listing some record of a table according the textbox(text1) which enter the value by the user! and i need to create the report with request form locate at the print button.

how can i get the value of text1 at the request form/option form ?
END is well that all is well ~~~

Answers

  • kinekine Member Posts: 12,562
    You cannot get it from the report, you need to pass it to the report when calling it (and you will need to call it through C/AL code, not through the button properties).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • impotenceimpotence Member Posts: 20
    kine ,

    can you teach me how to do so ?
    END is well that all is well ~~~
  • kinekine Member Posts: 12,562
    1) All depends on details, if the value just filter the records or how it is used.
    2) I recommend some C/AL development class or learning from manuals, collegues, books, internet
    3) Look e.g. on some reports which are started with filled filters or some specific values
    4) Complexity of the task depends on the point 1 answer...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • impotenceimpotence Member Posts: 20
    kine,

    i have try to looking up the answer in internet & books , but still fail ! can you telling me where can i find the answer ?
    END is well that all is well ~~~
  • kinekine Member Posts: 12,562
    If you need more help, I need more details what you are doing, how you are using the field...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • impotenceimpotence Member Posts: 20
    kine,

    i have created a Form : Delivery Order (Form No. 50031) . it will listing the records of Table : Warehouse Shipment ( Table No. 7320) according the value of textbox, and i have assign the variable : CurrentDate ( Data Type : Date) for this textbox ! The default vale for this textbox is workdate + 1D, and the user can change/enter the value as they need. This textbox is used for SETRANGE of the field (Shipment Date) of Table 7320 . This Form is design for Warehouse to arrange the truck team. And i have added a Menu Items button (cause the Warehoue should have several kinds of report they will make the choose). Now , i have create a Report : Delivery List (Report No. 50032) for the printing out the listing records according the Option Form. This Option Form have two textboxs ( FrDate & ToDate) , it let the user to print the records between this two dates.
    The question is ... how can i get the default value of Frdate as same as CurrentDate ( the textbox in Form 50031)? means if the user have changed the value of CurrentDate , and FrDate will get the change too !
    END is well that all is well ~~~
  • kinekine Member Posts: 12,562
    You need to call the report through variable of type report. Add new function into the report e.g. with name SetDate with one parameter of type date. This function will assign the parameter into your variable FrDate.

    In the calling form you will have something like:
      myReportVar.SetDate(CurrentDate);
      myReportVar.RUNMODAL;
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • impotenceimpotence Member Posts: 20
    kine,

    many thx. i have solve my problem with your teaching !
    END is well that all is well ~~~
  • kinekine Member Posts: 12,562
    You are welcome...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.