Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7
This is the forum to discuss the Wrox book Professional SQL ServerReporting Services by Paul Turley, Todd Bryant, James Counihan, George McKee, Dave DuVarney; ISBN: 9780764568787
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 22nd, 2004, 09:20 AM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exclude data base on date???

Iam generating a report to identify items that have not been used in a year. I have a last used date field in the database. How do I excluded from the current date minus one year so only old items appear?

  #2 (permalink)  
Old October 22nd, 2004, 10:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Filter out in your query:

declare @NewDate varchar(10)
set @NewDate = Month(getdate()) + '/' + Day(getdate()) + '/' + (Year(getdate()) - 1)

select ... where @LastUsedDate < convert(datetime, @NewDate)

Brian
  #3 (permalink)  
Old October 22nd, 2004, 12:15 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Iam new to reporting services, how do I do a declare within report services or is this done elsewhere?
Thanks for your response.
Quote:
quote:Originally posted by bmains
 Filter out in your query:

declare @NewDate varchar(10)
set @NewDate = Month(getdate()) + '/' + Day(getdate()) + '/' + (Year(getdate()) - 1)

select ... where @LastUsedDate < convert(datetime, @NewDate)

Brian
  #4 (permalink)  
Old October 25th, 2004, 07:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I wasn't sure where you created the query. This response was more for a stored procedure that the report would execute. You probably can do something similar through a query in reporting services.

Brian
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Base Error anees ASP.NET 1.0 and 1.1 Professional 6 May 27th, 2008 09:02 AM
Data base Format virus220 ASP.NET 2.0 Professional 0 August 10th, 2007 09:37 AM
Data base connectivity watashi C# 2005 8 July 18th, 2007 08:05 PM
Transfering data from csv file to data base g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 2 May 16th, 2006 11:58 PM
Data Base Connection ashraf Javascript 4 November 27th, 2004 06:56 AM



All times are GMT -4. The time now is 04:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.