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  |  

AspDotNetStoreFront
  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
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.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  SQL Report based on logged in user
Previous Previous
 
Next Next
New Post 2/6/2007 1:45 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/6/2007 5:38 PM
User is offline Andrew Nurse
366 posts
8th Ranked






Re: SQL Report based on logged in user 
The most recent version of the Reports Module (4.4, NOT the same as DNN version 4.4, see this post for details) defines four parameters for every script: @PortalID, @ModuleID, @TabID, @UserID which contain the ID of the active Portal, Module, Tab and User respectively. If you aren't familiar with T-SQL Variables, they are easy to use, just use them as you would a literal value. So in your case you would probably want a WHERE clause like this:

WHERE UserId = @UserId

Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
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.

 


TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk
Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com

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