views:

348

answers:

1

I have an SSRS report, deployed via CRM, that is meant to display information only related to a single entity instance (in this case, an individual Account). I am aware that I can use pre-filtering and also change the settings of the report to only display on "forms for related record types".

However, when using pre-filtering, even when generating the report from the form of a specific entity, the user can still edit the filter so that the report could potentially attempt to display information for more than one entity instance. Is there any way to either get CRM to pass the entity ID to the report or to lock down the filter criteria so that it would be impossible for the user to make the report try to select more than 1 record? I know I could use something like "top 1" in my query, but this just seems kind of clunky. Also, since the report is meant to only display information related to a single entity record, having a filter that would allow for multiple records to be selected just doesn't make a lot of sense. For example, allowing the user to define a filter to select something like "all Accounts modified in the last 30 days" makes no sense at all, because the report should only be displaying data for a single account.

If this were a typical SSRS report, I would simply define an "id" report parameter and pass it in the URL query string, but unfortunately CRM doesn't give you the flexibility to do something like this.

A: 

There are a few ways to do this and you've already mentioned one, which is to pass the ID in the querystring. You'll need to create an ISV button with a javascript link that grabs the crmForm.ObjectId and then opens a new window with the value appended to the report URL.

I've also done this by creating an aspx page to do the filtering and return a PDF of the report. Either way works.

Focus
I should have added that I would prefer to have the report show up in the "Reports" menu on the entity form. I am aware that I could deploy the report directly to the report server and then create a button in the ISV.config to link to it, but that's not really what I want if I can avoid it.
Justin Holzer