💡Run SSRS report on MDA mobile
#MDA, #ModelDrivenApp, #Mobile, #PowerFx
Last updated
#MDA, #ModelDrivenApp, #Mobile, #PowerFx
Last updated
Hello friends,
Today, I want to share my thoughts on running SSRS reports on Power App Mobile for Model Driven Apps. A key challenge is the absence of the "Run Report" button in the Power Apps Mobile for Model Driven Apps, which means users are unable to generate reports when needed.
For example, in my case: a worker using Power Apps Mobile to manage Work Orders on the field. Once a Work Order is completed, the worker needs to run the "WOSummary" report to display the Work Order information and confirm it with the client. Without the ability to run this report on the mobile app, the worker faces significant inconvenience and inefficiency.
Here, we can see the difference when opening MDA on the Web/Browser and on Power Apps Mobile.
MDA on Web/Browser: Open the Work Order form, and the "Run Report" button is visible.
MDA on Power Apps Mobile: Open the Work Order form, and the "Run Report" button is invisible.
Considering this restriction, my first thought is to implement a new "View Report" button on the main Work Order form.
You can check my blog post about New modern Command Bar
Okay, I will proceed with my solution and implement it. I'll bypass the step of creating a new command, which you can find in the reference link mentioned earlier.
I will create a new command on the Work Order main form for running the "WOSummary" report on the Selected record. You can see as below.
After creating a button, I modify the PowerFx formula in the OnSelect event: Clicking the "WO Summary" button triggers the system to run a report for the selected Work Order.
Reference link to run an SSRS report by URL: Opening a Report by using a URL
By following the link above, I have tried and edited a URL structure as below.
My sample: Running report "WOSummary" on Work Order entity.
[[ReportFileName]]: WOSummary.rdl
[[ReportGUID]]: 99211b9c-8cde-ee11-904c-0022485a170d
[[EntityTypeCode]]: Work Order (10327) You can find the entity type code by used FetchXML Builder
[[RecordGUID]]: Work Order record GUID
Yeah... 🎉, we already found all the components for URL Structure. Now I will put these to my PowerFx formula.
After that, just Save and Publish this command and test it now...
On my phone, I opened the Power Apps mobile and ran my testing app "NTDyns.Asia" > navigate to Work Orders > and open specific a Work Order record.
Hoping well with my thoughts.
About my command, as my Functional role, I used PowerFx language. But you can use JavaScript to call the action for run reports also.
Thank you for your reading! ☺️ [NTD]yns.asia