4

I have a dataset with a parameter as which is passed to a query as shown below.

enter image description here

The issue here is DataSet parameter queryOptions does not accept the value from the Report Parameter Date.

If i hardcode any value e.g <CalendarDate> 08/11/2012 </CalendarDate> instead of <CalendarDate> = Parameters!Date.Value </CalendarDate> the report works fine.

What wrong am i doing while passing parameter.

I even created another Dataset Parameter named Date and assigned Parameter Value [@Date] even that did not work.

Note: Parameter Date is of type DateTime

Community
  • 1
  • 1
Ishan
  • 4,008
  • 32
  • 90
  • 153

2 Answers2

1

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

    =”<QueryOptions><CalendarDate> = “&Parameters!Date.Value.Tostring(“MM/dd/yyyy”) &”</CalendarDate></QueryOptions>”
Aftab Ansari
  • 926
  • 9
  • 17
1

Ok i got this working!

  1. I created a new Parameters in the Parameters folder as Date and queryOptions.So basically queryOptions is everything that i want to use as a query.

  2. Then another queryOption parameter is created under Dataset Properties>>Parameters.

  3. Set value of queryOptions(Step 2) to [queryOptions](Step 1).

Ishan
  • 4,008
  • 32
  • 90
  • 153
  • Hi @ishan it looks like you found a solution to this but I must admit I don't understand your answer. Could you clarify, perhaps provide the same screenshots as you took for your question to show what it looks like now? Would really appreciate it as I'm struggling with the same problem and can't seem to decide what you're saying here sorry! Thanks! – ebooyens Sep 15 '15 at 14:32
  • @ebooyens sorry for that but yes I think i did not put it properly. I worked on this requirement almost 3 years back and i don't have the setup to provide screenshot. What you need to do is, the Parameters itself should form the 'queryOptions' for you and then just set the Parameters you created to the "Parameters of DataSet". – Ishan Sep 15 '15 at 18:25
  • edited my answer. hope it helps. let me know if you need any further explanation on this. – Ishan Sep 15 '15 at 18:32