-SET &ECHO=ALL; SET PAGE-NUM = NOPAGE -SET &FIRST_CURR_MONTH = EDIT(&YYMD, '9999$$$$') || '/' || EDIT(&YYMD, '$$$$99$$') || '/' || '01'; -RUN -*Get first day of current month -SET &FIRSTD = EDIT(&YYMD, '999999$$') || '01'; -*Get first day of rolling last 12 month -SET &FIRSTDLM = DATECVT(DATEADD(DATECVT(&FIRSTD, 'I8YYMD', 'YYMD'), 'M', -13), 'YYMD', 'A8YYMD'); -SET &FIRST_LAST_MONTH = EDIT(&FIRSTDLM, '9999$$$$') || '/' || EDIT(&FIRSTDLM, '$$$$99$$') || '/' || '01'; -RUN -SET &TITLE_MSG = '<span style="cursor: default;" ' | 'title="Retail Cost minus Dealer Cost">Profit</span>'; DEFINE FILE CAR PROFIT/D7 = RETAIL_COST - DEALER_COST; T1_PROFIT/A12 = FPRINT(PROFIT, 'D7', 'A12'); T1_RETAIL_COST/A12 = FPRINT(RETAIL_COST, 'D7', 'A12'); T1_DEALER_COST/A12 = FPRINT(DEALER_COST, 'D7', 'A12'); MO_PROFIT/A255 = '<span style="cursor: default;" title="' || 'From:' || (' ' | '&FIRST_LAST_MONTH.EVAL') || ( ' ' | '&|#013;' || 'To: ' || (' ' | '&FIRST_CURR_MONTH') || '">') || T1_PROFIT || '</span>'; END -RUN TABLE FILE CAR PRINT MO_PROFIT AS '&TITLE_MSG' WHERE RECORDLIMIT EQ 1 ON TABLE SET STYLE * TYPE=DATA, COLUMN=MO_PROFIT, JUSTIFY=RIGHT, $ ENDSTYLE END -RUNThis message has been edited. Last edited by: FP Mod Chuck,
The code that you posted is incomplete because it includes html tags in it, and the browser tried to render that html.
When posting code on the forums, please click on the in the tool bar to block out your code.
SET PAGE-NUM = NOPAGE -SET &FIRST_CURR_MONTH = EDIT(&YYMD, '9999$$$$') || '/' || EDIT(&YYMD, '$$$$99$$') || '/' || '01'; -RUN -*Get first day of current month -SET &FIRSTD = EDIT(&YYMD, '999999$$') || '01'; -*Get first day of rolling last 12 month -SET &FIRSTDLM = DATECVT(DATEADD(DATECVT(&FIRSTD, 'I8YYMD', 'YYMD'), 'M', -13), 'YYMD', 'A8YYMD'); -SET &FIRST_LAST_MONTH = EDIT(&FIRSTDLM, '9999$$$$') || '/' || EDIT(&FIRSTDLM, '$$$$99$$') || '/' || '01'; -RUN -* -SET &TITLE_MSG = '<span style="cursor: default;" ' | 'title="Retail Cost minus Dealer Cost">Profit</span>'; -SET &TITLE_MSG = '<div class="tooltip">Profit<span class="tooltiptext">Retail Cost minus Dealer Cost</span>'; DEFINE FILE CAR PROFIT/D7 = RETAIL_COST - DEALER_COST; T1_PROFIT/A12 = FPRINT(PROFIT, 'D7', 'A12'); T1_RETAIL_COST/A12 = FPRINT(RETAIL_COST, 'D7', 'A12'); T1_DEALER_COST/A12 = FPRINT(DEALER_COST, 'D7', 'A12'); MO_PROFIT/A255 = '<div class="tooltip">' || T1_PROFIT || '<span class="tooltiptext">From: &FIRST_LAST_MONTH.EVAL<br>To: &FIRST_CURR_MONTH.EVAL</span></div>'; END -RUN TABLE FILE CAR PRINT MO_PROFIT AS '&TITLE_MSG' WHERE RECORDLIMIT EQ 1 ON TABLE SET STYLE * TYPE=DATA, COLUMN=MO_PROFIT, JUSTIFY=RIGHT, $ ENDSTYLE END -RUN -HTMLFORM BEGIN NOEVAL <style> /* Tooltip container */ .tooltip { position: relative; display: inline-block; border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ } /* Tooltip text */ .tooltip .tooltiptext { visibility: hidden; width: 150px; background-color: #555; color: #fff; text-align: center; padding: 5px 0; border-radius: 6px; /* Position the tooltip text */ position: absolute; z-index: 1; top: -15px; left: calc(100% + 10px); /* Fade in tooltip */ opacity: 0; transition: opacity 0.3s; } /* Tooltip arrow */ .tooltip .tooltiptext::after { content: ''; position: absolute; top: 50%; right: 100%; /* To the left of the tooltip */ margin-top: -5px; border-width: 5px; border-style: solid; border-color: transparent #555 transparent transparent; } /* Show the tooltip text when you mouse over the tooltip container */ .tooltip:hover .tooltiptext { visibility: visible; opacity: 1; } </style> -HTMLFORM END
-* File: IBFS:/DEV-WebFocusAT/WFC/Repository/Test/Marita/Procedure2.fex Created by WebFOCUS AppStudio -SET &ECHO=ALL; SET PAGE-NUM = NOPAGE -SET &FIRST_CURR_MONTH = EDIT(&YYMD, '9999$$$$') || '/' || EDIT(&YYMD, '$$$$99$$') || '/' || '01'; -RUN -*Get first day of current month -SET &FIRSTD = EDIT(&YYMD, '999999$$') || '01'; -*Get first day of rolling last 12 month -SET &FIRSTDLM = DATECVT(DATEADD(DATECVT(&FIRSTD, 'I8YYMD', 'YYMD'), 'M', -13), 'YYMD', 'A8YYMD'); -SET &FIRST_LAST_MONTH = EDIT(&FIRSTDLM, '9999$$$$') || '/' || EDIT(&FIRSTDLM, '$$$$99$$') || '/' || '01'; -RUN -SET &TITLE_MSG = '<span style="cursor: default;" ' | 'title="Retail Cost minus Dealer Cost">Profit</span>'; DEFINE FILE CAR PROFIT/D7 = RETAIL_COST - DEALER_COST; T1_PROFIT/A12 = FPRINT(PROFIT, 'D7', 'A12'); T1_RETAIL_COST/A12 = FPRINT(RETAIL_COST, 'D7', 'A12'); T1_DEALER_COST/A12 = FPRINT(DEALER_COST, 'D7', 'A12'); MO_PROFIT/A255 = '<span style="cursor: default;color=red;" data-title="' || 'From:' || (' ' | '&FIRST_LAST_MONTH.EVAL') || ( ' ' | '&|#013;' || 'To: ' || (' ' | '&FIRST_CURR_MONTH') || '">') || T1_PROFIT || '</span>'; END -RUN TABLE FILE CAR PRINT MO_PROFIT AS '&TITLE_MSG' WHERE RECORDLIMIT EQ 1 ON TABLE SET STYLE * TYPE=DATA, COLUMN=MO_PROFIT, JUSTIFY=RIGHT, $ ENDSTYLE END -RUN -HTMLFORM BEGIN <style> [data-title]:hover:after { opacity: 1; transition: all 0.1s ease 0.5s; visibility: visible; } [data-title]:after { content: attr(data-title); background-color: #00FF00; color: #111; font-size: 150%; position: absolute; padding: 1px 5px 2px 5px; bottom: -1.6em; left: 100%; white-space: nowrap; box-shadow: 1px 1px 3px #222222; opacity: 0; border: 1px solid #111111; z-index: 99999; visibility: hidden; } [data-title] { position: relative; } </style> -HTMLFORM END
SET PAGE-NUM = NOPAGE -SET &FIRST_CURR_MONTH = EDIT(&YYMD, '9999$$$$') || '/' || EDIT(&YYMD, '$$$$99$$') || '/' || '01'; -RUN -*Get first day of current month -SET &FIRSTD = EDIT(&YYMD, '999999$$') || '01'; -*Get first day of rolling last 12 month -SET &FIRSTDLM = DATECVT(DATEADD(DATECVT(&FIRSTD, 'I8YYMD', 'YYMD'), 'M', -13), 'YYMD', 'A8YYMD'); -SET &FIRST_LAST_MONTH = EDIT(&FIRSTDLM, '9999$$$$') || '/' || EDIT(&FIRSTDLM, '$$$$99$$') || '/' || '01'; -RUN -SET &TITLE_MSG = '<span data-toggle="tooltip" data-placement="top" data-container="body" title="Retail Cost minus Dealer Cost">Profit</span>'; DEFINE FILE CAR PROFIT/D7 = RETAIL_COST - DEALER_COST; T1_PROFIT/A12 = FPRINT(PROFIT, 'D7', 'A12'); T1_RETAIL_COST/A12 = FPRINT(RETAIL_COST, 'D7', 'A12'); T1_DEALER_COST/A12 = FPRINT(DEALER_COST, 'D7', 'A12'); MO_PROFIT/A255 = '<span data-toggle="tooltip" data-placement="right" data-container="body" data-html="true" title="From: &FIRST_LAST_MONTH.EVAL<br>To: &FIRST_CURR_MONTH.EVAL">' || T1_PROFIT || '</span>'; END -RUN TABLE FILE CAR PRINT MO_PROFIT AS '&TITLE_MSG' WHERE RECORDLIMIT EQ 1 ON TABLE SET STYLE * TYPE=DATA, COLUMN=MO_PROFIT, JUSTIFY=RIGHT, $ ENDSTYLE END -RUN -HTMLFORM BEGIN NOEVAL <head> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"/> <script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js'></script> <script> $(function () { $('[data-toggle="tooltip"]').tooltip(); }) </script> <head> -HTMLFORM END