by Pieter Brinkman
25. August 2009 03:22
For this example I will use the default asp.net Membership tables.
Let say: I need to return all users with their roles (comma separated) in one query. After a long time Googling I found the following solution.
[code:tsql]
select
UserName,
(select roles.RoleName + ', '
FROM aspnet_Roles roles
join aspnet_UsersInRoles usersInRole on roles.RoleId = usersInRole.RoleId
WHERE usersInRole.UserId = aspUser.UserId
for xml path('')) as roles
from
aspnet_Users aspUser
[/code]
Don't know if this is the best way, but it works.
by Pieter Brinkman
11. June 2009 06:34
You can set the culture of a report by clicking the report and setting the Language property. If you want to support multiple cultures you can set the property to =User!Language .

by Pieter Brinkman
3. March 2009 04:23
When deploying a project to a internal test server I got the following error:
The definition of the report 'Main Report' is invalid.
An unexpected error occurred in Report Processing.
Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Fix this by adding a reference to ProcessingObjecdtModel.dll in you project. You can find the ProcessingObjecdtModel.dll in the GAC. The problem with the GAC is that you can't copy the .dll from the GAC using Windows Explorer. But you can copy the DLL with Command Prompt (cmd.exe).
To do this:
-
Run -> cmd.exe
-
cd C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\ 9.0.0.0__b03f5f7f11d50a3a
-
copy Microsoft.ReportViewer.ProcessingObjectModel.dll c:\locationFolder\
This action will look like this:
Copy the Microsoft.ReportViewer.ProcessingObjectModel.dll to your Bin folder or at a reference to the assembly.
Hope it helps,
Pieter
by Pieter Brinkman
26. June 2008 08:03
Execute the next query to enable CLR.
-- Turn advanced options on
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
-- Turn advanced options back off
EXEC sp_configure 'show advanced options' , '0';
go
More info about CLR on Microsoft MSDN.