Proper way to pass a date filter value to GenerateReport (Report1.svc)

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I am trying to figure out how to pass a date filter (particularly the entry date filter) to the GenerateReport call in Report1.svc. What is the proper format?

Thanks in advance.

Dan
Photo of Dan Jordan

Dan Jordan

  • 2 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Aashnee Kamboj

Aashnee Kamboj, Community Moderator

  • 1522 Posts
  • 106 Reply Likes
Photo of Dan Jordan

Dan Jordan

  • 2 Posts
  • 0 Reply Likes
Hello Aashnee. Thanks for responding.

I've tried to use the filter as described in those articles. For example, I set up a call to the Timesheet Hours by Day report as follows:



I passed the same report filter URI to the call 3 times, setting the first to "LastWeek" and the other two to empty, since I wasn't specifying any exact start and end dates. Instead of filtering the data, the web service tries to select all timesheet data.

So then I tried passing two dates (being careful to use allowed values from a call to GetAllFilterValueDetails as follows:



Again, the web service tried to select all of the timesheet data. So I'm confused as to what I could be doing wrong. 

I also noticed that the end of the URI for the entry date filter says "entrydatefilter" and nothing indicating a range. I'm not sure whether that has anything to do with the problem, but it was an observation.

Thanks,
Dan
Photo of Aashnee Kamboj

Aashnee Kamboj, Community Moderator

  • 1522 Posts
  • 106 Reply Likes
Hi Dan,

Apologies for the delay in response.

We could observe that the filter selection in the web service is correct. What we could confirm without looking at your JSON snippet is that you have not selected these date filters in the report in the UI. Can you please confirm the same

Thanks,
Aashnee