Technique
Problem
How to display the OLAP Control Panel on a iframe.
Solution
Here are the steps to display the OLAP Control Panel on an iframe.
- Add -OLAP ON to the top of your focexec code (car_olap.fex):
For example:
-OLAP ON
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
-DEFAULTH &WF_HTMLENCODE=ON;
SET HTMLENCODE=&WF_HTMLENCODESET HTMLCSS=ON
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT-DEFAULTH &WF_ARVERSION=1;
SET ARVERSION=&WF_ARVERSION-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE ibisamp/car
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET OLAPPANE CONTROL
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,{2}lt;br /> TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, {2}lt;br /> ENDSTYLE
END-RUN
- Save your focexec in your folder.
- Select your folder, select Other and then Text Editor in Action bar.
- Select the Web tab and click HTML(htm).
- Add the following code:
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes</h2>
<p>You can use the height and width attributes to specify the size of the iframe:</p>
<iframe src="http://localhost:8080/ibi_apps/run/ibfs//WFC/Repository/Public/car_olap.fex" height="1000" width="100%"></iframe>
</body>
</html>
- Click the Run button.
- Scroll down the scrollbar to the end and click the OLAP button to display the OLAP Control Panel.