locked
Creating a report as a PDF attachment in CRM 2011 Online RRS feed

  • Question

  • I would like to do the following:

    -          I am writing a plugin for CRM 2011 Online.

    -          Within the plugin I am creating e-mail messages.

    -          I would like to add an attachment. The attachment should be a pdf file: the output of a CRM report.

    -          The question is: how can I run a report within the plugin and get the result as a pdf (as a byte array) to be able to attach it to an e-mail. The main point is that it should work in CRM Online.

    • Moved by Chris Wirth Monday, August 15, 2011 7:27 PM (From:Dynamics CRM)
    Sunday, August 14, 2011 11:22 AM

Answers

  • Hi,

    As CRM online would not allow you to access SQL Reporting Services report via web service and in this case you can not access report contents and export report in pdf format progamtically, i would suggest you the following although it will be not an easy job:

    1. Create Report in Crystal Report or any other reporting program that can export report in pdf

    2. Create console application or windows service schedule it on your company local server to run at a specific time for sending report

    3. In Console Application or Windows Service fetch data from CRM online and pass to the crystal report or any othe rreporting app and then convert into PDF then create email in CRM online, attach pdf file and send email.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Saturday, August 20, 2011 12:07 AM
  • Hi

    This might get you some of the way but is a manual process from the entity tool bar

    http://downloads.mycrmgroup.com/ePDF.aspx

    Alisatir

     

    Thursday, January 19, 2012 2:40 PM

All replies

  • Plugin are generally trigerred when ever a row is created.  Reports scheduling is not available in CRM online...which is not good.

    Try to Schedule resources in creating a row which eventually kickstarts to generate report.

    Workflow helps in creating a row and schedule services...which may help to sort your problem.


    SAMA
    Friday, August 19, 2011 3:50 PM
  • I doubt this is feasible.

    There are code samples kicking around the web that demonstrate how to generate PDF reports from within a CRM plugin, but they rely on direct access to the SQL Server Reporting Web Service; you cannot gain access to it in CRM Online.


    --pogo (pat) @ pogo69.wordpress.com
    Friday, August 19, 2011 8:12 PM
  • Hi,

    As CRM online would not allow you to access SQL Reporting Services report via web service and in this case you can not access report contents and export report in pdf format progamtically, i would suggest you the following although it will be not an easy job:

    1. Create Report in Crystal Report or any other reporting program that can export report in pdf

    2. Create console application or windows service schedule it on your company local server to run at a specific time for sending report

    3. In Console Application or Windows Service fetch data from CRM online and pass to the crystal report or any othe rreporting app and then convert into PDF then create email in CRM online, attach pdf file and send email.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Saturday, August 20, 2011 12:07 AM
  • Hi All

    Yes it is possible as we did it with this http://downloads.mycrmgroup.com/epdf.aspx

     

    Alisatir

     

    Friday, September 16, 2011 3:06 PM
  • Hi

    This might get you some of the way but is a manual process from the entity tool bar

    http://downloads.mycrmgroup.com/ePDF.aspx

    Alisatir

     

    Thursday, January 19, 2012 2:40 PM