views:

183

answers:

1

Hi,

I'm currently developing a set of reports for Microsoft CRM. I'm using Visual Studio 2005 to create and design the RDL files from my local development machine which sits on a different network from the client. I have access to the CRM database through VPN and by using a SQL Server user logon which is not an Active Directory user setup within the CRM.

I need to use the filtered views from the CRM database but as I'm not logged in as an active directory user whilst I'm connected from Visual Studio I do not receive any results from my queries.

I've seen the solution some people have suggested whereby you use "EXECUTE AS USER = 'domain\user'" before performing the lookup but I cannot use a remote domain user as I get the following error upon querying:

"Cannot execute as the database principal because the principal "DomainEx\usernameEx" does not exist, this type of principal cannot be impersonated, or you do not have permission."

Can someone please provide me some guidance on how to use the filtered views during report development when you are not in the local domain context?

+1  A: 

I have access to the CRM database through VPN and by using a SQL Server user logon which is not an Active Directory user setup within the CRM.

In order to query against the filtered views you NEED to do so as an active directory user that is in CRM using Windows Authentication. A SQL authenticated session won't work. Try developing your reports against the views and once you get the look and feel right simply rename the views to filtered views and then deploy. That'll be the easiest way to get this done.

Focus
That's what I'm currently doing but the filtered views take care of many other joins, especially things like new linked attributes etc.Without the filtered view I'm finding that I have to rewrite lots of SQL logic which is already present in the filtered view.
Brian Scott
I feel your pain. Do you have a spare HD laying around that you could put a VPC on and simply import the system customizations into? You can get a demo VPC from partnersource if you're a microsoft partner.
Focus