Reports getting left and right muddled up

Trying to build reports and the editor is totally confused. Tried a restart to no avail:

  1. When I insert a table in the report and select the variables from the dataset list, it automatically arranges them from right to left.
  2. When I want to inset a new column into a table and choose right click: “insert column to left”, it inserts it to the right, and vice versa.
  3. I have a variable that is concatenation of X and Y coordinates and E and N. It puts them in the right order but places the sign (negative for west of prime meridian) at the end (“0.6E 6.0N-” when it should be “-0.6E 6.0N”)

1 and 2 I can work around, but would rather it worked!

The thing I can’t get to work is well is a report using Attachment Query data. The report table shows details from the data model fields “Observation Category 0” and “Observation Category 1” [not sure if these are universal categories or unique to my data model], but fields below these level appear empty in the table. If I run the table from a standard Observations query rather than Attachments query, the fields are all populated as expected. If I look at the raw patrol data I can see that the photo is connected to the field I am wanting to display. Why arhe the lower level fields coming up blank in an Attachment query? They appear to be available - they are listed.

Jeremy

PS the date is displaying as Month Year Day (despite me selecting preferred format) which is another level from US date format lol

Hi Jeremy,

Regarding the query attachments, this is currently a limitation of the feature, but we’re looking into changing this for subsequent releases.

For the mirroring of items you can try adjusting the layout preference in the layout tab, under the property editor, check the layout preference and report orientation (screenshot below). This may help with the other issues you’re seeing.

For your third point, I’m not sure, perhaps try the “format number” function for this data value (below also) if changing the orientation does not fix the problem.

Cheers,

Alex

Hi Jeremy

Check your report properties, on General Tab, Report orientation, change to Left to Right.

See picture below.

Regard
Lili Sadikin

Thanks Alex, and also Lili.
Changing the report orientation as suggested switched the existing tables in my report, but didn’t prevent new tables being inserted the “wrong way round”.
But it did seem to help with the odd concatenation issue (the minus is now in the correct
place), and it resolved the odd date format.

So a partial solution! If I create a new report from scratch it seems to put the tables in the correct order. So I wonder if there is some other setting that has got changed in the current report where I have the problem. It seemed to emerge at some stage yesterday when I was working on this and various other reports.

Incidentally, the date format option doesn’t seem to operate on all date fields e.g. it works for dates shown via an attachment query, and for observation queries, but not for patrol summary queries. Those are in a format that isn’t a listed option (ie 2023-03-21)

All my best

Jeremy

Hi Jeremy,

It’s strange behaviour for new items to do this. Have you altered the script in the reporting module at all? We can try exporting the report definition and re-importing to see if that resets something that was altered somehow (although this alteration may be reimported too, I’m not sure).

Ah, yes, I’ve just had a look at this myself and it appears there’s something blocking the date formatting for summary query results. I’ll investigate this further and hope to report back soon. Thanks for bringing this to our attention.

Kind regards,

Alex

Hi Jeremy,
Can you confirm how you’re grouping the data in your patrol summary query?

I’m adding a development request to allow handling the data as dates when you use the Group by Day option, as it’s currently just using a String data type for the date. In the meantime, you can create a Date type column with that information by doing the following:

  1. Right click on the Query under datasets

  2. Edit

  3. “Computed Columns”

  4. New…

  5. ColumnName = “DayAsDate”, Data Type = “Date”

  6. Populate the following for Expression (header_0 is the column that represents the month/year field):

new Date(row[“header_0”])

  1. OK

  2. You will now have an additional column for the query that is a date column and can be formatted as other date columns.

Note that for grouping by something like Month, it isn’t actually a full date that’s used, so it would require a bit more manipulation to treat that string as the first day of that month. You could do that using a computed column in a similar way to above, with different information in the expression in step 6:

tempdate = new Date();

tempdate.setMonth(row[“header_0”].split(“/”)[0] - 1);

tempdate.setYear(row[“header_0”].split(“/”)[1]);

tempdate.setDate(1);

tempdate;

Let us know how it goes.

1 Like

Sorry been slow to reply. I resolved the issue for the report in question by copying the XML and pasting it into a new blank report. Must have been some glitch that emerged somewhere in that particular report.
Jeremy