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  |  

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


  Ads  
Biz Modules provides professional business modules and solutions for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


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
9 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.

 


XCESS expertise center b.v.
Custom made modules and complete solutions for the DNN framework. Maatwerk modules en complete webtoepassingen gebaseerd op het DNN framework.
www.xcess.nl
EMAS Pro
Strategic Enrollment Management Software for Higher Education Recruitment, Retention and Financial Aid
www.emaspro.com
Subzero Solutions
Dutch / English DotNetNuke consultancy services. Custom module development in any version. Complete application integration. Small business portal hosting. Your ideas our innovation - Your success our motivation. K.v.k Amsterdam: 34236342
www.subzero-solutions.net

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