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
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  SQL Report based on logged in user
Previous Previous
 
Next Next
New Post 2/6/2007 1:50 PM
User is offline binaryjunky
7 posts
10th Ranked


SQL Report based on logged in user 
I have a site setup to take online orders, I wanted to drop in the reports module and run an SQL query that will display all the products that particular user has ordered? I'm no SQL guru and make most of my queries in visual editor, how do I put it in sql so the report only picks up the user ID of the current user and not all of them?

Many thanks, If you can help me with just dynamically getting the user ID I will probably be able to figure out the rest.
 
New Post 2/19/2007 8:46 AM
User is offline Tony Thompson
102 posts
9th Ranked


Re: SQL Report based on logged in user 
I believe your looking for the @UserID parameter. It returns the currently logged in user ID. Place a statement similiar to this into your SQL - "WHERE OrderUserID = @UserID"

OrderUserID is whatever the field in your table is that contains who ordered the item.
 
New Post 2/19/2007 11:36 AM
User is offline Mitch Sellers
5719 posts
www.mitchelsellers.com
3rd Ranked




Re: SQL Report based on logged in user 

That will do what you want.  I would be sure to test the functionality out quite well first however to ensure that you don't have any issues with non-authenticated users if they have access to that page.


-Mitchel Sellers
MCITP, MCPD, MCTS
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Consulting Quotes, and DNN Technical Support Services

I reccomend 3Essentials for shared hosting and BaseCamp for project management
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  SQL Report based on logged in user
 


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.

 


OnyakTech
Modules for Help Desks, Live Chat, Project Management, CRM, Charting, Reporting, Scrolling Text/Images, Portal Community tools and much more.
www.OnyakTech.com
IHostASP.NET Provides the Ideal DNN Hosting
We will help you with the installation, configuration, and troubleshooting of your DNN portal, no task is too big or small for us. Unlike other companies we are not just providing a reliable hosting service, but we are also focused on providing the best DotNetNuke hosting service on the internet.
www.ihostasp.net
$7.16/mo - Powerful DotNetNuke / DNN Hosting
Powerful DotNetNuke / DNN Hosting on Windows 2008 and 2003 servers, starting at under $8/mo with FREE SQL 2008 on certain plans and FREE SQL 2005 on all plans with FREE Installation and expert support.
www.re-invent.com

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