BLOG

Add Date Range Dataset in Reporting Services

19-12-2018  0 Comment(s)

1. Under Report Data on the Left-hand side of the report designer, Right-click on Datasets:

2. Click on Add Dataset and enter the following information:

  • Name = DateRange
  • Select "Use a dataset embedded in my report."
  • Datasource = Database for the report
  • Query Type = Text
  • Query = Copy and paste Select Statement from code sample below - "SELECT GETDATE() as Today..."
  • Finally, Click the OK button

3. Right-Click on Parameters and click "Add Parameter...":

4. Enter the following on the "General" tab:

  • Name = StartDate
  • Prompt = Start Date
  • Data type: Select "Date/Time" from the dropdown list
  • Select parameter visibility: Visible

5. Enter the following on the "Default Values" tab:

  • Select Get values from a query
  • Dataset = DateRange
  • Value field = Choose the Start Date from of the date range from the dropdown list. Note: I have selected FirstDayofLastYear for this example.
  • Click the OK button

6. Right-Click on Parameters and click "Add Parameter...":

7. Enter the following on the "General" tab:

  • Name = EndDate
  • Prompt = End Date
  • Data type: Select "Date/Time" from the dropdown list
  • Select parameter visibility: Visible

 

Comment Here

Comments

No Comments to Show

WE ALWAYS WORK WITH :