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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to fire a report from C# plugin in MS CRM 2015

(0) ShareShare
ReportReport
Posted on by

Hi All,

We are trying to execute a report from Button Click. But because of Security Privileges issues we are unable to open the report from Button. We are trying to impersonate User using Javascript but unable to find any solution as it is MS CRM 2015 version. 

Here are my questions now :

How can we impersonate the User using Javascript in MS CRM 2015

Execute the report from C# plugin instead of Javascript (As we have impersonation option directly in Plugin)

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    tw0sh3ds Profile Picture
    5,600 on at

    If impersonation from JS would be possible, it would be really big security issue of Dynamics CRM - every user can run his own JS, so he would be able to act as other users (most preferably system administrator...).

    I don't know your full scenario, but based on the information I can tell that I did this once in CRM 2011 - basically I generated report from plugin and attached it in Note under the entity for which the report was generated (you can then prepare a JS function that will open that file after form reloads)

  • Community Member Profile Picture
    on at

    Can you please let me know how to do it. Or else if you can share few links where I can use it to do it

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    You basically have to generate the report from code and attach it to a note field.

    You can try calling the following code:

    www.codeproject.com/.../call-ssrs-reports-by-using-csharp

    www.c-sharpcorner.com/.../ssrs-report-generation-in-c-sharp1

    You might also try to have the report download to client's machine, but didn't try that with CRM

    As Pawel mentioned, make sure you don't compromise security.

  • ashlega Profile Picture
    34,477 on at

    Wondering what the scenario is? Dynamics is not too friendly when it comes to getting those reports built anywhere other than in the user interface.. Especially if you are planning to go online.. But, then, what I'm wondering about is: if you are planning to let the users see that report anyway, then what is the issue with security you are trying to solve?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans