Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

DateTime Dialog Filtre SSRS Report filter

Posted on by 65

Hi,

I have a problem with the DateTime Type parameter in the contract class, when I select a value in the DateTime filter, in the DP class it retrieves the selected date minus one day


Thanks much.

3678.A.png0317.B.png6403.C.png

  • AlaaBa Profile Picture
    AlaaBa 65 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    Thanks for your help

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    Yes. That's what you would need to do if you are applying filters to date and time fields separately.

  • Verified answer
    AlaaBa Profile Picture
    AlaaBa 65 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    I solved the problem with this class : DateTimeUtil :: applyTimeZoneOffset (contract.parmDateTimeFrom (), DateTimeUtil :: getCompanyTimeZone ())

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    Since these are date and time fields (separately), I am assuming you are breaking this into date and time?

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    Good to know. Could you now share your code? Assuming you still need help with your functionality.

    Thanks!

  • AlaaBa Profile Picture
    AlaaBa 65 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    Hi,

    it is a filter at the level of the RetailStatementJour table on the TransFormDate and TransFormTime fields

  • nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    When you share code, could you please click "Use rich text formatting" -> "Insert" -> "Code". This way it's easier to read. Thanks!

    Anyway, your current code is throwing an error so the report processing is halted. Perhaps that explains why it doesn't work for you.

    I don't see any code that would filter any records - did you forget to share that part?

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    Hi,

    Where are you using the date time value? Retail statement Jour has two fields date and time.

  • AlaaBa Profile Picture
    AlaaBa 65 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    [

       SysEntryPointAttribute

    ]

    public void processReport()

    {

       RetailStatementJour    retailStatementJour;

       contract               = this.parmDataContract() as PMsalesVoucherContract;

       throw error(strFmt("%1", contract.parmDateTimeFrom() ));

    }

    [

       DataMemberAttribute('datetimeFrom'),

       SysOperationLabelAttribute(literalstr("@SYS35905")),

       SysOperationDisplayOrderAttribute("3")

    ]

    public fromDateTime parmDateTimeFrom(fromDateTime _datetimeFrom = datetimeFrom)

    {

       datetimeFrom = _datetimeFrom;

       return datetimeFrom;

    }

  • AlaaBa Profile Picture
    AlaaBa 65 on at
    RE: DateTime Dialog Filtre SSRS Report filter

    I displayed the value retrieved by contract class.

    Here is the code that executes the message.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans