web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

insert_recordset using the Query class (query::insert_recordset) work with aggregation for SSRS reports?

(1) ShareShare
ReportReport
Posted on by 86

Hi all 

I'm hoping to get confirmation on this subject please. Using the bulk record set operation, "query::insert_recordset" in the report data provider class I was wanting to aggregate a few fields but can't get it right. I get the error: "There is mismatch between source and target fields for insert_Recordset."

One user suggested using this mapping:

fieldsMapping.insert(

<Target Table fieldStr>,

[ds.uniqueId(), strFmt("SUM(%1)", <Source table fieldStr>)])

e.g. 

strFmt("SUM(%1)", fieldStr(InventTrans, CostAmountPhysical))

but, unfortunately this doesn't work either. 

I've seen many examples where the aggregations are performed after the initial 'query::insert_recordset' using set based operators: 'insert_recordset' and 'update_recordset' but I was hoping to include the aggregations in the initial query. Has anybody managed to do this or have confirmation on whether it is supported or not? 

Thanks in advance

Stephen

*This post is locked for comments

I have the same question (0)
  • Verified answer
    udaY-ch Profile Picture
    5,180 on at

    Hi,

    Similar thread with same question.

    community.dynamics.com/.../209243

    Even in standard i couldnt find any aggregation used is Query::insert_recordset.

    /Uday.

  • Stephen King Profile Picture
    86 on at

    Thanks for the reply Udhaya. I did come across that thread also initially. I think I will need to accept that aggregation is not supported for now. Kind regards

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans