2016-09-20



Dynamics CRM is chock-full of nifty features to help enable the sales processes at large organizations, however, one area that sometimes requires deeper configuration is quoting and the document generation functions packaged with quoting. In today’s blog, we’ll dive deeper into this topic.

There are typically two choices: Mail Merge or SQL Reporting Services.

The choices get more complex if you want more functionality, like a fully-baked third party document management solution, SharePoint integration, quote emailing capabilities, etc. For today, we’ll focus on one scenario, which is using rich text formatting in SSRS output documents.

The Use Case

Consider this use case scenario. Say you want to control the formatting of your quote outputs to customers, but at the same time provide your team with the ability to add formatting to the document. You want hyperlinks, bulleted text, and bold line items in your quote. Unfortunately, you can’t do that out-of-the-box in CRM with the quote entity, because there is no “rich text” or WYSIWYG editor control.

You could use Word Mail Merge, but you’d have to train everyone how to do that as well as run the risk of losing all control over the content and formatting of the document, letting anyone send anything to the customer without any traceability.

The typical choice in this scenario is to use SSRS to handle the Quote output document, but CRM and SSRS don’t let you do configurable rich text, right? Wrong!

Enter TinyMCE

By leveraging the TinyMCE framework, you can add a nifty control that is visible on the CRM UI to allow users to create HTML formatting and save it to a CRM text area. You can code your own TinyMCE HTML web resource or use something out there in the series of tubes. If you choose the latter, being a control sourced from CodePlex, you should perform extensive testing before you release it to a production system.

Once the TinyMCE control has been added to the form (here’s how, if you choose the CodePlex solution), your users will be able to create and edit rich text content on the CRM form and store it to a field in your Quote entity (or any other entity).



Now that CRM is storing the HTML content entered by your users, it’s time to map it to the output document. SSRS has a control in SSRS 2008 R2+ that’s referred to as a placeholder. The placeholder control also has an option called “HTML – Interpret HTML tags as styles” which renders the content of the placeholder as HTML. By configuring “Placeholder Properties” and checking the “HTML – Interpret HTML tags as styles” option, the RDL file will treat the content of that placeholder control as HTML, and render as such.



Now, all of your HTML tags generated via the TinyMCE control will be passed to the SSRS report. More information on using HTML in your SSRS can be found on MSDN here.

Once you’ve added the control to CRM, users can enter rich text using the WYSIWYG editor in CRM so that your SSRS output documents print with the desired formatting.

Some things to keep in mind:

Copy and paste may or may not produce the results your users expect, but it does work.

The TinyMCE control will let you add HTML via WYSIWYG editor, but HTML tags take up characters. The default text area size is 2,000 characters, which may not be large enough if you add a lot of text. Consider increasing that size.

The control lets you add HTML table tags, but those tags don’t carry forward to SSRS due to SSRS limitations with printing tables via HTML tags. If you add a table in CRM via the TinyMCE editor, it will not render on the report and the tags wills trip out and you’ll be left with the text inside the cells.

Hopefully this solution gives you some things to consider as you ponder the world of rich text quote output documentation. Now, head over to our events page to check out the latest and greatest CRM trainings coming to an area near you!

Happy CRM’ing!

Show more