How to export specific tables/rows as HTML and HTML simple reports

Applies to
ApexSQL Data Diff

Summary
This article describes HTML and HTML simple reports in ApexSQL Data Diff.

ApexSQL Data Diff provides comprehensive and customizable HTML and HTML simple reports that can be set to correspond to a set of specific conditions.

Description
Before moving to mentioned reports, there are a couple of options that can be set for the exporting reports. To do so, click the New button from the Home tab in the main window:

In the Options tab, under the Optional output elements section, the Author and Legal options can be set for all reports alongside with the Date and time, by entering the author name and some legal (company) information:

One more thing that can be set is the export folder location. This option can be found with a click on the Options button in the Home tab of the main application window, in the Output tab, under the File locations and templates section, and the export folder can be changed here:

HTML simple report

Once the comparison process is finished and the results are shown in the Main grid, all tables with differences can be selected, along with the corresponding rows. By default, all objects/rows are checked in the Main grid.

By selecting the desired table, the corresponding rows are shown in the Data difference panel, in which they can be individually checked/unchecked, in order to get the desired results in the report:

Additionally, it’s possible to select only missing/different/additional rows, depending on the desired outcome.

For example, if there is a need to export only additional rows:

  1. Uncheck all rows in the All rows tab:

  2. Switch to the Additional tab and check all additional rows:

Once the desired tables/rows are checked, click the Export button from the Home tab and select the HTML simple report:

After the HTML simple report is selected, the following window will be shown:

Options in this window are divided in two groups:

  1. Type:

    1. Different – export different objects
      1. Checked only – export only different objects that are checked in the Main grid
    2. Equal – export equal objects

  2. Selection:

    1. Information on objects to export – shows in report information which object types are included

    2. Different data rows – shows in report data for different rows in table format
      1. Checked rows only – include only checked data rows into the report

    Since only specific tables/rows need to be exported, the same options are checked as in the screenshot above and the OK button is clicked. Once the report is generated it will be opened in a default browser.

    As shown on the screenshot below, the HTML simple report consists of four sections: Header, Comparison options, Report option selections, and Comparison result:

    In the Header section, there is an information about servers\databases that are compared, along with a report date when it’s created, and author and legal information that was mentioned in the beginning. The Comparison options section contains information about options that were checked in the comparison process. In the Report option selections section are shown which object types are checked for exporting. If any option in the Comparison options section and in the Report option selections section was checked, it will be marked with an X.

    In the last section, the Comparison results are showing table name and schema, how many rows there is in source/destination, how much of them are equal/not equal, and how much of them are in source only/destination only.

    Each table name is linked to its corresponding table with rows that were checked for exporting. If a table name is clicked, it will navigate to the appropriate table in the report, which will show all rows with differences:

    HTML report

    The main difference between HTML report and HTML simple report, is that HTML report has an interactive way of navigation through the report. It allows to expand/collapse the Data comparison results and data for individual objects, which allows better user experience and easier usage.

    The way for getting the specific tables/rows exported in HTML report is the same as for HTML simple report. Once the desired tables/rows are checked, click the Export button and choose the HTML report:

    The exporting options are the same as for HTML simple report:

    Once the HTML report is created, at first look, there is not too much difference with an HTML simple report, but at the bottom, there is an expandable button for the Comparison result section:

    If Tables are expanded, it will show the same Data table as in HTML simple report. The only difference is that table with different data rows will be shown only if a table name is clicked and the expandable button next to the Data is clicked:

    To see other tables with different data rows, just click the desired table name in the Tables table, and it will be shown below.

    Q: How do I include different data rows in HTML and HTML simple reports?

    A: When creating HTML and/or HTML simple reports check the Different data rows option in the HTML report options window.

    Q: Can I export only one table with a couple of rows in these reports?

    A: Yes, just uncheck all tables from the Main grid, check the desired table and its corresponding rows in the Data difference panel.

    Q: Can I change the default location where these reports are created?

    A: Yes, you can change it if you click the Options button, from the Home tab of the Main window, switch to the Output tab, and change the Export folder location.

    Q: What is a difference between HTML and HTML simple reports?

    A: The main difference between these two reports is that HTML report doesn’t load different data rows when it’s created and therefore it’s generated faster than HTML simple report. Different data rows are shown only when a table is clicked in the Comparison result section of the HTML report.

    Q: Can I export only different data rows without any other options included?

    A: Yes, if you uncheck in the HTML report options window the Equal objects, along with the Information on objects to export, and check the Different type (with Checked only, if needed) and Different data rows (with Checked rows only, if needed) report will contain only tables with different data rows.