Number of Time Ranges Report Error

Hi Guys,

I am trying to create a table in a report showing the number of patrols that were active for every hour of the day. I can get the result I am looking for in a patrol summary query by using the Number of Time Ranges filter multiple times and changing the start and end times on each one e.g. 00:00 to 01:00, 01:00 to 02:00 etc

When I create a data set to import the query into a report it appears that only the first time range has an name / alias

When I preview the results of the query I get an error screen (message included in .txt document below) and the message has to do with the column name or alias Number of Time Ranges already having been used?

[Patrol Times - Error Message Detail.txt|attachment]

(upload://7q5VgSVDJpVndJCpaSarjNNJA7t.txt) (3.3 KB)

This has worked in the past so I am unsure why it’s not working now, anyone have any bright ideas?

Thanks in advance

Hi Nick

The error is failed to prepare report query.
Was you try to update report query binding ?

Lili Sadikin

Hi Lili,

Thanks for the advice. The issue is not with the query bindings but rather to do with the column headings produced at the query stage. They are all exactly the same, with no differentiation regardless of the start and end times selected so when multiple time ranges are included in the same query the the error occurs when you create a dataset because the same column heading cannot be used more than once.

I’ve managed to workaround this by creating 12 different queries, one for each 2 hour range of the day, created 12 different datasets in the report and then included the dynamic text from each different data set into one table. A bit cumbersome but it works!

Thanks and regards

Hi Nick

You just need to fill Alias on Output Columns and lets Display Name and Display name key blank.

Here the result example

Lili Sadikin