locked
Add user generated dates to filter on RRS feed

  • Question

  • User-177021704 posted

    I have several charts that SSRS is generating, I also have a filter that user can interact with all reports, in that when a user is selected from this drop down all charts displayed on the report are altered. 

    Ideally I'd like to create a date filter that also changes all charts (they all have the same date field, so it should be doable).

    Thus far I have tried creating a new data set and then adding the parameters to the other data sets I have,  however when ever this is added and I am previewing the report I get an error:

    The report parameter 'startDate' has a defaultValue or a VaildValue that depends on the report parameter.

    The query I am using to try and filter on is:

    SELECT
      ,CaseDetails_AllReports.Creation_Date
    FROM
      CaseDetails_AllReports
      where CaseDetails_AllReports.Creation_Date
      BETWEEN @startDate AND @endDate

    Really stuck on this one. Any one that can point me to a guide or someone who can help I would be forever grateful.

    Background tech: using SQLserver 2008 r2 express 

    Wednesday, February 27, 2013 2:20 AM

All replies

  • User-917364509 posted

    I may have misunderstood the question here but can't you just add two report parameters for the startdate and the enddate to be used in the filtering?

    <ReportParameters>
    	<ReportParameter Name="startDate">
    		<DataType>DateTime</DataType>
    		<DefaultValue>
    		<Values>
    			<Value>=Now</Value>
    		</Values>
    		</DefaultValue>
    		<AllowBlank>true</AllowBlank>
    		<Prompt>StartDate</Prompt>
    	</ReportParameter>
    	<ReportParameter Name="endDate">
    		<DataType>DateTime</DataType>
    		<DefaultValue>
    		<Values>
    			<Value>=Now</Value>
    		</Values>
    		</DefaultValue>
    		<AllowBlank>true</AllowBlank>
    		<Prompt>EndDate</Prompt>
    	</ReportParameter>
    </ReportParameters>

    Monday, March 18, 2013 8:59 AM