Report - DateRange

infonoteinfonote Member Posts: 233
Hi,

I have a report where the user enters a daterange e.g. 01/31/08..02/12/08.

User presses run and enters posting date range.
Code wise, How can I get the range entered by the user?

Thanks in advance

Comments

  • tinoruijstinoruijs Member Posts: 1,226
    record.GETFILTER(date)
    or
    record.GETRANGEMIN(date) and record.GETRANGEMAX(date)

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • jonsan21jonsan21 Member Posts: 118
    Just curious, I didn't recall any RUN button anywhere except object designer, yes? :)

    Rgds,

    Jon.
    Rgds,

    Jon.
  • infonoteinfonote Member Posts: 233
    Yes, from the object designer.

    Another similar question.

    You have a range of dates e.g. 01/01/08..12/02/08 stored in a variable.

    Can you filter or truncate the string when there is .. operator?

    Thanks
  • tinoruijstinoruijs Member Posts: 1,226
    infonote wrote:
    Yes, from the object designer.

    Another similar question.

    You have a range of dates e.g. 01/01/08..12/02/08 stored in a variable.

    Can you filter or truncate the string when there is .. operator?

    Thanks

    If the user enters a filter on a date-field, you have to take a look at the functions I already mentioned above.

    Or do you have a field type text which contains the string 01/01/08..12/02/08 ?
    You could take a look at the function STRPOS which returns the position of a string.
    And then use COPYSTR to copy the date before or/and after the ..

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.