I've created a SQL report using DNNs Report module that pulls user information in the form of a user directory. Anyway, I want to link a column to the View Profile page. What query is used by that page. If you use the Links Module to go to an indivual's View Profile page it creates a userticket query string. (.../ViewProfile/Default.aspx?userticket=AKaVebQ7XtI%3d) Is there another way to access that View Profile page. UserID (below) does not work.
SELECT '<a HREF=/nasdev/Home/tabid/37/ctl/ViewProfile/Default.aspx?UserID=' +CAST(U.UserID AS VARCHAR)+'>'+ U.Lastname+ ', '+U.Firstname +'</a>' AS Associate, U.Lastname AS [Last Name], U.Firstname AS [First Name], R.Rolename AS [Team], '<a href=mailto:'+AM.Email+'>'+AM.Email+'</a>' AS [Office Email], (SELECT PropertyValue FROM dbo.UserProfile WHERE PropertyDefinitionID = '31' AND dbo.UserProfile.UserId =U.UserId) AS [Office Phone], (SELECT PropertyValue FROM dbo.UserProfile WHERE PropertyDefinitionID = '32' AND dbo.UserProfile.UserId =U.UserId) AS [Cell Phone]
FROM Users U
INNER JOIN UserRoles UR on U.Userid = UR.Userid
INNER JOIN Roles R on UR.Roleid = R.Roleid
INNER JOIN Aspnet_users AU on U.Username = AU.Username
INNER JOIN Aspnet_membership AM on AU.Userid = AM.Userid
WHERE R.Rolename = 'NASDEV Associate'
ORDER BY U.Lastname ASC