We have implemented event management and our customer has a straight forward question: how to export all the event registrations with the sessions they attend and the answers they provided to custom questions.
Of course we are able to export all the individual data with exports etc. and combine the exports. However, that's not easy to handle for the users. Is there any other way to achieve such a requirement?
Hi Marc,
We could build fetchXml query and visualize it into a SSRS report to achieve your requirement.
e.g:
There is an event, we called it Event X, the event has two sessions: Session A, Session B, and three custom registration fields: question 1, question 2 and question 3.
Clofly Mao registered for session A and gave his reponse to questions.
Viktor Mao registered for both session A and session B and gave his reponse to questions.
To make all of them in one table, the dataset would be below:
Contact | Event | Session | Question | Answer |
---|---|---|---|---|
Clofly Mao | Event X | Session A | Question 1 | Lorem |
Clofly Mao | Event X | Session A | Question 2 | ipsum |
Clofly Mao | Event X | Session A | Question 3 | dolor |
Viktor Mao | Event X | Session A | Question 1 | sit |
Viktor Mao | Event X | Session A | Question 2 | amet |
Viktor Mao | Event X | Session A | Question 3 | consectetur |
Viktor Mao | Event X | Session B | Question 1 | adipiscing |
Viktor Mao | Event X | Session B | Question 2 | elit |
Viktor Mao | Event X | Session B | Question 3 | sed |
A response is associated with one event registration record,
but an event registration record will be associated with many session records,
so Viktors' result will be expanded and thus be duplicated.
Below is my test result in console:
Please follow tutorials below to build a report that shows contact name, event name, associated session name, question and answer in same table:
1. Install necessary tools and packages:
2: Guidance for how to use SSRS tools:
https://readyxrm.blog/2018/07/24/how-to-create-your-first-dynamics-365-ssrs-report/
fetchXml:
javascript code to test fetchXml:
var fetchxml = '' '' '' '' '' '' '' '' '' '' '' '' '' ''; var query = "?fetchXml=" encodeURIComponent(fetchxml); Xrm.WebApi.retrieveMultipleRecords("msevtmgt_eventregistration", query).then( function success(result) { console.log('ok'); for (var i = 0; i < result.entities.length; i ) { console.log(result.entities[i]["ContactId@OData.Community.Display.V1.FormattedValue"] " " result.entities[i]["EventId@OData.Community.Display.V1.FormattedValue"] " " result.entities[i]["Session.msevtmgt_sessionid@OData.Community.Display.V1.FormattedValue"] " " result.entities[i]["RegistrationResponse.msevtmgt_customregistrationfield@OData.Community.Display.V1.FormattedValue"] " " result.entities[i]["RegistrationResponse.msevtmgt_response"]); } }, function (error) { console.log(error.message); } );
Regards,
Clofly
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156