This project is read-only.
Project Description
Send report in pdf format as attachment in email
is written in c# .net4 for Microsoft Dynamics Crm 2011 on premise users.

The main idea for creating it as console application was the ability to run it with windows task scheduler on a timely basis.
By that the use can deiced when he would like to get the report.

Inorder to run the application you have to:

1 )Update the configuration file to your server settings.
Parameter to change:
<add name="Xrm" connectionString="Server=http://localhost:5555/Basic; Domain=xxxxx; Username=yyyyyy; Password=123456"/>
<add key="DataBaseName" value="Basic_MSCRM"/>
<value>http://localhost/ReportServer/ReportExecution2005.asmx</value>

2) Update/create the xml file with the report/email data.
<?xml version="1.0" encoding="utf-8" ?>
<root>
<configuration>
<email>
<to>yairr@almog.biz</to> /the list of email to send to (must be a systemuser or contact in the crm/
<templatetitle>test1</templatetitle> /* global template name to be used*/
<from>
<id>96F4B715-7C8F-E011-827D-000C2915D26D</id> /the Guid of the sender/
<entityLogicalName>systemuser</entityLogicalName>/the schema name of the sender entity type/
</from>
</email>
<report>
<format>PDF</format> /can be exported also for word/excel etc./
<reportname>test</reportname> /* the name of the report*/
</report>
<attachment>
<filename>test.pdf</filename> /the attachment file name /
<subject>report</subject>/subject name of the note in the crm (attachment)/
</attachment>
</configuration>
</root>
3) Export the report for external use before using the application.
4) run the application with the path to the xml file as argument.

Example:
MSCRMSendReportInEmail.exe c1.xml

Last edited Jul 1, 2011 at 6:57 AM by yairrose, version 1

Comments

No comments yet.