Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Changing colors on the HTML Report

Home Register
Log In
By Changing colors on the HTML Report
NYMike
1/20/2014
5:15:03 PM
Is it possible to have the colors on the HTML Report change based on the number?

Say I have Distance Shift on my report. Right now I have is colored Orange. Can I make is so that if the distance shift is

- .5 or less furlongs would colored Blue

-.5 to +.5 would colored Black

.5 and longer would be colored Orange

Thanks,

Mike

Reply
jeff
1/21/2014
1:32:50 PM

--quote:
"Q. Is it possible to have the colors on the HTML Report change based on the number?

Say I have Distance Shift on my report. Right now I have is colored Orange. Can I make is so that if the distance shift is

- .5 or less furlongs would colored Blue

-.5 to +.5 would colored Black

.5 and longer would be colored Orange

Thanks,

Mike
"
--end quote

A. The HTML Report Detail Screen (Screen Four of the Interface) enables you to use .CSS to set font/color/weight, etc. for any given slot on the report. But that interface doesn't support "IF THEN ELSE" conditionals. Meaning that once you set a given slot on the report as blue regular: That slot is always rendered as blue regular no matter what the value/rank/gap of the factor displayed in that slot.




You can however, accomplish what you are asking on a per UDM basis by embedding html in your UDM names -- provided you know what you are doing.

Examples:

1. You create a UDM (using CUTBACK as the UDM name) that among other things, only flags horses where DTSHIFT < -0.5

Instead of using CUTBACK as your UDM name, you could use integrate the characters of the UDM name (in this case CUTBACK) into an html font tag where the color attribute is blue.

Example:

(font color=blue)CUTBACK(/font)

Note that in the above example I am purposely using the ( character instead of the < character and the ) character instead of the < character to prevent your web browser from interpreting the characters (font color=blue and (/font) as elements from an actual html font tag.


2. You create a UDM (using STRETCHOUT as the UDM name) that among other things, only flags horses where DTSHIFT > -0.5

You could use integrate the characters of the UDM name (in this case STRETCHOUT) into an html font tag where the color attribute is orange.

Example:

(font color=orange)STRETCHOUT(/font)

Note that in the above example I am purposely using the ( character instead of the < character and the ) character instead of the > character to prevent your web browser from interpreting the characters (font color=orange) and (/font) as elements from an actual html font tag.

IMPORTANT: ALWAYS (repeat always) make a backup of your c:\2004\JCapper.mdb file before doing this.

Your UDM definitions are stored in this file and restoring a backup copy of the file is the single easiest path to full recovery in the event you mess things up.

IMPORTANT: AVOID at all cost (repeat avoid at all cost) using characters in a UDM name that are part of the SQL programming language.

Characters to avoid are:

the single quote: '
double quote: "
at sign: @
pound sign: #
dollar sign: $
percentage sign: %
ampersand: &
wildcard: *
exclamation: !
square bracket: [
square bracket: ]

Why avoid them?

These characters are part of the SQL programming language. Using them in a UDM definition is a good way to mess things up.

This means that color=red would be ok to use because it doesn't contain any characters that are part of the sql programming language.

However, something like color='orange' is something you should avoid using.

The single quote characters could potentially corrupt UDM definitions in the JCapper.mdb file because they are part of the sql programming language.

That said, after making a backup copy of your c:\2004\JCapper.mdb file - give it a try.

Hint: replace the ( and ) characters from the example UDM names above with < and > respectively to make the html you are embedding in the UDM name be interpreted as an actual font tag.

Starters cutting back in distance flagged by the CUTBACK UDM will appear as CUTBACK on the report.

And starters stretching out in distance flagged by the STRETCHOUT UDM will appear on the report as STRETCHOUT



-jp

.







~Edited by: jeff  on:  1/21/2014  at:  1:32:50 PM~

Reply
NYMike
1/21/2014
4:39:50 PM
Jeff,
Thanks!

Mike

Reply
Reply

Copyright 2018 JCapper Software              back to the JCapper Message Board              www.JCapper.com