Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Cannot use Lookup function in SSRS report in D365 F&O

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

I have created a SSRS report based on D365 F&O which contains three datasets. Everything works fine until I try to use Lookup function in SSRS. For simplicity consider I have a field named "Item Id" in Main Dataset (Applied on the tablix). In another dataset say "SecondaryDS" I have a field named "ItemId". I am matching the Item Id field in both datasets to fetch Name field from the "SecondaryDS".

This is a normal case for a SSRS Lookup function. In the Textbox box I have created the following expression.

=Lookup(Fields!ItemId.Value, Fields!ItemId.Value, Fields!Name.Value, "SecondaryDS")

The expression does not show any error but when I try to deploy the report I get the following error. Have anyone faced similar sort of issue. If yes please let me know 

pastedimage1675903282139v2.png

PS: I have done a workaround for solving my problem but I am just curious about how we will get this lookup function to work.

  • Verified answer
    huijij Profile Picture
    huijij 19,811 on at
    RE: Cannot use Lookup function in SSRS report in D365 F&O

    Hi Noman,

    Thanks for your detailed issue description. In order to better investigate the cause of the error. It is recommended you create a support ticket for professional assistance following the below procedure.

    Help + support | Power Platform admin center (microsoft.com)

    Best Regards, 

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Cannot use Lookup function in SSRS report in D365 F&O

    I too tried using the lookup method and got the same error.

    I don't know the reason for that. But in future if you find solution to this please post the answer here which will be helpful for others.

    If I find the solution in future I will update this thread.

    Thanks,

    Girish S.

  • Noman Rasheed Profile Picture
    Noman Rasheed 5 on at
    RE: Cannot use Lookup function in SSRS report in D365 F&O

    Hi Girish

    Yes I have double checked it matches with DS name.

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Cannot use Lookup function in SSRS report in D365 F&O

    Hi Noman,

    Can you double check whether the dataset name "SecondaryDS" match with the dataset name under SSRS report dataset node.

    Thanks,

    Girish S.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans