Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Datatables HTML5 Extension

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Datatables HTML5 Extension
 Login/Join
 
Guru
posted
Hello guys,
I'm finally using the HTML5 extension to show the grid (datatable) extension but I see some challenge formatting a field and drilldowns on a field.


I tried to make the field Alpha using FTOA, FPRINT, EDIT etc., but nothing helped. ANyone else tried this yet?
I'm using 8202M AppStudio
Please let me know your thoughts.

This message has been edited. Last edited by: vaayu,
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
Can you replicate with CAR file and share your code ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Here's some sample code, Trying to format the number, I tried FTOA, FPRINT etc., also hoping to be able to use drilldown but not having any luck so far. Please let me know of any thoughts.
 
-* File: IBFS:/Attenti/WFC/Repository/Test/Chart1.fex Created by WebFOCUS AppStudio
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
DEFINE FILE CAR
SALES_ALPHA/A4 = EDIT(SALES,'9999');
END
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS
COMPUTE SALESA/A4 = EDIT(CAR.BODY.SALES,'9999');

BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH EXTENSION
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setPlace(true); 
setCurveFitEquationDisplay(false); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET= >row, 
FOCEXEC=IBFS:/WFC/Repository/Test/Car_DataTable.fex(PARM1=CAR.BODY.SALES), $
$
TYPE=DATA, COLUMN=N2, BUCKET= >row, $
TYPE=DATA, COLUMN=N3, BUCKET= >measure, $
TYPE=DATA, COLUMN=N4, BUCKET= >measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"chartType": "com.ibi.datatables",
"agnosticSettings": {
    "chartTypeFullName": "com.ibi.datatables"
}
*END
ENDSTYLE
END
-RUN
 
-*IA_GRAPH_FINISH
 
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Guru
posted Hide Post
FYI: I have a case open to see what they suggest. No word yet.
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
Try EDIT2 instead and get rid of the DEFINE.

  
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';

GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
COMPUTE SALESA/A15 = EDIT2(CAR.BODY.SALES,'I6');

BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH EXTENSION
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setPlace(true); 
setCurveFitEquationDisplay(false); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET= >row, 
FOCEXEC=IBFS:/WFC/Repository/Test/Car_DataTable.fex(PARM1=CAR.BODY.SALES), $
$
TYPE=DATA, COLUMN=N2, BUCKET= >row, $
TYPE=DATA, COLUMN=N3, BUCKET= >measure, $
TYPE=DATA, COLUMN=N4, BUCKET= >measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"chartType": "com.ibi.datatables",
"agnosticSettings": {
    "chartTypeFullName": "com.ibi.datatables"
}
*END
ENDSTYLE
END
-RUN
 
-*IA_GRAPH_FINISH


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
No effect on EDIT2 for me. Thanks for the tip though, does it work for you?


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
Yes, both format conversion and drill down work on mine. I'm using 8202 Gen 143. What Gen are you on?

What exactly are you seeing when you use EDIT2? First try using it in a Report to see if the numbers come out right.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
I have 8202m with gen 14. Let me try it on another release and see if thats an issue.
The output is same for SALES and SALESA fields for me and no drillable link (on chrome browser)


Thanks!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
You should also make sure you have the latest version of the D3 chart installed.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
So I have tried on 8202 Gen 88, same effect no luck. Can't get rid of the decimals and no drilldowns. I'm also using the latest d3 zip file from github.

Any thoughts?
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
I didn't notice the Integer field IS showing decimals till you pointed it out. So, my example isn't working as I thought. It seems like this chart extension forces a decimal no matter what you do.

However, the drill down is working for me.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
BabakNYC,
Did you have any custom library thats making the drilldown to work? ALso please share a screenshot, curious to see if you have the hyperlinks like we'd see in a report. I also tried on another WF instance 8201 Gen 9 but no luck yet. It seems really odd for drilldown to not work. I'll have to pursue it with cust support.
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Virtuoso
posted Hide Post
The drill down has to be on a number. When it's in a chart, you don't get the usual blue link. The drill down presents when you hover over the number with the drill down and the pointer changes to a hand indicating the value is a drillable one. I'm using the D3 charts available on github for IBI.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
We were able to get this working as a TABLE request instead, was really hoping the HTML5 extension would do the same this works for now! Thanks!
 

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF


TABLE FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES

BY COUNTRY
BY CAR.COMP.CAR
ON TABLE SET BYDISPLAY ON
ON TABLE HOLD AS CARRPT FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$


     SUMMARY='Cars',
     TITLETEXT='Cars',
$
TYPE=REPORT,
     LINES-PER-PAGE=UNLIMITED,
     ARGRAPHENGINE=JSCHART,

$
TYPE=REPORT,BORDER-TOP=LIGHT,
-*   BORDER-TOP-STYLE=SOLID,
   BORDER-TOP-COLOR=DIM GREY,$
TYPE=DATA, COLUMN=N1, BUCKET= >row,

 FOCEXEC=IBFS:/WFC/Repository/Test/Car_drill( \
     OFFENDER_ID=N2 \
     ),
TARGET='_BLANK',
$
ENDSTYLE
END
-HTMLFORM BEGIN
<!doctype html>
<html>
<head>
<script type="text/javascript" src="/ibi_apps/jquery/js/jquery.min.js"></script>
<script type="text/javascript" src="/ibi_apps/tdg/jschart/distribution/tdgchart-min.js"></script>
<link rel="stylesheet" type="text/css" id="leafletCSSID" href="/ibi_apps/tdg/jschart/distribution/leaflet/leaflet.css">
<link rel="stylesheet" type="text/css" id="leafletDrawCSSID" href="/ibi_apps/tdg/jschart/distribution/leaflet/leaflet.draw.css">
<script type="text/javascript" src="/ibi_apps/tdg/jschart/distribution/extensions/com.ibi.datatables/com.ibi.datatables.js"></script>
<link rel="stylesheet" type="text/css" id="com.ibi.datatables__css__0" href="/ibi_apps/tdg/jschart/distribution/extensions/com.ibi.datatables/css/datatables.min.css">
<link rel="stylesheet" type="text/css" id="com.ibi.datatables__css__1" href="/ibi_apps/tdg/jschart/distribution/extensions/com.ibi.datatables/css/symbol.css">
<script type="text/javascript" src="/ibi_apps/tdg/jschart/distribution/extensions/com.ibi.datatables/lib/datatables-w-jquery.min.js"></script>
<script type="text/javascript" src="/ibi_apps/tdg/jschart/distribution/extensions/com.ibi.datatables/lib/lasso.js">
</script>
<style>
.dataTables_wrapper {
font-family: Verdana;
font-size: 8pt;

}
</style>
<script>

$(document).ready( function ()
{
$("#datatable1 table:first-of-type").attr("id", "thetable"); //assign an id to the table generated by the focexec
$("#thetable").attr("width", "100%"); //make it 100% wide
$("#thetable tr:first-of-type").wrap("<thead></thead>");     //dataTables requires <thead> tags around the headers
$('tr').last().remove();
$("#thetable").dataTable({  responsive: true,
columnDefs: [
-* { responsivePriority: 5, targets: 8 },
-* { responsivePriority: 3, targets: 3 },
-* { responsivePriority: 2, targets: 2 },
        { responsivePriority: 3, targets: 1 },
{ responsivePriority: 1, targets: 0 }
    ],
breakpoints: [
            { name: 'desktop', width: Infinity },
            { name: 'tablet',  width: 800 },
            { name: 'fablet',  width: 768 },
            { name: 'phone',   width: 420 },
        ],
paging: true,
"lengthMenu": [ [10, 20, 25, 50, -1], [10, 20, 25, 50, "All"] ],
-* info: true,
ordering: true,
filter: true
}); //initialize table with no initial order
} );

</script>
</head>
<body>
<div id="datatable1">
!IBI.FIL.CARRPT;
</div>
</body>
-HTMLFORM END

 
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Datatables HTML5 Extension

Copyright © 1996-2020 Information Builders