The design of reports in Microsoft Access relies on a system of components that get reused over and over again in the final report layout. Each section, including the report header, page header, detail, and page footer sections, need to be designed a single time, even if the final rendering of the populated report has hundreds or thousands of records to display.
- [Instructor] For complete control over your report layout, you're gonna wanna explore the report Design view. Many of the features that we went over with forum design also apply to the design of reports, which makes it easy to apply what we already know. However, reports have a structure that's distinct from most forums, which adds another aspect to their construction. Most forums display only a single record at a time. Reports display many records, one after another. Right now, I have the Check In Details Report opened up in just the standard report view and I'm gonna go over and switch into Design view. To do that, I'll use the bottom portion of the View Split button on the Home tab and we'll come down and choose Design view.
Now, when you first switch into Design view, you might be surprised at how short this report looks. The nature of a report is that there are several sections, but they get stacked one on top of another over and over again. We only have to design each piece of the stack one time and Access just repeats it as many times as necessary to accommodate your data. So let's go through the sorting order of the report. I'm gonna click on each section and you can see the name of the section up here in the Header bar. Right now, I've got the Report Header selected and this is going to appear at the very top of the very first page in your report.
Below that, we have an instance of the Page Header. The Page Header is going to appear below the Report Header on the first page but at the very top of each subsequent page in your report. After that, we'll have the Last Name Header. This is where the data is going to appear for each of our guests. We have the last name of the guest, the first name, and their phone number. Below that, we're gonna have the Detail section and this is where the Check In Date and the Rate Codes will appear. And we'll have lots of Detail sections over and over again for each guest. When we run out of details for the first guest, we'll get another instance of the Last Name Header for the next guest and then a bunch of copies of the Detail section for their details.
When we get to the bottom of the page, we're gonna get an instance of the Page Footer. Right now our Page Footer has this little formula box. This is going to give us the time and date stamp for our report, as well as a page count to the report, so this will say page one of 10 or whatever. Then we move on to the second page of our report so we'll get another copy of the Page Header, then a copy of the Last Name for the guests that were on, more details, another last name, more details, and so on. There's another section that this report currently isn't using and that's called the Report Footer and this will appear at the very end of the report on the very last page.
I can see that we're not using it right now because it's actually completely collapsed so there's no height here. If I wanted to, I could expand it open and this is where we would put some information in, if we wanted to make use of that Report Footer. I'll go ahead and go to the bottom here and click and drag that back up again. So other than that structural difference with the repeating sections, the design of reports is almost identical to the design of forums. You have the same tabs across the top, we have the Design tab, the Arrange tab, and the Format tab. There's an addition Page Settings tab here that holds options for dealing with printing that don't apply to forums, such as Margins and Page Layout, but each of these other tabs are almost identical to what we'll find with forum design.
We have the same grouping section, we have controls that we can add into our report, we have the Header and Footer section, and we can even open up the Property Sheet or Add Existing Fields to our report. If I open up the Property Sheet, that'll be this tab over here on the far right side, we can see that every object inside of our report has lots of different properties, so as we click through here, we'll see that all the different properties light up for things that we could change inside of the different sections in the report. Let's go ahead and close the Property Sheet for now. So let's start working on cleaning up our report and bringing it into a state that'll actually be useful.
First, we need to give some more space over here to the Check In Details for the report so I'm gonna grab the Last Name field and I'm gonna press the Shift button and click on the little header that'll appear above that and I'm gonna start shrinking these down to give us more space. We'll do the same thing with First Name, we'll go ahead and reduce those in size, and then with that still selected, I'm gonna use the arrow keys on my keyboard and press left to nudge things over. We'll do the same thing with Phone Number. And then we have more room to view our Check In Date.
We'll go ahead and select that and the header that'll appear above it, this is just a label at the top here and these white boxes are where the data will actually appear. Let's go ahead and move that over under our report and then finally, we can move over Rate Codes, as well. Then I wanna turn my attention to the Report Header, we'll tidy this up a little bit. I'm gonna take the title here, this is just the name of the report that Access is using as a title. I wanna make this box a lot wider here, I'm gonna move this all the way over here to the seven inch mark on the ruler up here and I'm gonna move the beginning here to the one inch mark then we'll go ahead and give it a better name here.
So I'll just double click into it and we'll title this report, Guest Room Assignment History. Then, I'm gonna go ahead and select all that text again. So go ahead and just highlight it and on the Format tab, we can find our Font Colors, I'm gonna go ahead and give this text a dark purple color, I'll go ahead and pick this one here, the Purple Five chip, then I'm center this text so I'll press this button here to center justify our text for the title. Then I'm gonna click on the background area of this report header, anywhere you see this dot and grid pattern, this is just a way for Access to help you out with aligning your objects.
These dots won't appear on the final report so go ahead and click back here and then I can go over here to the Shape Fill section on the Format tab and we'll choose maybe this light purple color for the top of our report. Finally, I wanna add a logo to the report, so let's go over here to the Design tab and we'll find in the Header and Footer section a button called Logo, go ahead and press that. That'll bring up the Insert Picture dialogue box, where we can browse out to our computer and inside the Exercise Files, inside of the Chapter Seven folder, I have a file called Landon Bug, it's a PNG file, go ahead and say OK to that and it places a logo here at the top left corner.
And we can resize it as we need. So I think that's looking pretty good. Let's go ahead and switch our view into Print Preview so we can get an accurate representation of what this will look like printed out on the page. And we can start to see that we're getting all the information that we were asking for. We have the names of our guests, followed by their check in details, and then I have the next guest and their check in details. So this is a good time to save our work. Let's go ahead and press the Save icon on the Quick Access Toolbar. And I'll go ahead and close Print Preview, which will take us back into Design view. So that's a pretty good start. At least now all of the information that we're looking for is on the page. We can refine the look of our report in Layout view and we'll do that next.
- Determine the essential uses for the Trust Center.
- Explore the functions of the database Navigation pane.
- Recognize the fundamentals of entering data when using Access.
- Identify the necessary steps when importing a table when using Access.
- Break down the fundamentals of filtering and sorting table data in Access.
- Identify the method utilized when building queries in Design view.
- Determine the role of forms in Access.
- Examine all of the elements involved in maintaining a database in Access.
- Explore how to properly protect an Access database with a password.