Fixing broken reports using refresh and reaffirming a filter

Posting this in case it proves useful to someone else…

I had a series of reports that seemed to break inexplicably. The reports included a map combining data from several queries, two straight forward query tables, and one query table which included attachment objects (photos). All the datasets in the report had a filter on them for a specific Patrol Leader, so I had one report per patrol leader. All of them broke [maybe someone will tell me how to produce a single report with sections disaggregated by Leader…]

The reports had been running fine for months but when I came to run them today they returned a series of red letter alerts at the end of the report relating to errors with map queries, table queries, and the table with attachment objects.

After much struggling I discovered I could resolve the issues by:

  1. Right click on each Data Set [in report edit mode view the report outline list and expand Data Sets] and select REFRESH. Has to be done for each dataset in turn rather than select a batch together. Presumbly this resets the connection to the query in some way that has got broken.

  2. For the Data Set that was providing the attachment data, I also had to go to the filter for that data set and go through the motion of reselecting the data field in the filter expression and save again. The filter was still in place after the refresh step and appeared to be fine and going through this motion produced no detectable change to the information shown in the filter window. But it obviously altered something because the report only ran successfully after going through this step. I also noted that the report’s Save option was activited after this step, implying that something had changed that was worth saving.

Jeremy

2 Likes

Thanks for sharing Jeremy. The other thing the often helps with report issues and perhaps you tried this also), is to right-click on the Report in the list of reports and select “Update query bindings”. This fixes a high proportion of errors with reports that had been working, but start generating errors.

Thanks, I didn’t try that (or know about it). Would be good for that sort of update to happen automatically when you edit a report.

Hey there,

I have already tried all of these and the error persists

Any other idea on how to solve it?

Jackie

Hi Jackie,

Updating the query bindings will only solve this if the issue is that the queries connected to the report have been modified.

The issue might be something else (maybe the queries have been deleted). You can try to identify where the problem was coming from by opening your report editor and find the items that correspond to the ID numbers listed in the error message. There will be items that match with “(id = 1830)” for example.

If you can identify where the problem is happening we can try to figure out why this error is occurring.

Cheers,

Alex

Hi Alex,

the queries have not been deleted, nor modified. I created the queries and the report template in one Conservation Area (in which everything perfectly run), and imported all of them into another Conservation Areas where I’m facing these issues. The data models in all of the conservation areas are the same, and the queries have been run correctly, so at least I can say that the error doesnt lay on the queries.

I already know the error is on 3 maps (threats, and sightings of mammals, birds, and reptiles), and 1 table with dynamic images (the attachment of each observation), but in which part of the properties of these elements could I look for any error information?

Or is there any possible issue related to the report definition import?

Jackie

Hi Jackie,

OK, thank you for the additional information. It does seem that the link between the queries and the report template has been lost during the import / export process.

I believe when importing a report template, even if the exact same queries exist in the new CA, you still need to link the queries to the newly imported template. While the report items, layout etc. remains the same, when the template is added to a new CA the same data sets are no longer associated with the template. Each CA has unique IDs which it uses to create these linkages.

So, I would recommend removing the problematic data sets from the report template (if they are there), re-running and saving the queries and re-linking the query data sets to the template.

Cheers,

Alex

Hi Alex,

I understand the proposed solution, though it presents a challenge since I need to run the report across 36 Conservation Areas, requiring adjustments in five sections for each area. Will this be improved in SMART 8?

I have removed the problematic queries from the data set, reloaded and added them again in the maps and tables. The maps displayed the points correctly now. However, I am encountering a new issue with the table. I used dynamic images to show the attachment files of each observation and now only one picture is shown multiple times.

Table in the first conservation area

Table in the conservation area where the queries where reloaded.

Could you suggest me something for pictures to display correctly?

Best,
Jackie

Hi all,

There is a fix for these reporting errors that was shared on the forum. Please follow this post: SMART Reporting Tool Error Fix

Additionally, for any map that returns an error, go to the data set for the map and click edit. Click on “Preview Results”, if no error is returned, the data set & query binding is okay. If not, an error will appear like in the image below:

Click on details to see what the error is. In most test cases, it has to do with the column name or alias being the same in the output column.(See image below)


In my test case, I renamed the alias for the column in question, i.e. Notes_1 to Notes_11.

This permanently fixes the issue with errors on your report maps and your query bindings.

James

1 Like