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)

Trigger SSRS Report from Plugin

(0) ShareShare
ReportReport
Posted on by 120
Hi Folks!
I have a little Showstopper at the moment and I hope anybody can help me.
I am currently developing a Plugin for a customer which needs to trigger a SSRS report.
I found many solutions while researching, which basically all included the usage of the ReportExecutionService to access the Report Server and execute a certain Report. The problem ist, that I need to add a Service Reference to my Project like http://[servername]/reportserver/ReportService2005.asmx to use the ReportExecutionService. So in my understanding, this Plugin will work als long as it is executed in my Test-enviroment, but won't work anymore, when I deploy it in the customers Organization, because then the Report Server is completely different.
Did anybody faced a similar issue and maybe knows a different way to achieve my goal?
Looks like my only other option is to get rid of the Plugin and do everything via JavaScript which would suck honestly.
Greetings from Germany!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dynamics_Alok Profile Picture
    1,746 on at

    You can do one thing with Plugin Registration Tool .Add your Reporting Service URL in secure configuration for Plugin step and use it in your code.

  • Indika Abayarathne Profile Picture
    671 on at

    I feel the issue is with permissions. Did you check the the user that you are generating the report has enough credentials ti generate the report?

  • Suggested answer
    Kishor Kumar Profile Picture
    3,710 on at

    Check whether the security role of the test environment that you have checked and the client organization are same. because if it works properly in  test not working in prod will be the security issue only.

  • Suggested answer
    Swetha Poojary Salaskar Profile Picture
    326 on at

    Hi,

    I believe your current worry is that reporting service url is different in production and test environment?

    If yes then you can save the url in secured configuration of Plugin registration tool for that plugin step.

    and access that in your plugin.

    Refer below url:

    http://gonzaloruizcrm.blogspot.in/2011/09/adding-configuration-to-plugins-in-crm.html

    srmscrm.wordpress.com/.../pass-parameters-to-plugin-using-secure-or-unsecure-configuration-using-plugin-registration-tool-in-ms-crm-2011

  • R.Seiffert Profile Picture
    120 on at

    I was worried, that when i add some Service Reference pointing to my Testenviroment-ReportServer, my assembly won't work when I later deploy it in the customers System, because the URL's are not accessible from there but it looks like I won't have that problem.

    I'm currently stuck at actually executing the Report.

    I created a Testreport via the CRM Frontend and I am able to call it via http://[reportsvr-url]/[report-name] but I am getting weird Secuity exeptions when I try to access it via C# code.

    It was very hard for me to get any solutions while Googeling, because most of the Code examples covered the runtime creation (including the SQL statement etc.) and execution of a report.

    My plan though is to create an rdl file including the SQL statement and the parameter definition via Visual Studio, upload it into the CRM (which in my understanding then register it on the report server) and then just calling it with the specified parameters.

    Basically like this: social.msdn.microsoft.com/.../running-a-report-deployed-on-reporting-server-from-c

    but from an CRM Plugin.

    So i'm doing something like:

                       // Create a new proxy to the web service

                       rs = new ReportingService2005();

                       rsExec = new ReportExecutionService();

                       // Authenticate to the Web service using Windows credentials

                       rs.Credentials = CredentialCache.DefaultCredentials;

                       rsExec.Credentials = CredentialCache.DefaultCredentials;

    and then using the rsExec.LoadReport method to fetch the .rdl file from the Report Server but i am getting a System.Security.SecurityException with a description which translates roughly to: Error requesting authorization type.

    I have no Idea why this is happening and i'm pretty much stucked at the moment.

    Anybody any idea?

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