Can we add User Define Date Filter on a Report Request Form

shadidiazshadidiaz Member Posts: 15
Is is Possible to add a Temp Varible as Date in the Report Request Form Options) where User can Enter any Date Range
Note: This Variable is not linked to any Tables, However Based on some Logic will be Filter on different Tables in Nav 4.00

Comments

  • taher.bhataher.bha Member Posts: 48
    I would suggest the use of a text var instead of the date var and link it to a textbox and call ApplicationManagement.MakeDateFilter(yourtextbox) on the Onvalidate event
    You can then use the text var as the required date filter
  • shadidiazshadidiaz Member Posts: 15
    Thanks Taher

    I tried your solution i get convertion rror message

    What am I doing Wrong

    Steps
    1 Created a Varivale gTextBolDateFilter Text (50)
    2 Created a TextBox for Variable gTextBolDateFilter
    3 OnValidate TexGApplicationManagement.MakeDateFilter(gTextDateFilter) (Shows Proper Date Filter in the Text Box

    However When Calling the Filter

    SETRANGE(“Sales Header”, “Promised Delivery Date “, gTextDateFilter);

    Also Tried this
    SETFILTER(“Sales Header”, “Promised Delivery Date “,'<=%1', gTextDateFilter);


    I Get error while Compile Type Converstion is ont Possible Date := Text


    Please Help
  • awarnawarn Member Posts: 261
    How about:

    SETFILTER(“Promised Delivery Date “,gTextDateFilter);


    -a
  • shadidiazshadidiaz Member Posts: 15
    SETFILTER(“Promised Delivery Date “,gTextDateFilter);

    Works just Perfect!!!!

    I have one more small issue

    ApplicationManagement.MakeDateFilter(gTextArrivalDateFilter) Give full Year 02/27/2008, However in my Table the year is stored in 2 Digits e.g
    02/27/08 how do I compare the date filter.


    Thanks
    Awarn & Thear
  • shadidiazshadidiaz Member Posts: 15
    User Define Date Filter Solved

    It's not the
    ApplicationManagement.MakeDateFilter(gTextArrivalDateFilter) Call

    Was User Input Issue

    Thanks Again
Sign In or Register to comment.