Geocortex Reporting helps you gather and organize data, making sure you are delivering key information to the right people. But you may also want to have control over the way your report is formatted, so you can ensure it looks as nice you want it to.
In this tech tip, we show you to create sections and groups for your reports. After watching this tech tip, you will be able to efficiently organize the headers, page breaks, and other sections within your report.
Video Transcription
“Hi, have you ever tried to create sections in groups in your report? Well, my name is David Sudbury and I work with the Training department, and we’re going to learn how to do that today!
Welcome to ‘How to create sections and groups for your reports.’ What you are looking at is a report that is underway. You have created a title, a report header, a field called ‘Name’, and data about the area and use type sitting in the detail area. This is a report on trees in parks. It has a feature map, a band called ‘ReportFooter’ with a picture, and a ‘Page’ footer showing ‘page 0 of 1’ and the date.
When you run this, what you’ll get is something that looks like this. What you see is ‘LA County Park Trees Report,’ ‘Chatsworth Oaks Park,’ a feature map there, ‘Chatsworth Park South,’ and when you scroll down here, what you might say is holy mackerel! I don’t want this line on the second page! I want to be able to control the grouping! I want to control what’s happening! That’s what you want to do. So how do you go about doing that? Let’s take a look.
This is the use of sections and groups within a report. The first thing you’re going to do is create a footer. You might think to create a header, and it depends on what order you want to do this in. Let’s put in a footer to handle this line here, because this is the problem. You can click on ‘details’ and open up ‘Properties,” and put a report footer band in there, and we can drag the line and put it in the footer band.
Let’s give that a save and take a look at what that looks like.
Now that you created a footer, suddenly the idea of groups become way more clear. We have our ‘LA County Park Trees Report,’ the line at the top, and notice how that line at the bottom has disappeared. In our efforts to control where page breaks and groupings of data occur by adding a group footer, we highlight a deeper issue. The deeper issue is our understanding of these groups. What we see now is that, in fact, everything between the line at the top and the line all the way down is a group. What we want to do is make just one of these sections a group so that we can control the elements. Let’s do that now.
The next thing to do is put a group header in. Let’s click on here and insert a group header. What we want is this header here to be up there. We have to take a look at what’s going on, because what we want to do is group by the name of that header. For every time that we create a report based upon one of the parks that we have, we want to get the header, name, and footer lines all nicely controlled.
Let’s run this one and take a look. Now, I should point out that I have been doing this with featureIds that I have already created, and I have been able to test out as I go along.
You can see again that we’ve got more issues. The idea of wanting to group things brings about an understanding of how this data and report interacts. Now, we can see that the first ‘Chatsworth Oaks Park’ heading is the only one that shows up. But where are my other headings?
I haven’t yet added the ‘Group By’ fields, and these will solve a lot of ills. What we are going to do is click on the ‘GroupHeaders’ tab and add a ‘Group By’ field based on the OBJECTID. Of course, we are getting this information because we are partly through our report. We already got our data, and we are now going to group by OBJECTID. We’ll preview it and run it.
What we see is like what we started with, but we have more control now. We still have the problematic line but now we can control it. Notice how the page break is between these groupings of data. What we created are groups that we are now able to manage. Let’s take a look at what I mean by that.
So, the ‘Group By’ field is set. But now, let’s take a look at ‘Group Union’. What this is going to do is make the data in this group appear on the whole page. ‘Group Union’ allows us to control where the data is appearing on the page. Before, we could not control it because we didn’t have access to finer grain controls that we have.
Let’s review: Group header, I have ‘Group Fields’ set, OBEJECTID – I’ve got it, now set to the ‘Whole Page,’ so if something takes up half a page, it will appear on the next page. Likewise, with the Group Footer, we have it set to ‘With Last Detail.’ Keep that line, don’t let a page break happen and separate it.
You got to be thinking that this is going to create more paper, so this is more about having it in a PDF output. Let me save this and check out our final approach. Alright, it’s time to run it.
Let’s take a look. We have our header here, and then we have ‘Chatsworth Oaks Park.’ Let’s scroll down, and we now have that hop to the next page, whereas before, we had a page break. Now, it’s all together. We’ve added bands (or sections) in our report that allows us to group our data together.
Let’s review. We started back when we were concerned that we couldn’t control the position of that line. In our journey, what we’ve learned is that by using a group header and adding a ‘Group By’ field to group by each OBJECTID, we can have each group of parks together and on a whole page. The line that demarks the position between the two parks, we are going to put in a group footer ‘With Last Detail’. That way, we can control where it is living. There are other ways to this, and it all depends on the data that you have.
Let’s take a look at this final report here.
There you go: “How you create sections and groups for your report,” a tech tip.
Want to learn more about Geocortex Reporting? Click the button below to dive deeper into the product or to schedule a personal demonstration.