Start and end dates in a report | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Start and end dates in a report

I’m pretty new to reporting server, so please forgive me if this is a dozy question to ask. I am using RS2005
I want to write a report giving the user some data dependent on 2 paramerters they enter, startDate and EndDate. I have the query working correctly (select * from datatable where date >= @StartDate and date <= @EndDate), but when I preview my report, I get the errors:
[rsInvalidReportParameterDependency] The report parameter ‘StartDate’ has a DefaultValue or a ValidValue that depends on the report parameter “StartDate”. Forward dependencies are not valid.
[rsInvalidReportParameterDependency] The report parameter ‘StartDate’ has a DefaultValue or a ValidValue that depends on the report parameter “EndDate”. Forward dependencies are not valid.
[rsInvalidReportParameterDependency] The report parameter ‘EndDate’ has a DefaultValue or a ValidValue that depends on the report parameter “EndDate”. Forward dependencies are not valid.
Build complete — 3 errors, 0 warnings
What am I doing wrong?
Dee

Welcome to the forums.
THis means the @variables must be declared before passing report parameters, you can avoid this by:
  1. Go to the Layout tab
  2. Select the Report object in the properties window
  3. Go to the ReportParameters property and edit
    • Move Enddae above Startdate using the arrows

]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |