Pass parameter value to dataset parameter in SSRS 2008

I have a dataset with a parameter that is passed to the request, as shown below.

enter image description here

The problem here is that the DataSet queryOptions parameter queryOptions not accept the value from the Date report parameter.

If I hardcode any value, for example, <CalendarDate> 08/11/2012 </CalendarDate> instead of <CalendarDate> = Parameters!Date.Value </CalendarDate> , the report works fine.

What do I do when passing a parameter.

I even created another dataset parameter named Date and assigned the value of the [@Date] parameter, even if it didn’t work.

Note : Date is of type DateTime

+4
source share
2 answers

Ok, I got this job!

  • I created a new parameter in the Parameters folder as Date and queryOptions . Basically, queryOptions is all I want to use as a query.

  • Then, in the Dataset Properties → Parameters , another queryOption parameter is queryOption .

  • Set the queryOptions value (step 2) to [queryOptions] (step 1).

+1
source

You can try dynamic expression under your parameter value. Something like the following expression:

  ="<QueryOptions><CalendarDate> = "&Parameters!Date.Value.Tostring("MM/dd/yyyy") &"</CalendarDate></QueryOptions>" 
+1
source

Source: https://habr.com/ru/post/1444745/


All Articles