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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Open SSRS Report From CRM Button Click

(1) ShareShare
ReportReport
Posted on by 2,626

Hello guys,

I have developed few SSRS Report. i want to open that SSRS report based on the user select the record from grid and click the button. i am able to select records but not able to open SSRS Reports. i tried different solution provided by many users over different blogs but no solution. Kindly share your views on this.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Open SSRS Report From CRM Button Click

    Have you added the report through the customizations interface so that the report is available to the user the report button on the ribbon bar for whichever entity you are using?

  • Vikas Gupta Profile Picture
    2,626 on at
    RE: Open SSRS Report From CRM Button Click

    Hello MajorPatrick,

    No, Reports are still under the URL http://<server>/ReportServer, But i can add report in CRM Customization interface. Only thing that i am not able to find that, Open the report from Plugin(C#) on button Click.

    i used below code.

                           using (ReportExecutionServiceSoapClient client = new PaymentDue.ReportExecution2005.ReportExecutionServiceSoapClient())

                           {

                               client.ClientCredentials.Windows.ClientCredential.UserName = "<Username>";

                               client.ClientCredentials.Windows.ClientCredential.Password = "<Password>";

                               client.ClientCredentials.Windows.ClientCredential.Domain = "<Domain>";

                               client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;

                               ServerInfoHeader serviceinfo = new ServerInfoHeader();

                               ExecutionInfo info = new ExecutionInfo();

                               client.LoadReport(new PaymentDue.ReportExecution2005.TrustedUserHeader() { UserName = client.ClientCredentials.Windows.ClientCredential.UserName }, "Sales contract Collection letter 1", null, out serviceinfo, out info);

                           }

  • Community Member Profile Picture
    on at
    RE: Open SSRS Report From CRM Button Click

    Hello.  I don't know how to do it in C#.  I build all my reports in Visual Studio and upload the rdl file to CRM using the customizations interface.  The report is then available on using the Report Button on the Entity Ribbon bar, which then allows to run on selected record or all records.  Using the customization makes it really simply.  Go to reports > New >   Where it says Report Type select Existing file.  Then browse to your rdl file that you created in Visual Studio, Upload, and then fill out the rest of the form.  

    Good luck.  Let me know if you choose this path and need help. 

  • Vikas Gupta Profile Picture
    2,626 on at
    RE: Open SSRS Report From CRM Button Click

    Hello, Actually my scenario is bit twisted. I have 8 reports and want to print 1 report based on Record selection. I am able to select the record and can get the record GUID. Now Based on GUID i want to Print the 1 of the 8 report, This is where i am stuck.

  • Suggested answer
    Preeti Sharma Profile Picture
    2,678 on at
    RE: Open SSRS Report From CRM Button Click

    Hi Vikas,

    You can use a web resource that will be triggered on click of button.

    Additionally you can create a "Report Configuration"  entity (i.e. custom entity). Add field in entity to select record and then pass GUID of record to query string to run report.

    To open report you can use below javascript code:

     function callReport(){

      var rdlName;

               var reportGuid;

               var entityName = Xrm.Page.data.entity.getEntityName();

               rdlName = "Activity_Call_In.rdl";

               reportGuid = "DAC4913-5E4E-E611-80FC-3863BB34FC88";

               var reporturl = Xrm.Page.context.getClientUrl() + "/crmreports/viewer/viewer.aspx?action=run&helpID=" + rdlName + "&id=%7b0" + reportGuid + "%7d";

               var newtab = window.open();

               newtab.location = reporturl;

    }

    For more information please go through following links:

    community.dynamics.com/.../running-a-report-from-a-ribbon-button

    community.dynamics.com/.../know-how-dynamics-365-ssrs-pass-prefiltering-report-parameter-and-open-report-using-url-javascript

    Hope this helps !:)

  • Mahendar Pal Profile Picture
    45,095 on at
    RE: Open SSRS Report From CRM Button Click

    Vikas,

    You need to maintain a kind of logical mapping somewhere and based on that you can run report, Agree with Preeti you can add a custom entity where you can have reports and it's details, or you can also have xml webresource where you can maintain this mapping and based on your record identification logic (on which type of record you want to open which record) you can fetch report and open report.

    Hope it will help you.

  • Suggested answer
    Friyank Profile Picture
    944 on at
    RE: Open SSRS Report From CRM Button Click

    I have my blog Here Which pass parameter to SSRS report. 
    You can attach link to button or any URL text input on form. 
    Make sure In your URL 
    https://orgName.crm.dynamics.com/crmreports/viewer/viewer.aspx?action=filter&helpID=Account%20Overview.rdl&id=%7b2B2A692E-7D04-E711-80E6-00155DB8652A%7d&p:SourceStatus=Value

    Action is set to Run and not filter. 

    Hope it helps 

  • Verified answer
    Vikas Gupta Profile Picture
    2,626 on at
    RE: Open SSRS Report From CRM Button Click

    Hello Guys,

    I found the solution, instead of uploading the Report in CRM and call it from C#. i call  SSRS report directly using below code.

    var acsw_report_link = "http://<Servername>/ReportServer/Pages/ReportViewer.aspx?<ReportName>;

    window.open(acsw_report_link);

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans