Focal Point
[CLOSED] HTML Report - Hover on field

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1837023496

September 04, 2020, 04:12 PM
WebFOCUS_Dev
[CLOSED] HTML Report - Hover on field
Hello

Below is my sample with a CAR file. I know there is POPUPDESC but is there a way to display other fields when hovering on a field? For example, if I hover on SALES, I would like to see DEALER_COST and RETAIL_COST.
TABLE FILE CAR
SUM
	SALES
	DEALER_COST NOPRINT
	RETAIL_COST NOPRINT
BY COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END  

Please suggest. Thank you.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8206
All formats
September 11, 2020, 12:24 PM
FP Mod Chuck
WebFOCUS Dev

Unfortunately you are hoping for a tooltip with a report and those only exist when you use InfoAssist to create a chart.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
September 11, 2020, 04:05 PM
John_Edwards
If it's an html output you can code it yourself by coding the alt field in an html tag. That is, instead of having this

PRINT SALES


. . . you'll have something like . . .

PRINT COMPUTE SALES_HTML/A100 = '<div alt="' | RETAIL_COST | '">' | SALES | '</div>';


I'm just spit-ballin' that syntax but it gives you the concept.

I had to do this for a banking app where they wanted all PII in alt text tags so that it couldn't be printed so easily. I had a big old box of text with TONS of material in it, virtually its own detail report.



September 15, 2020, 02:39 PM
WebFOCUS_Dev
Thanks John. I got tooltip to work but I am having issue when trying to apply styling for the tooltip hover text. Below is the code. Any help is appreciated.
TABLE FILE CAR
SUM
	COMPUTE SALES_CHK/A32 = IF (SALES GT 50000) THEN 'Hurray! Above quota :)' ELSE 'Uh-oh! Below quota :('; NOPRINT
	COMPUTE SALES_DISPLAY/A100 = '<div class="tooltip" title="'|SALES_CHK|'">'|PTOA(SALES,'(P8C)','A10')|'</div>'; AS 'Sales'
BY COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA,COLUMN=P2,JUSTIFY=RIGHT,$
ENDSTYLE
END
-HTMLFORM BEGIN
<HTML>
<HEAD>
<script src="http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js"></script>
<style>
<style>
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;

  /* Position the tooltip */
  position: absolute;
  z-index: 1;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
}
</style>
</HEAD>
<BODY>
<DIV>!IBI.FIL.hold;</DIV>
<script>
$( function() {
    $("div[title]").tooltip({
       effect: 'slide',
       position: "center right",
       offset: [10, 25]
    });
});
</script>
</BODY>
</HTML>
-HTMLFORM END  

quote:
Originally posted by John_Edwards:
If it's an html output you can code it yourself by coding the alt field in an html tag. That is, instead of having this

PRINT SALES


. . . you'll have something like . . .

PRINT COMPUTE SALES_HTML/A100 = '<div alt="' | RETAIL_COST | '">' | SALES | '</div>';


I'm just spit-ballin' that syntax but it gives you the concept.

I had to do this for a banking app where they wanted all PII in alt text tags so that it couldn't be printed so easily. I had a big old box of text with TONS of material in it, virtually its own detail report.



WebFOCUS 8206
All formats