Focal Point
[SOLVED] An AHTML report centered inside HTML5 code

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

March 24, 2016, 11:02 AM
Jay Potter
[SOLVED] An AHTML report centered inside HTML5 code
Presently we use HTML5/CSS code to center our reports and charts on the screen. We have tried to create AHTML report and center them on the screen. When we do this it ignores or overwrites the HTML5/css code and displays the report all the way to the left.

Presently we are on the 8.0.9 release. I had heard that an AHTML report can not be put inside HTML5/css code with 8.0.9, but it can be done in a higher release.

Does anyone else know about this issue and does it work in future releases?

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
March 24, 2016, 11:16 AM
BabakNYC
Jay, I have 8105. If you have a simple example I could copy and paste, I'll be happy to test it for you.


WebFOCUS 8206, Unix, Windows
March 24, 2016, 03:34 PM
eric.woerle
Jay,

All reports by default run into an Iframe. Instead of centering the report, you can drop the IFrame into a DIV tag, and center the div tag instead.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
March 25, 2016, 10:00 AM
Jay Potter
Here is some basic code that is similar to what I am using. The HTML and HTMTABLE work. The AHTML does not center.

-SET &REPORT_TYPE = 'HTML' ;
-*-SET &REPORT_TYPE = 'HTMTABLE' ;
-*-SET &REPORT_TYPE = 'AHTML' ;

TABLE FILE CAR
PRINT
     CAR
     MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON GRAPH HOLD AS GRPH1 FORMAT &REPORT_TYPE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
-HTMLFORM BEGIN
<table align=center>

	<tr>

		<td width = 10%>
		</td>


		<td>

			<span>!IBI.FIL.GRPH1;</span>

		</td>

		<td width = 10%>

		</td>
	</tr>
</table>
-HTMLFORM END

  



WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
March 25, 2016, 11:01 AM
eric.woerle
Jay,

The reason why the active report always goes to the 0,0 corner is because the active report is absolutely positioned. I found this div tag when I interogated the code:

<div class="activeReport" id="orgdiv0" style="left: 0px; top: 0px; width: 224px; height: 458px; overflow: visible; position: absolute; z-index: 50; background-color: white;">  


You will need to write a function to adjust the style for the div.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
June 21, 2016, 09:25 AM
Jay Potter
When I went to the Summit I got the answer from the expert room. Below is the code I need to use.

<iframe src="./WFSservlet.ibfs?IBFS1_action=RUNFEX&|IBFS_path=/WFC/FOLDER/FEX&|PARM=FSFFSD&|PARM2=SDFASD">


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
June 21, 2016, 09:48 AM
Francis Mariani
Look at the Creating Reports With WebFOCUS Language documentation: Saving and Reusing Your Report Output > Choosing Output File Formats > FORMAT AHTMLTAB

quote:
Creates an output file that contains only data and parameters used in an HTML active report. The output produced is not a complete HTML active report. However, the file can be included in another HTML document using the Dialogue Manager command -HTMLFORM.


See also Developing Reporting Applications > Coding a User Interface > Designing an HTML Page for Report Display > Displaying an Active Technologies Report Using HOLD format AHTMLTAB and -HTMLFORM.

There's an example in the doc, the !IBI.OBJ.ACTIVEREPORTJS; brings in the JS necessary for AHTML:

TABLE FILE GGSALES
SUM
  DOLLARS
  UNITS
BY REGION
BY ST
BY CITY
HEADING
"Regional Sales Summary"
ON TABLE HOLD AS REPORT1 FORMAT AHTMLTAB
END
-*
TABLE FILE GGSALES
SUM
  DOLLARS
  UNITS
BY CATEGORY
BY PRODUCT
HEADING
"Production Order Summary"
ON TABLE HOLD AS REPORT2 FORMAT AHTMLTAB
END
-*
-HTMLFORM BEGIN
<HTML>
<HEAD>
<TITLE>Displaying HTML Active Technologies Reports on an HTML Web Page</TITLE>
</HEAD>
<BODY> 
!IBI.OBJ.ACTIVEREPORTJS;
<TABLE BORDER='1'>
 <TR>
  <TD valign=top>
!IBI.FIL.REPORT1;
  </TD>
  <TD valign=top>
!IBI.FIL.REPORT2;
  </TD>
 </TR>
</TABLE>
</BODY>
</HTML>
-HTMLFORM END



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 21, 2016, 10:54 AM
Jay Potter
Thanks! I will look into it.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster