CRM Blog

Thursday, April 16, 2009 - Posts

The Other Blue Screen of Death: the Blank Report Pre-Filter
by Shelley Lane 04.16.09

Comments    No Comments

Upon opening a report with a pre-filter, you expect to be presented with a query builder that will allow you to search for accounts, contacts or other CRM entity by location, owner, or any other field on the respective entity. Something that looks like this:

 

What do you do then, when instead you see this (and only this. Nothing's loading. It's "Done."): 

The pre-filter is blank and there doesn't seem to be an error anywhere. Attempting to "Edit the default filter..." results in the same empty, blue screen. In this case, the filter was loading correctly in the past, but now something is clearly wrong.

Let's go back to what the pre-filted should look like. It should allow users to filter Accounts by specific Account, Address 1, Category, or a custom attribute called Rating. After minutes of trying to connect the mental dots, I realized that I intentionally deleted one of the Rating attribute because it was no longer needed. Ah ha!

Turns out that, although CRM will not allow you to delete attributes that are on a published form, you are able to delete an attribute that is used on a report pre-filter. However, the fact that the attribute has been deleted keeps the pre-filter from being rendered.

To fix this, there are a couple of options.

If you know the name of the attribute the filter can't find, you can simply create a dummy attribute with that name, publish the entity with your attribute, edit the report's default filter and remove the dummy attribute from the report pre-filtered. Delete the dummy attribute from the entity and all it well again.

If you don't know the name of the attribute or would just like an excuse to dig around in the database, you can also edit the report filter's XML.

In your organization's CRM database, there is a table called ReportBase. Opening that table, you'll find all of the versions of the reports that are available or were available. To figure out which report you're working with, grab the GUID from the URL of the report pre-filter and query the ReportBase table for the record with that ReportId. That record will have a DefaultFilter field, which contains the pre-filter's XML. Once formatted correctly, it should look something like this:

 

To get the my report pre-filter to render, I can remove the element specifying the deleted attribute as a condition, in this case the line containing "new_rating." Once I've done that I can simply copy the XML back into the DefaultFilter field for that report and the pre-filter will render.

Although this fix is a little in-depth and should only be attempted by those very comfortable with the CRM database, it is a workaround if you're in a bind and do not want to have to re-create a report.

Filed under: