Toad for DB2 has some really nice features for generating reports, reports both on your schema, or your metadata, as well as data in your tables. And this applies to both DB2 for z/OS as well as DB2 for LUW. Now I'm going to start by invoking Tools, Reports, Schema Reports. And, again, these reports are actually going to show the metadata and information about your tables. So I'm going to select a couple sample tables.
The Schema Reports tab opens up. And what you could do is you could drag tables over to that control. And if you're satisfied with that, and if you're satisfied with the options that you want included in these schema reports-- again, it's going to be metadata, information about these tables-- you could click Generate Report. And the report gets generated.
And you could see that this report has a table of contents, shows you the tables that will be included in this report, and then each section for each table gives you metadata, or information, properties about that table, such as what tablespace it's been defined with, what's the maximum row size, what dependencies this table has, et cetera, columns in the table-- so very helpful information that you might want to use report-wise to send to your other colleagues. Or a developer might generate this to send to a DBA if he wants to define a new type of table in production. So those are our schema reports-- very easy to generate.
Once generated, they could be saved in many different formats. They could be emailed very quickly and easily in many different formats. So that's the schema report. That will give you the metadata about your objects.
The next thing I'd like to talk about is the data reports. Data reports are actually going to be reports that contain data from your tables. It's not going to be metadata. It's going to be real data.
So if you open this Data Report Wizard from the Tools menu, like I just did, you'll be able to roll your own SQL, or actually be able to load a file that has a SQL statement. And I'm going to load a file that has a SQL statement in it and click Next. And what Toad did is identified the columns that were available in that select statement. So I'm to bring over a couple values and click Next, keep this report simple. And you give it a title-- put Football Teams, and click Finish.
And a Report Designer opens up. And this allows you to modify the look and feel of the report as it will be displayed on the pages when the report gets generated. So you could actually change these around. And once you're satisfied, you could click on Preview. A preview of the report will show up.
In this case, it's a very simple report. But you could see that the columns, the report have been identified, team name, city, conference, wins, losses, et cetera. You could view it as it might appear if it was going to be generated as HTML, a little bit different look than it would be if it's saved to a file. If you're happy with that, you could actually go ahead and, once again, export it to one of various different file formats. Or you could actually email it to your colleagues.
And it is good to note that Toad has an automation feature where these reports, instead of be driven manually, can be saved and then rerun over and over again, either by you on demand or via our automation feature, which we'll talk about perhaps in a different training session. So those are the data reports and the schema reports. I'm going to close this down.
And I'm just going to show you that, on any given grid, if you have any data grid, either if you run a query, or if you're on the Data tab, you could very easily right-click and say Send To, Data Reports Designer. So this is going to bring up the Data Reports Designer, much like we just saw here. And it's going to be pre-populated with all the data on the grid. So I'm going to bring over player name, team name, position, a couple of columns here, click Next. I'm actually going to order by team name, and click Next, take the defaults here, here.
And we're going to Are Football Players. So we've got a Football Players report. And we're going to click Finish. And this should generate-- again, it's going to generate a Report Designer that allows me to modify things a bit.
I could click Preview. It's going to show how the report would look. And you can see, this generated many pages of our report here.
And it was grouped by team. So as you scroll down this report, there should be a break for every team that gets displayed. Yes, there is.
If you review it in HTML format, it's going to look a little bit different because it's not a page format, like a PDF if you will. But, nonetheless, it looks quite the same. Once you're happy with that, you could save it, this report, you could rerun this report, you could save it in very different formats. And, again, you could add it to our scheduling facility to automatically run this report over and over.