Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2004, 09:20 AM
Registered User
 
Join Date: Sep 2004
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?

 
Old October 22nd, 2004, 10:14 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old October 22nd, 2004, 12:15 PM
Registered User
 
Join Date: Sep 2004
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
 
Old October 25th, 2004, 07:47 AM
Friend of Wrox
 
Join Date: Jun 2003
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





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





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