Hi all!
I tried for days to get a simple export of the UseProfileData, searching also i vain on these forums without any luck. It seems that only one covers this functionality, is a commercial PowerImport&Export-module from DNNEngineers.com (http://www.snowcovered.com/Snowcovered2/DotNetNuke/Modules/Power-Import-Export-v21-DNN-44-/id/11017) So to help others out other reportmodule-users on a tight budget, I publicize a couple of small SQL scripts that works, to enter in the query field of your report module settings:
First map the profile propertynames of your site:
SELECT PropertyDefinitionID, PropertyName
FROM dbo.ProfilePropertyDefinition
ORDER BY PropertyDefinitionID
Next, retrieve the user profile data you want:
SELECT dbo.Users.Username,
dbo.Users.FirstName,
dbo.Users.LastName,
dbo.Users.Email,
dbo.Users.DisplayName,
MAX(CASE WHEN PropertyDefinitionID = 26 THEN PropertyValue END) AS Street,
MAX(CASE WHEN PropertyDefinitionID = 30 THEN PropertyValue END)AS PostalCode,
MAX(CASE WHEN PropertyDefinitionID = 27 THEN PropertyValue END) AS City,
MAX(CASE WHEN PropertyDefinitionID = 29 THEN PropertyValue END) AS County,
MAX(CASE WHEN PropertyDefinitionID = 31 THEN PropertyValue END) AS Phone,
MAX(CASE WHEN PropertyDefinitionID = 32 THEN PropertyValue END) AS Cell
FROM dbo.UserProfile INNER JOIN
dbo.Users ON dbo.UserProfile.UserID = dbo.Users.UserID
GROUP BY dbo.UserProfile.UserID, dbo.Users.Username, dbo.Users.FirstName, dbo.Users.LastName, dbo.Users.Email, dbo.Users.DisplayName
ORDER BY dbo.Users.Username
One MAX(CASE..-line for each UserProfileProperty (the last MAX(CASE-line witout "," comma), replacing the ID# and property name to your site's profile property ID's and property names. (The max(case functionality transposes the one dimensional profiledata to several columns, and does the trick here)
I still haven't figured out a neat way to get the whole dataset exported though, so I set the report modules to display max number of records pr page greater than the number of users, and do the browser copy and paste. Guess there is a free add-in for the reports module here that works, but with small number of users no problem (Tips would be helpful though!)
Hope this is of any help to others muddling through the "info jungle" of dnn.
Regards, OJ, Stavanger, Norway