Ten-Minute Tips – Report Writer, Part 2
In part 1 of this 2-part series, I demonstrated how to use the CRM 4.0 Report Writer to create charts that illustrate how your data are distributed across categories. It’s relatively straightforward when you’ve got numeric data that can be “summarized”, but a little less obvious when you don’t.
For example, what if you want a count rather than a sum? Here are some of the more frequent examples I see of this requirement:
- Contacts by sales rep
- Cases by case type or category
- Accounts by industry or territory
The built-in Report Writer doesn’t have a “count” function, so you need something you can sum up. I do this with a custom attribute. Here’s a heuristic step-by-step approach (using the Account by Territory example), that I demonstrate in the video below:
- Create a custom attribute on Account, call it “counter”.
- Give it a type of “int”, max and min values of 1.
- Create an automatic workflow on the create trigger to set the value to 1 for new account records going forward.
- Figure out the best way to populate that value into already existing records (I use a workflow in the video)
- Then create the report, using the same steps I showed in part 1. This figure shows the most important step of the Report Wizard, the “Lay Out Fields” dialog:

Here’s the video. Enjoy!



Anne Stanton Said,
April 30, 2009 @ 12:28 pm
Hey Richard – What video technology are you using? I can’t see the video.
Richard Knudson Said,
May 1, 2009 @ 7:31 am
Hi Anne — it’s actually just an embedded YouTube video. I just checked it and it seems fine, but here’s a link to the actual video where it’s located on YouTube: http://www.youtube.com/watch?v=ATPGi_C_Ew8
Let me know if you can see it now. The actual media file is a standard mp4. And btw, here’s my YouTube “channel” if you’re interested; there are a few other videos I’ve posted up there as well: http://www.youtube.com/user/RichardKnudson
Thanks for your interest!
James Said,
May 17, 2009 @ 2:06 pm
Richard,
Thanks for the great contribution to the CRM community. I built a few sample reports using this technique and it worked great. However, the actual charts themselves have a serious flaw. There are lines on my charts that run right through the middle of the bars and the data label. I don’t see that in your video examples, though, so I am wondering if there is some backend SRS config or switch that you know of.
-James
Richard Knudson Said,
May 18, 2009 @ 4:16 am
Hi James —
I’m glad you got something out of the article, and thanks for your comments!
I don’t think I’ve encountered the issue you mentioned, and I don’t think I had to tweak anything or that there’s anything special about my settings. Here’s a page I put up with the chart settings for the chart I showed:
http://www.dynamicscrmtrickbag.com/chart-settingschart-settings/
Let me know if it helps, or if you want, shoot me an email with your chart settings and I can take a look.
Regards,
Richard
Glenn Said,
August 11, 2009 @ 1:10 pm
Richard – very helpful and well put together. Thanks!
Glenn