Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Passing string parameter from one dataset to another fetch xml query(dataset) in Sql Server Data Tools

Posted on by Microsoft Employee

Hi All,

I am creating a report via SQL Server Data tools using fetch xml extension. 

I have a Main dataset.And it's attributes are then displayed in the report. One of those fields is a string attribute named "Customer Identification Number".

I have a Second dataset. Where is fetched Custom Entity which doesn't have any relation to the Entity from the first dataset. (This Custom Entity serves the mapping puropses and is filled by another interface, there are mainly two string fields: 1. Name = Customer Identification Number, 2. Leading  Account Number  

So in my report I have to display for each record which contains Customer Identification Number this Leading Account Number from the second dataset.

What I did is I used  the Lookup function to map the same Customer Identification Number  from both datasets

=Lookup(Fields!custidnumber.Value, Fields!custidnumber.Value, Fields!csp_leadingaccount.Value, "DSIdMapping")

Which is working fine and I see the correct data in my report. I am just worried if in this mapping entity will be for example million records, will my report fetch all of them and then apply the lookup function for the specific record?

Because I have also tried to  fetch the data from second dataset directly for each record using parameter but it didn't work, those are steps I did:

1. Create Parameter of Customer Identification Number from first datasete

2. in Fetch XML query add a condition that the customer identification number should be eq to parameter

3. Same lookup function

Thanks in advance for any suggestions and hints!

Thanks!

*This post is locked for comments

  • Suggested answer
    sandeepstw Profile Picture
    sandeepstw 4,601 on at
    RE: Passing string parameter from one dataset to another fetch xml query(dataset) in Sql Server Data Tools

    HI,

    Read this article, it's quite similar issue as you are looking for.

    community.dynamics.com/.../251802

    Thanks,

    Sandeep

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans