Microsoft CRM 4.0 - Adding a SSRS report to Account

Posted on 2011-04-20
Last Modified: 2012-05-11
I have created an SSRS report and added the rdl to the Reports menu.  It is functioning correctly.

I now need instructions on how to add this report under Accounts > Open an account > Reports > Run on Current Record.

The more step-by-step the instructions the better.  A link would also be good

Question by:apollo7
    LVL 6

    Accepted Solution

    1. On the Reports view, select the report and click Edit Report
    2. Click the browse button next to Display In, add 'Forms for related record types'

    Whether or not the report filters based on the current record depends upon the way the query is built in the report. using an alias starting with CRMAF_ marks a data set as filterable by CRM. For example, your query should be built as follows:

    SELECT *
    FROM filteredaccount AS CRMAF_Acct

    For more information:
    LVL 1

    Author Comment

    I added it to Contacts (it had already been added to Accounts).   When I open a contact, it shows it  as "Run for All Records" instead of "Current Record".

    The weird thing is that for Accounts, it runs for the Current Record so the SELECT *
    FROM filteredaccount AS CRMAF_Acct appears to be added there.

    For contacts, would it be something like  SELECT * FROM filteredcontact AS CRMAF_Cont?

    Thanks for your help
    LVL 6

    Expert Comment

    that's correct. If your report includes multiple tables/views joined together and you want filtering to occur on all, use the CRMAF_ on all...
    LVL 1

    Author Comment

    Thanks - that is very helpful.

    The report is actually based on a stored procedure and then a query in the dataset to add some parameter values.  Would the prefilter go in the dataset query?

    LVL 6

    Expert Comment

    hmmm, that I've never tried. I would think that would do it though.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now