Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  Simple UserProfileData export
Previous Previous
 
Next Next
New Post 7/15/2008 11:56 PM
User is offline OJ
7 posts
10th Ranked


Simple UserProfileData export 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  Simple UserProfileData export
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


AFUEGO!
Looking for Free DNN Hosting?
www.AFUEGO.com
Code 5 Systems, LLC.
The DNN Missing Link: A Form Module. Form Master 1.6 is an intuitive Form Creation Module at a great price. Quality Custom Module development, and DNN consulting services.
www.code5systems.com
SSL Enabled and Amazingly FAST...
SSL enable your DNN web site with SSLRedirect, compress your DNN web site HTTP data flow by up to 75%-90% with HttpCompressionAgent, and monitor your DNN web site's performance with WebKeepAlive...
www.sanibellogic.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP