As I’ve been developing in Microsoft Dynamics CRM, I’ve come to learn that if there’s an issue, chances are it stems from report generation and SSRS. We were developing our new customer portal and as a part of the customizations, it required a report generated from CRM to be displayed on a webpage in the new portal.
We had previously created Actions that generate reports as PDFs and attach said reports to an email. So, that functionality was easy to include in our customizations. Next, we had a request to display the report on the page, which proved to be a bit trickier.
When I was using my internal testing CRM environment, this wasn’t a problem. I had direct access to SQL and SSRS, easily generating the report from the portal and streaming it directly onto the page.
But, not so fast! Our production site is hosted by another company, a company that restricts SSRS access. I’m not an SSRS expert here, and thus won’t be able to get into it, but long story short is that we didn’t have access to the report server from our portal.
So after some time, I decided to forge my own unorthodox path to a solution. I created a workflow that would generate the report as an HTML object, then attach it to the document I was working with. This was all done in the context of the workflow and Dynamics CRM, avoiding any security or authorization issues. Then, from the portal, I would query the attachments/notes on the document, retrieve the HTML report, and insert that into the page in the portal. With the report now being displayed on the portal, I’d clean up by deleting the attachment from the document.
This was admittedly not the cleanest way to go about solving this problem, and I’d love to hear any other ideas people can think of.
Written by Mike Watt, Developer at