Customize SQL database documentation


Applies to

ApexSQL Doc and ApexSQL Doc for MySQL

Summary

This article explains how to customize SQL/MySQL database documentation predefined settings or editing a css file. This process is the same for ApexSQL Doc and ApexSQL Doc for MySQL, so for further explanation will be used ApexSQL Doc.

Description

Both tools have pre-defined documentation look default styles, Classic, Modern, and Metro. To create any customer-defined documentation style, the following guide can help.

To be able to customize SQL database documentation using ApexSQL Doc, a connection to at least one SQL server must be established. After the connection is established, choose the documentation style clicking the Styles option, from the Output options, as shown in the image below:

Choosing the documentation style clicking the Styles option, from the Output options in ApexSQL Doc

Quick tip icon

Important note:

The Active scripting option for the current Security zone must be enabled, in order to generate a full preview for the output documentation style

If the Active scripting option is disabled, the Preview section will not generate the full preview of the output documentation style, and the warning message will be shown, as in the image below:

Warning message is shown if the Active scripting option is disabled

Quick tip icon

Quick tip:

The Active scripting option is enabled by default in Windows. This option must be enabled only if the Windows security settings are not set to default.

To enable the Active scripting option, go to Control Panel, and choose Internet Options. Under the Security tab, choose the Internet zone which is used and click the Custom level button as shown in the image below:

Figure illustrating enabling the Active scripting option using the MS Windows Control Panel

In the Custom level security settings, scroll down to the Scripting settings, and set the Active scripting option to Enable. Click the OK button and confirm the changed settings for the current zone, as shown in the image below:

Security Settings

Quick tip icon

Quick tip:

If the application was launched during the changes, after pressing the OK button, restart the application to accept the changes.

Customize SQL database documentation

To customize database documentation, a choice between one of the predefined output documentation styles (VS 2005, VS 2010 or Metro style) can be made, or choose the style sheet file to edit. The selected output style will be presented in the Preview section as shown in the image below:

Figure illustrating the selected output documentation style

Quick tip icon

Quick tip:

The predefined output documentation styles can also be edited, as there are separate css file for each one of them.

To change the defined output style settings, modify the css file in any text editor.
All css files are located in ApexSQL Doc installation directory, in the Templates folder (by default is: C:\Program Files\ApexSQL\ApexSQL_Doc\Templates)

The Template folder contains all css files

As the css files are under the system protected folders, the best way to modify them is to make a copy of the file that needs to be modified, on another location (Desktop for example). Once the modification is finished, the saved file can be pasted into the Templates directory under the ApexSQL Doc installation directory. Administrator privileges are needed for this task. Any changes made in the css file will be shown in the Preview section after deselecting it and selecting it again:

The css file before changes are made

The Preview section before changes in the css file above:

Database documentation Preview section before changes are made in the css file

After the changes are made, and saved the file pasted in the Templates folder, select the Stylesheet radio button. Then click on the Browse for folder button, the new dialog will appear and from it select targeted style.css and click on the Open button. The css file will be loaded, and in the Preview dialog will be shown how the SQL database documentation will look like:

The output documentation style after the changes are made