Database Handicapping Software- JCapper Define Cell Display Attributes - SQL HTML Report - SCREEN FOUR
April, 2012
Define Cell Display Attributes - SQL HTML Report - SCREEN FOUR
In the previous article, I illustrated using Screen Three of the SQL Factor Setup Wizard to position JRating (or other factors) on the SQL HTML Report layout by assigning them to numbered cells.

In this article, I'm going to illustrate using Screen Four of the SQL Factor Setup Wizard (also known as the HTML Report Detail Screen) to define display attributes for the cells that make up the SQL HTML Report layout.



The Screen Four (HTML Report Detail Screen) Interface
I'll start by by covering the visual interface for Screen Four of the SQL Factor Setup Wizard. Link to screenshot --click here-- .

The Screen Four interface itself (also known as the HTML Report Detail Screen) is simple. The four main parts that make up the Screen Four interface can be described using the following bullet points:
  • On the left side of the interface is a VB Listbox that displays a "Factor Stack." This Listbox displays a vertical list of numeric cell numbers and the factor names persisted to each cell. It is for all practical purposes identical to the right side vertical factor stack found on the Screen Three interface discussed in the previous article.

    The purpose of the vertical factor stack is to provide you with a visual interface that enables you to select individual cells so that you can define display attributes for the selected cell.


  • Immediately to the right of the vertical factor stack is a Center Column Area where you will find visual elements that enable you to define the display attributes that control how individual cells are displayed on the SQL HTML Report. This screenshot shows the Screen Four interface with the center column area circled using a freehand red mouse pen.

  • To the right of the Center Column Area are 48 VB Texboxes (or cells) arranged in a way so as to represent the part of the JCapper SQL HTML Report layout that can be customized by the user.

    Note: The full SQL HTML Report layout actually has 13 vertical columns and 4 horizontal rows. However, the left-most vertical column of the full report layout is reserved for data items (such as name of horse) that are not customizable by the user. Only the 12 right-most vertical columns are customizable by the user.

    The 12 vertical columns and 48 cells displayed on the Screen Four interface correspond to the right-most 12 vertical columns on the SQL HTML Report layout that can be customized by the user.

    The purpose of these 48 cells is to provide you with a visual interface that enables you to select individual cells so that you can define display attributes for the selected cell.

    Hint: Your job as a user in using the Screen Four (Detail Screen) interface is to select individual cells by clicking either the vertical factor stack or by clicking the individual cell itself. After selecting an individual cell, your job as a user becomes one of using the visual elements in the Center Column Area to define display attributes for the selected cell - and (finally) to save your work by clicking the Save button.

    Note: Be aware that the interface is designed for you to define display attributes for CELLS appearing on the SQL HTML Report layout. The interface does NOT (repeat not) define display attributes for factors. This is an important distinction. If you were to use the interface to remove the original factor from Cell #10 and insert a different factor into the same cell, you need to be VERY AWARE that the interface is programmed to retain previously set display attributes for that CELL until such time as you use the interface to redefine display attributes for that CELL and click the Save button.

    Put another way: You are using the interface to define display attributes for cells not factors.

    IMPORTANT!: Any time that you use the Screen One, Screen Two, or Screen Three interfaces to change your SQL Factor Setup and/or cell assignment on the SQL HTML Report Layout -- It is critical that you use the Screen Four interface to verify (and edit as needed) the display attributes for the cells on the SQL HTML Report layout! Otherwise, you run the risk of generating SQL HTML Reports that have mislabeled column headers because YOU still have the dsiplay attributes for the cells on your report layout set for factors previously assigned to the cells of your report layout.


  • Beneath the 48 cells that make up the SQL HTML Report layout are several buttons. Functionality for these buttons will be discussed as part of the step by step instruction set presented below.
The above four bullet points describe the main parts of the Screen Four interface.


Numbered Steps for using the Screen Four (HTML Report Detail Screen) interface to define display attributes for individual cells:

1. Navigate to Screen Four of the SQL Factor Setup Wizard - Picking up where we left off at the end of the previous article, click the NEXT button at the bottom of Screen Three. This will cause navigation to Screen Four of the SQL Factor Setup Wizard.

2. Decide ahead of time what You want your final SQL HTML Report to look like. - Do some design work ahead of time. Grab a piece of paper and a pen. Sketch out the 12 columns and 4 rows of cells that make up the customizable SQL HTML Report layout. Write down what you want in each column. For example, in the version of the SQL HTML Report that I created for myself, I have a column for early speed based factors (CPace, UserFactor3, CompoundPaceFit, and EarlyConsensus.) CPace, CompoundPaceFit, and EarlyConsensus are displayed in blue font and userFactor3 (because I use it to verify/validate the other early pace factors) is purposely displayed in red font. Because early pace is an important part of my game I have set the display attributes in the center column area for the cells in this column to display numeric value to 2 decimal places and have opted to display rank. I purposely designed the appearance of this column in such a way that a single glance at the report has my eye zeroing in on it and I can tell inside of a second or two which are the fastest horses in the race. Other columns that aren't as important to me have the display attributes set to display rank only (late pace for example.) The point I'm trying to make is that I put some thought (and design time) into the report before I set about using the interface to create it. I recommend that you do the same.

Recommendation: READ the Design Doc
Give the above link a click and read the design doc. It contains background info about the report layout along with things you should consider before you set about designing a SQL HTML Report. The material found in the Design Doc dovetails with the material I'm presenting in this article.

3. Select an individual Cell: - Click an individual cell on the vertical factor stack to select it. Or, alternately, click an individual cell on the report layout to select it. Once a cell has been selected, the interface will highlight that cell with a blue background color on both the vertical factor stack and report layout. In addition, once a cell has been selected, the interface will render the display attributes for that cell in the Center Column Area (where they can be edited.)

This screesnhot shows the Screen Four interface immediately after I selected cell #10 by clicking it.

4. Set the Display Attributes for the selected cell:
  1. Check the Active Display Box: If you leave the box unchecked, the interface will not display the selected cell when the SQL HTML Report is generated during a Calc Races routine.


  2. Type in a Column Header: In the above linked to screenshot, I have keyed in the characters "JR" (without the quotes) as my column header to indicate JRating.

    Hint: Keep the number of characters for your column headers to a minimum. A good rule of thumb would be to use the shortest abbreviations you can think of that tell you at a glance what factor is in each cell.


  3. Select a Cell Alignment from the drop down: Your options are Left, Middle, and Right.

    Hint: Right seems to give the best visual presentation when displaying numbers in a given selected cell.

    You can always use Left or Middle if that is your preference.

    Using the same alignment for each of the four cells of a given column gives the report a cleaner look than mixing cell alignments within the same column.


  4. Select the number of Decimal Places from the drop down: Your options are None, One, Two, Three, and Four.

    Hint: Use the same value for all cells within a given column whenever possible. Doing this makes it easy for a web browser to render the SQL HTML Report (vs. using different values within the same vertical column) and gives the report a cleaner look.

    Hint: Horizontal space really is at a premium. When you print the report out on paper it will be too wide if you use four decimal places in too many columns. I strongly recommend using None as the option of choice wherever and whenever possible - especially if you plan to print the report out on paper on a regular basis.

    Horizontal space doesn't matter that much if you almost never print the report out on paper.

    So shoot for the report layout that works best for you.


  5. Check the box that best relates to the factor type assigned to the selected cell:

    For example, if you have a numeric factor like JRating or CPace assigned to the selected cell, you know that a numeric value is involved. Therefore you would NOT check the Display as Name box - but would check the Display Numeric Value and/or Display Rank boxes.

    Conversely, if you have a text based factor like Rider or Trainer assigned to the selected cell, you know that a string of text characters (or a name) is involved. Therefore you WOULD check the Display as Name box.

    Hint: As a general rule, it is a good idea to check the same boxes for all 4 cells within a vertical column whenver possible. (It makes for a better looking report.)

    Hint: Horizontal space really IS at a premium. The report will be too wide (if you print it out on paper) if you check both the Display Numeric Value and Display Rank boxes for the cells in every column. Plan on displaying numeric value and rank for columns where the factors in the column are really important to your way of handicapping. Check the rank box only for the cells sitting in columns where the factors displayed in that column are of secondary importance to you.

    Hint: After saving your changes for the current selected cell - Run a SQL Calc races for a single race and look at the SQL HTML Report generated by the program (HTML Two in the HTML Report Viewer.)

    I strongly suggest you do this before moving on to the next cell.

    When I created the default layout for the SQL HTML Report I had to save horizontal space in several places (otherwise the report would be too wide when printed out on paper.) The default report layout provides a reasonably good example of what I am talking about.


  6. Select a Font Style from the Drop Down: The drop down contains a handful of simple options for font color, background color, bolding, font size, and font face, etc. When a new option is selected from the dropdown, the text inside of the drop down will render using the option selected. (This allows you to see what that option looks like.)


  7. Save Your Work! - Once you are happy with the display attributes for the selected cell, Click the SAVE button to save your work for that cell.

    --Hint: Do this BEFORE moving on to the next cell.

    -OR-

    Alternately, Abandon Your Work. If you are unhappy with the display attributes for the selected cell, and you do not wish to continue, you can abandon your work by not clicking the SAVE button.

    Be aware that when you hit the Save button: You are saving the current selected cell only.

    So if you fail to hit the Save button and move on to a different cell - the next time you do hit the Save button you are saving the current cell only - and you will lose any unsaved work that you did on previous cells.

    Clicking the RESET button instead of the Save button resets all attributes for the current cell back to their most recently saved values.

    Clicking the EXIT button without clicking the SAVE button (and answering No when prompted to save your work) will get you out of the SQL Factor Setup Wizard without saving your work for the current cell.


5. Repeat the above steps for all 48 Cells on the report layout (or just the individual cells you have decided to edit.)


At this point, we are done with Screen Four of the SQL Factor Setup Wizard.

BACK to Screen Three --click here--

-jp

.

Copyright © 2008 JCapper Software              http://www.JCapper.com