Change nbsp behaviour?

mike.hebertmike.hebert Posts: 7
edited August 18, 2008 9:54AM in SQL Doc Previous Versions
Is there any way to configure SQL Doc to emit normal spaces instead of non-breaking spaces for all MS_Description fields? If so, it would also be handy to be able to default the vertical alignment of the table cells to "top".

We have long descriptions for some of our tables, fields, check constraints, etc., and I'm finding that the generated docs are almost unreadable because of the non-breaking spaces.

Comments

  • Eddie DEddie D Posts: 1,780 Rose Gold 5
    Hi Mike

    It is possible to modify the document generated.

    You can modfiy the Documentation Style as follows:

    By default, SQL Doc creates your database documentation using HTML with frames. SQL Doc generates database documentation with frames much more quickly and the file sizes are smaller. You are recommended to use this setting if you are documenting large databases.

    To create database documentation without frames, change this setting to HTML without frames.

    To create database documentation in compiled HTML Help format (.chm), change this setting to Microsoft HTML Help (.CHM). Note that you must have Microsoft® HTML Help Workshop installed on your computer to create a .chm file; a free download is available from the Microsoft Download Centre.

    Also You can modify the style sheets that SQL Doc uses to generate the database documentation, if required. In addition, when the documentation has been generated, SQL Doc provides all the source files so that you can edit them if required.

    Modifying style sheets
    SQL Doc uses Cascading Style Sheets (CSS) to determine the appearance of the database documentation. You can edit the master style sheet using a CSS editor, for example to change fonts, font sizes, font colors, text alignment, or table properties.

    The SQL Doc master style sheet (master.css) determines the appearance of the Preview pane and the generated documentation. The style sheet is located in the subfolder Style1/Style where you installed SQL Doc. You are recommended to make a copy of the master style sheet before you edit it.

    Note that you can edit the style sheet to hide the creation SQL. To do this, under the .sqlScript class, add the declaration display: none;

    Modifying Microsoft HTML Help documentation
    When SQL Doc generates database documentation as Microsoft HTML Help, all the project files associated with the .chm file are also provided. You can edit these files and recompile the help using Microsoft HTML Help Workshop if required.

    For example, the default project language is English; if your database documentation contains characters from a different Unicode character set, you may want to change the language setting in the project (.hpp) file and then recompile the help so that the characters are displayed correctly.

    To open Windows® Explorer at the location of the saved project documents, open the project in SQL Doc, and click Alt+E.


    I hope the above helps.

    Eddie Davis
    Red gate Software Ltd
    Technical Support Engineer
    E-Mail: support@red-gate.com
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • BobGoodBobGood Posts: 16 Bronze 3
    How can I control the following behavior?

    SQL Doc outputs the MS_Description extended property including nbsp in place of normal spaces.

    This causes a very long horizontal scroll situation, including making the html output unprintable on a single page.

    and example of the html source created is:

    The name of the container of the report. Typically the name of the Access database, SQL database, SQL Report server, DTS container, Excel workbook, etc. where the report definition or code resides

    The preferred output would be a wrappable and readable:

    The name of the container of the report. Typically the name of the Access database, SQL database, SQL Report server, DTS container, Excel workbook, etc. where the report definition or code resides

    Regards,
    Bob Good
    Bob Good
  • I'm having the same problem. The documentation is basically unreadable because of all the nbsps ... you have to scroll way out to the right and back. Can this be changed?
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi all,

    This may not be the best solution, but I have a workaround for Internet Explorer that may be useful. By changing the SQL Doc stylesheet, you can get the database description text to fit in the page, however wrapping doesn't happen at the spaces, because of course the non-breking space (&nbsp) isn't supposed to allow that. So some words may be split in the middle between two lines. This may be better than letting the text run off of the page, I'll let you decide! :-)

    Open the master.css (stylesheet) file at %programfiles\red gate\sql doc 1\style1\style with notepad.exe, and change the .breadcrumbs section to add word-wrap: break-word;
    .breadcrumbs
    {
    	
    	font-size: 80%; 
    	font-weight: normal; 	
    	margin-bottom: 10px; 
    	padding: 4px; 	
    	word-wrap: break-word;
    }
    
  • The fix above helped me.
  • Any fix for the Columns that would do the same behavior?
  • Does anyone know if this is fixed in Internet Explorer 8? :roll:
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    It should be fixed in the next version of SQL Doc. The problem is that IE takes the non-breaking space quite literally and doesn't wrap any text connected by these   entities. The next version of SQL Doc will use plain old spaces instead of nbsp so that the text will wrap.
  • This Fix Worked For Me ...Thanks!
Sign In or Register to comment.