daterangefilter submitting through ReportService1.svc

  • 2
  • Problem
  • Updated 2 years ago
  • Solved
We have a report in Replicon that has the following filters (edited for brevity)

"filterConfiguration": {
"enabledFilters": [
[..] { "displayText": "DateRangeFilter", "uri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter" }, [..] { "displayText": "DepartmentFilter", "uri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;departmentfilter" } ] }

When I look at the FilterValues for this report I see

{
  "reportUri": "urn:replicon-tenant:xyz-gen3:report:77f2a8ca-733f-4a18-b35c-8dae5718fe90",
  "reportFilter": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter" 
}

reports

{
  "d": [
    {
      "value": "Today"
    },
    [...]
    {
      "value": "NextMonth"
    }
]
}

If I submit the report with only a departmentfilter the report runs.
If I add the daterangefilter (with any value) it throws an index out of bounds exception.

See output below.
Has anyone used these filters to success before? Do you see what I am apparently missing?


Failure

request:{
  "reportUri": "urn:replicon-tenant:xyz-gen3:report:77f2a8ca-733f-4a18-b35c-8dae5718fe90",
  "filterValues": [
    {
      "reportFilterUri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;departmentfilter",
      "value": "4"
    },
    {
      "reportFilterUri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter",
      "value": "NextMonth"
    }
  ],
  "outputFormatUri": "urn:replicon:report-output-format-option:csv"
}
response:{
  "d": {
    "error": "Index was outside the bounds of the array.",
    "filterValues": [
      {
        "reportFilterUri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;departmentfilter",
        "value": "4"
      },
      {
        "reportFilterUri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter",
        "value": "NextMonth"
      }
    ],
    "payload": null,
    "reportUri": "urn:replicon-tenant:xyz-gen3:report:77f2a8ca-733f-4a18-b35c-8dae5718fe90"
  } 
}

Success

request: {
  "reportUri": "urn:replicon-tenant:xyz-gen3:report:77f2a8ca-733f-4a18-b35c-8dae5718fe90",
  "filterValues": [
    {
      "reportFilterUri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;departmentfilter",
      "value": "4"
    }
  ],
  "outputFormatUri": "urn:replicon:report-output-format-option:csv"
}
response:{
  "d": {
    "error": null,
    "filterValues": [
      {
        "reportFilterUri": "urn:replicon-tenant:xyz-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;departmentfilter",
        "value": "4"
      }
    ],
    "payload": "User Department Name,Program Name,User Name,Project Name,\"Dec 28, 2015\",\"Jan 4, 2016\",\"Jan 11, 2016\",\"Jan 18, 2016\",\"Jan 25, 2016\",\"Feb 1, 2016\",\"Feb 8, 2016\",\"Feb 15, 2016\",\"Feb 22, 2016\",\"Feb 29, 2016\",\"Mar 7, 2016\",\"Mar 14, 2016\",\"Mar 21, 2016\",\"Mar 28, 2016\",Full Summary\r\nRisk Management,,,,0.00,68.70,76.50,79.00,82.50,78.00,70.00,60.40,77.50,60.50,80.50,25.50,8.40,8.00,775.50\r\n,Productive,,,,65.50,72.50,75.00,77.50,78.00,70.00,60.40,77.50,60.50,80.50,25.50,8.40,8.00,759.30\r\n,,\"Kwan, Allen\",,,37.50,37.50,37.50,37.50,37.50,37.50,30.00,37.50,30.00,40.00,0.00,,,362.50\r\n,,,CAS-Audit on Project Management Framework,,,,,,,,,,,,0.00,,,0.00\r\n,,,ESDC-Imaging,,,,,,,,,,0.00,,,,,0.00\r\n,,,IDRC-ERP,,,,,,,,,,,0.00,0.00,,,0.00\r\n,,,IDRC-Imaging,,,,,,,,,,0.00,0.00,,,,0.00\r\n,,,PWGSC-QAR,,,,,,,,,,30.00,40.00,0.00,,,70.00\r\n,,,PWGSC-QAR-ESDC SOW Review,,,,,,,,,,,,0.00,,,0.00\r\n,,,TACT Group-CGSB Imaging Scoping,,,,,,,,,,,,0.00,,,0.00\r\n,,,WestJet-SOW002-Implementation,,37.50,37.50,37.50,37.50,37.50,37.50,30.00,37.50,0.00,,,,,292.50\r\n,,\"Stephan, Chris\",,,28.00,35.00,37.50,40.00,40.50,32.50,30.40,40.00,30.50,40.50,25.50,8.40,8.00,396.80\r\n,,,CAS-Audit on Project Management Framework,,,,,,,0.00,0.00,,10.00,10.00,,,,20.00\r\n,,,CMHC-Proc. Svcs Review-TA#1,,,0.00,,,,,,,,,,,,0.00\r\n,,,ESDC-Imaging,,,,,0.00,0.50,2.50,12.00,10.00,0.50,0.50,0.50,0.40,,26.90\r\n,,,FCL-Iceberg,,0.00,0.00,,,,,,,,,,,,0.00\r\n,,,IDRC-ERP,,0.00,0.00,2.50,10.00,15.00,10.00,0.00,0.00,0.00,10.00,0.00,0.00,,47.50\r\n,,,IDRC-Imaging,,0.00,0.00,0.00,0.00,10.00,5.00,6.40,15.00,5.00,5.00,10.00,8.00,,64.40\r\n,,,LAO-Privacy Change Order,,,,,,,,0.00,,,,,,,0.00\r\n,,,OPC-Risk Tolerance,,4.00,5.00,5.00,5.00,15.00,15.00,12.00,15.00,15.00,15.00,15.00,0.00,8.00,129.00\r\n,,,PSPC,,,,,,,,,0.00,,,,,,0.00\r\n,,,PWGSC-QAR,,,,,,,,,,0.00,0.00,0.00,,,0.00\r\n,,,PWGSC-QAR-ESDC SOW Review,,,,,,,,,,,,0.00,0.00,,0.00\r\n,,,SSC-TA2,,24.00,30.00,30.00,25.00,,,,,,,,,,109.00\r\n,,,TACT Group-CGSB Imaging Scoping,,,,,,,,,,,,0.00,0.00,,0.00\r\n,,,,0.00,3.20,4.00,4.00,5.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,,16.20\r\n,,\"Kwan, Allen\",,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,,,0.00\r\n,,,Internal - RM,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,,,0.00\r\n,,\"Stephan, Chris\",,,3.20,4.00,4.00,5.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,,16.20\r\n,,,IDRC - Electronic Documents Process Redesign,,3.20,4.00,4.00,5.00,,,,,,,,,,16.20\r\n,,,Internal - RM,,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,,0.00\r\nFull Summary,,,,0.00,68.70,76.50,79.00,82.50,78.00,70.00,60.40,77.50,60.50,80.50,25.50,8.40,8.00,775.50\r\n",
    "reportUri": "urn:replicon-tenant:xyz-gen3:report:77f2a8ca-733f-4a18-b35c-8dae5718fe90"
  } 
}
Photo of Paul Saker

Paul Saker

  • 4 Posts
  • 1 Reply Like

Posted 2 years ago

  • 2
Photo of Aashnee Kamboj

Aashnee Kamboj, Community Moderator

  • 1522 Posts
  • 106 Reply Likes
Hi Paul,

Thank you for using Replicon Community!

You will have to do the following:



Call the Date Range Filter thrice. One for the default value like next month next week etc. and two for the custom date range. So if you fill the default one leave custom date range empty and if you fill the custom date range keep the default one empty.

Hope this resolves the issue.

Thanks,
Aashnee
Photo of Andrew Paterson

Andrew Paterson

  • 4 Posts
  • 2 Reply Likes
A very timely response as I encountered this issue today and this post resolved. I'd suggest this be added to product documentation somewhere as this is not a very obvious solution, and for reports it's not possible to use Fiddler to review the services being fired as in other aspects of the application.
Photo of Paul Saker

Paul Saker

  • 4 Posts
  • 1 Reply Like
Aashnee,
Many thanks. 
I did try 2 instances of the daterangefilter (assuming a startdate/enddate scenario) but I never thought of trying 3.  
This does resolve my issue. Wow, 3 instances of the filter...

{
      "reportFilterUri": "urn:replicon-tenant:a-hundred-answers-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter",
      "value": "LastWeek"
    },
    {
      "reportFilterUri": "urn:replicon-tenant:a-hundred-answers-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter",
      "value": null
    },
    {
      "reportFilterUri": "urn:replicon-tenant:a-hundred-answers-gen3:report-filter:2ab5b02b48324020b18c27ecf3cf3be0;daterangefilter",
      "value": null
    }
Photo of Nitin bhardwaj

Nitin bhardwaj

  • 5 Posts
  • 0 Reply Likes
Hi Aashnee,

I was facing the same issue today. I am using the date range filter as well and it doesn't seem to be working properly. I have also tried 3 instances of date range filter. I am trying to filter timesheet report on "submittedondaterangefilter". Still no success.

Thanks
Nitin
Photo of Aashnee Kamboj

Aashnee Kamboj, Community Moderator

  • 1522 Posts
  • 106 Reply Likes
Hi Nitin,

May I please know the report type of your report?

Thanks,
Aashnee
Photo of Nitin bhardwaj

Nitin bhardwaj

  • 5 Posts
  • 0 Reply Likes
Hi Aashnee,

I am using Timesheet Day Template under Category Timesheet.
Photo of Aashnee Kamboj

Aashnee Kamboj, Community Moderator

  • 1522 Posts
  • 106 Reply Likes
Hi Nitin,

Please help us with your request and response.

Thanks
Aashnee
Photo of Nitin bhardwaj

Nitin bhardwaj

  • 5 Posts
  • 0 Reply Likes
Hi Aashnee,

I am in touch with Replicon Support on this issue. And they sent me this email:
"Hi Nitin,

This is a follow up email for case# 00827522."

Any chance you can look up the problem in your system? Sorry I am unable to recreate the same problem at the moment. If you are not able to do so, I can post request and response later.

Thanks
Nitin
Photo of Aashnee Kamboj

Aashnee Kamboj, Community Moderator

  • 1522 Posts
  • 106 Reply Likes
Hi Nitin,

I see that the Support Rep has asked for Remote credentials. I would also like to point out that you can use Web Services only if you are an administrator or you are logged in using Admin credentials. 

I request you to help the Representative with the remote credentials and I am sure the issue will be resolved. 

Thanks,
Aashnee