Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsSimple UserProfileData exportSimple UserProfileData export
Previous
 
Next
New Post
7/16/2008 2:56 AM
 

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

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsSimple UserProfileData exportSimple UserProfileData export


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out