When it comes to integrating different sources of information in your mapping applications, it can be a challenge to retrieve and present the data in a meaningful way. Combining this with the growing need to meet more complex reporting requirements, it’s clear that there needs to be an easier approach.
Fortunately, formatting reports in Geocortex Reporting has never been easier. Whether it’s broad information or a very specific set of data sources, this technology has all the tools you need to deliver key information to the right people with configurable reports.
In today’s Tech Tip, we explore some of the keys to formatting reports in Geocortex Reporting, making it more meaningful and understandable for your end users.
“Hi my name is Ryan. Today I’d like to show you how you can format your reports, so that you can present the right information to your users rather than raw data. Let’s see how it’s done!
Here’s a report I set up ahead of time. I’m using an ArcGIS Server feature layer containing ambulance data and you can see we’ve got some fields here that are text, dates, numbers, etc.
If we preview this to get a look at what the date is. I’m going to supply a few feature IDs here, so that you can see some of the data, you can see that I’ve got my text fields, here’s my date, I’ve got some numbers. These numbers here, for status and typos are actually domain values. It isn’t the most nicely formatted data that we have available, so let’s see if we can do better on that.
I’m going to take a look at the date column here, so the ‘lastreport’ value. If I want to change the formatting of this, we can see previously it was the full date. Let’s say this vehicle report is for a given day and we are not actually interested in the date portion, we’re just after the time. What we could do is on the last report entry, we can see that it’s expression is pulling the value from the last report column. We can set this text format string and if it’s a ‘DateTime field,’ there are all sorts of date time formatters available, basically anything you like.
If I want to pick one that trims off, we’re only interested in the time of day, something like that that would probably work well. If I hit preview and run that again, we should be able to see that we just have the time.
I’ve just noticed that this particular one doesn’t have a value for the day, it must be that the data and the date in the databases is null. There’s a way where we can deal with that. On the same entry here, if you use the search up here to search for properties that start with null, there’s this property under the data section called ‘Null Value Text.’ We can just enter a value and if the value of the data is null, it’ll supply this value.
Maybe I’m going to put something like ‘Unknown’ in rather than empty. If we preview that we, should see something a little friendlier.
There we go. So, we have an unknown date and we can put in whatever you like and that’s going to work for all sorts of different types not just dates.
Let’s go to this next one. So, speed, we’re just pulling in the value of the speed, it’s a number (I don’t actually know if this is integers or decimal places), but if I wanted to fix it to decimal places, I can use that same text format string, and select number. There are a few variations on this, but if I just select this one, that’s going to show a number with two decimal places, I can trim it off to one. Now when I preview, we should see our speed. Funny enough, all these vehicles are going exact same speed.
Next columns here, the domain value columns for status type. These are really important to deal with because nobody’s going to know what the codes mean. If I select this status, our expression is just pulling the status column, but we have a way to deal with domain values. If you go into the ‘Functions’ in the Expression Editor and select “GIS”, there’s a function called ‘GetDomainDescription,’ and what it’s doing is it’s going to take the value of the ‘@feature’ column, which is something that sort of built into the system. Then, it’s going to extract the domain for a given field name. I just need to plug in our ‘status’ field name right there, and then that should work.
That’s much nicer. This is an active one instead of a just a number. We can do the exact same thing for the type one. We go back to our functions ‘GIS,’ ‘GetDomainDescription,’ and then we just have to update the field name. The field name we are after is ‘type’ here. There we go!
The last thing I’d like to show you here is how we can add page numbers to this. This might be a report on hundreds of vehicles, it could be many pages so we might want to say this is page 105, something like that. There is this page info control and we can drag in, often you’ll put it in the footer. It has various bits of page information that we can supply, but one of them is the display out of the current page out of the total number of pages.
We can see that running. We can see one of one. A couple things we might want to do here, often these things are going to be aligned a little differently. We could say our alignment should be right aligned. There we go.
Also, you might not want to just see one of one, we might want something a little fancier like page one of one, and you can actually modify a text format string here.
Basically, there are placeholders for the current page value and the total page values. If we run that, we should get something that looks pretty good.
There we go, page one of one. Of course, that’ll update when you have more pages,
Hopefully I was able to show you a few things that make your reports have a little fancier formatting so you can get the right users out to your end users.
Thanks for watching!”
If you enjoyed learning the art of formatting reports in Geocortex Reporting and want to learn more, click the button below to dive deeper into the product or to schedule a personal demonstration.