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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Looking for some help / advice in the reports moduleLooking for some help / advice in the reports module
Previous
 
Next
New Post
5/14/2013 10:17 PM
 

Hi all, thanks for taking the time to look. I am working on building a reports form for my community web page so that we can see who is willing to volunteer. I have a custom user profile property that is a check box called volunteer. I read this page http://www.dnncreative.com/Forum/tabid/88/aft/30954/Default.aspx which helped me figure out how to add custom profile properties to modules.  The problem that I am having is that the report shows all users and under  volunteers it is either true (checked ) or false (unchecked)  where and what do I insert into my code to get this to work? Here is my code:

SELECT
 U.DisplayName,
 U.Email,
 Numerical.PropertyValue AS Numerical,
Street.PropertyValue AS Street,
Volunteer.PropertyValue AS Volunteer
FROM
dbo.udf_UserProfileField('unit') AS Numerical left OUTER JOIN dbo.vw_Users AS U ON Numerical.PortalId = U.PortalId AND Numerical.UserID = U.UserId right OUTER JOIN
dbo.udf_UserProfileField('street') AS Street ON U.UserId = Street.UserID AND U.PortalId = Street.PortalId  join
dbo.udf_UserProfileField
('Volunteer')AS Volunteer on U.UserId = Volunteer.UserID AND U.PortalId = Volunteer.PortalId

 

And here is what is displayed:


I would also like to add a custom property of phone number but want it to display all other info if left blank by the user.
I would appriciate any help! Thanks again for looking!

 
New Post
5/15/2013 6:07 AM
 
Umm I might not be understanding what you want, as you seem to have built the complex part of the SQL already, but wouldn't just adding
" Where Volunteer.PropertyValue ='True' "
to the end of your SQL do the trick?

Also add the custom phone number property to your select statement the same as you did for the volunteer property. Doesn't matter if there is data or not in the field.
 
New Post
5/17/2013 7:41 PM
 
Anna I could Kiss you right now! Maby I was over thinking it and trying to make it too complex what ever the case your string worked! Thanks so much!
 
New Post
5/18/2013 7:49 AM
 

So now that I got over that hurdle (Thanks again by the way) I am working on another report module with what I have learned from your help. the problem is I want it to show only the approved members. I know that you can find approved members by typing in:

(Easy Version)

SELECT 'True' as Approved

from  aspnet_Membership

(Moderate Version)

SELECT

IsApproved

FROM

dbo.aspnet_Membership

where IsApproved='true'

(Long Version)

SELECT dbo.aspnet_Membership.IsApproved 

FROM

dbo.aspnet_Membership
where dbo.aspnet_Membership.IsApproved='true'

But I cant figure out how to join one of those statements to what I currently have as:

SELECT
u.UserName,
u.FirstName,
u.LastName,
u.Email,
Numerical.PropertyValue AS Numerical,
Street.PropertyValue AS Street,
Telephone.PropertyValue As Telephone,
Committee.PropertyValue AS Committee,
Volunteer.PropertyValue as  Volunteer
FROM
dbo.udf_UserProfileField('unit') AS Numerical left OUTER JOIN dbo.vw_Users AS U on Numerical.PortalId = U.PortalId AND Numerical.UserID = U.UserId and Numerical.PropertyValue >= ' '  join
dbo.udf_UserProfileField('street') AS Street ON U.UserId = Street.UserID AND U.PortalId = Street.PortalId  and Street.PropertyValue >= ' ' join
dbo.udf_UserProfileField('Telephone') AS Telephone ON U.UserId = Telephone.UserID AND U.PortalId = Telephone.PortalId and Telephone.PropertyValue >= ' ' join
dbo.udf_UserProfileField('Committee') AS Committee ON U.UserId = Committee.UserID AND U.PortalId = Committee.PortalId  and Committee.PropertyValue >= ' ' Join
dbo.udf_UserProfileField('Volunteer') AS Volunteer on U.UserId = Volunteer.UserID AND U.PortalId = Volunteer.PortalId
 and volunteer.PropertyValue >= ' '

 

I would even be willing to scrap what I have if someone can explain to me how to make something like this work:

SELECT 'True' as Approved

from  aspnet_Membership

Select  UserName, FirstName, LastName, Email

from Users

Select Unit, Street, Telephone, Committee, Volunteer 

from UsersProfile

Basically I just need some advice on how to only show the approved members information. Thanks for any help you can give. 



 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Looking for some help / advice in the reports moduleLooking for some help / advice in the reports module


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