SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 MS Reporting services date parameters
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jonathanr
Starting Member

Australia
11 Posts

Posted - 03/26/2008 :  23:42:34  Show Profile  Reply with Quote
Hi,

Not sure if I will be able to get the answer I need on this forum but hopefully I will!

We have a previous report that uses the code:

AND T1."Decision_Date" BETWEEN '2005-07-01 00:00:00.000' AND '2006-06-30 00:00:00.000' AND T1."Decision_Type_Description"

With this the report was run with the "static" dates, the new report (in MS reporting services) requires that the user be able to enter in the start date range and the end date range.

I have come up with something like:
(T1."Decision_Date" = @Start_Year) AND (T1."Decision_Date" = @End_Year)

But not working. Can anyone assist?

Thanks,

jonathanr

Edited by - tkizer on 03/27/2008 00:06:58

jonathanr
Starting Member

Australia
11 Posts

Posted - 03/27/2008 :  01:12:17  Show Profile  Reply with Quote
OK, have the solution.

SELECT T1.Class_Code, T1.Type_Code, T1.Description, T1.Formatted_Application_Number, T1.Decision_Type_Description, T2.Major_Description,
T2.Minor_Description, T1.Decision_Date AS Expr1, T1.Decision_Date
FROM Application_Facts T1 LEFT OUTER JOIN
Application_Categories T2 ON T1.Application_Facts_Key = T2.Application_Facts_Key
WHERE (T1.Class_Code IN ('APP ')) AND (T1.Type_Code IN ('DA01A ', 'DA12 ', 'DA13 ', 'DA07 ', 'ODA ', 'PLD ', 'DA01 ', 'DA02 ', 'DA03 ', 'DA05 ', 'DA06 ',
'DA10 ', 'DA14 ', 'INT ')) AND (T1.Decision_Type_Description IN ('Approved by Accredited Certifier ', 'Approved ',
'Approved by the Land and Environment Court ', 'Approved under Delegated Authority ', 'Deferred Commencement Consent - Delegated ',
'Approved by Council ', 'Deferred Commencement ')) AND (T1.Decision_Date < @End_Year) AND (T1.Decision_Date > @Start_Year)
ORDER BY T1.Decision_Date
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000