Focal Point
[SOLVED] Mutiple Accordion Reports with in a single frame?

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

October 05, 2009, 09:35 PM
Kal
[SOLVED] Mutiple Accordion Reports with in a single frame?
Hi-

We have a reporting need to pile up multiple 1-line accordion reports with in a single frame.

When I do that, with an include for each acordion report - The functionality limits to just the first report.
JS on each +, points to the same toggle\table--
[javascript:toggle("table1","by_1"); ]

-*regen. code:
  
-*** Accordion for Multiple reports, in a single frame?
-*Report1 Include
DEFINE FILE CAR
DUMMY1/A30 = 'Summary of Report1 (Cntry): ';
END
TABLE FILE CAR
SUM CNT.COUNTRY AS '' 
BY  DUMMY1 AS ''
PRINT DST.COUNTRY AS '' 
BY  DUMMY1 AS ''
ON TABLE SET EXPANDABLE ON
END
-***********************************
-*Report2 Include 
DEFINE FILE CAR
DUMMY2/A30 = 'Summary of Report2 (Cars): ';
END
TABLE FILE CAR
SUM CNT.CAR AS '' 
BY  DUMMY2 AS ''
PRINT DST.CAR AS '' 
BY  DUMMY2 AS ''
ON TABLE SET EXPANDABLE ON
END
-***********************************
-*Report3 Include 
DEFINE FILE CAR
DUMMY3/A30 = 'Summary of Report3 (models): ';
END
TABLE FILE CAR
SUM CNT.MODEL AS '' 
BY  DUMMY3 AS ''
PRINT DST.MODEL AS '' 
BY  DUMMY3 AS ''
ON TABLE SET EXPANDABLE ON
END
-*************************************
-* Report4 Include
-* Report5 Include
-**************************************************************************


--Can this be fixed by tweaking anything here?

Please do let us know if I am missing anything simple here!

Hopefully, Someone has tackled a similar requirement with a better solution than holding each report detail & compounding them to a single accordion report.

Thanks in advance, for pitching in!!

This message has been edited. Last edited by: Kal,


----------------------------------
WFS - V7.6.8 Servlet on Win2k3 VM, Tomcat, ResourceAnalyzer;
DevStudio - R7.6.8, FlexEnable,VisDis; MRE/BID/self-service/Rcaster/ Office2k3;
DB-SQL2005;
October 06, 2009, 01:45 AM
<JG>
quote:
let us know if I am missing anything simple here

Yes, What you are trying to do is not supported in any way shape or form.
You might find a solution by using multiple frames but definately not one.

As you know because you've looked at the source of the generated output, the javascript
is very specific and will only ever find the first set of attributes used to control
the table.

Does not matter how many reports you run they all have the same attributes.
There is no way you can influence the generation of these scripts.

Compounding into a single report or multiple frames are the only options I think you have.
October 06, 2009, 04:23 PM
Kal
Thanks JG for writing in.. appreciate your time looking into this!
I was afraid that be the case..
All the lined up reports seem to have the same 'table1' reference.
I was unsuccessfully making an attempt to bring them as table1 & table2 &.. and then may be use them like-
-HTMLFORM BEGIN
!IBI.FIL.HOLD1;
!IBI.FIL.HOLD2;
<script>
toggle("table1","by_1");
toggle("table2","by_1");
</script>
-HTMLFORM END  

..but no success, yet! any quick insight, if this would work?
I'll try this out more & lastly the compounding option of merging the detail.

Thanks & Regards,
Kal.

This message has been edited. Last edited by: Kal,


----------------------------------
WFS - V7.6.8 Servlet on Win2k3 VM, Tomcat, ResourceAnalyzer;
DevStudio - R7.6.8, FlexEnable,VisDis; MRE/BID/self-service/Rcaster/ Office2k3;
DB-SQL2005;
October 06, 2009, 05:00 PM
Francis Mariani
We have discussed this here before, it appears the only way you can have working multiple Accordion reports is to have them in individual iFrames. Unfortunately, it's all in the JavaScript.

But wait! A little more digging around and I seem to have made it work.

-* expandable1a.fex

-SET &ECHO = ON;

SET MESSAGE = ON
-RUN

TABLE FILE CAR
SUM DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
ON TABLE HOLD AS HTABLE0 FORMAT HTMTABLE
ON TABLE SET EXPANDABLE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
ENDSTYLE
END
-RUN

TABLE FILE CAR
SUM RCOST
 BY COUNTRY
 BY CAR
 BY MODEL
ON TABLE HOLD AS HTABLE1 FORMAT HTMTABLE
ON TABLE SET EXPANDABLE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
ENDSTYLE
END
-RUN

TABLE FILE CAR
SUM SALES
 BY COUNTRY
 BY CAR
 BY MODEL
ON TABLE HOLD AS HTABLE2 FORMAT HTMTABLE
ON TABLE SET EXPANDABLE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>WebFOCUS Expandable Report</title>
</head>

<body>

<BASE HREF="http://localhost:8080/approot/App/">
<script language='javascript'>
var ibiOptions = new Array("expandable");
var focexurl = "/ibi_apps/WFServlet?";
var fochtmlurl = "/ibi_html";
var serverLanguage='en';
</script>
<script language='javascript' src='/ibi_html/javaassist/nls.js'></script>
<script language='javascript' src='/ibi_html/javaassist/ibi/html/js/ibigbl.js'></script>

<div style="color: blue;">D Cost</div>
!IBI.FIL.HTABLE0;

<DIV style="color: blue;">R Cost</DIV>
!IBI.FIL.HTABLE1;

<DIV style="color: blue;">Sales</DIV>
!IBI.FIL.HTABLE2;
</body>
</html>
-HTMLFORM END

Create HTMTABLE HOLD files instead of HTML HOLD files. Each Accordion Report has an individual "tablestarts" name.

Include a few lines of JavaScript that's automatically generated by the HTML HOLD command and you're good to go (I think)>

This message has been edited. Last edited by: Francis Mariani,


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
October 06, 2009, 06:06 PM
Kal
Vow!!..Worked like a charm!
Thanks very much for digging in! .. With my limited JS capabilities, I could only go till the part it err'd- 'tablestarts' is undefined.

Thanks & Best Regards,
Kal.


----------------------------------
WFS - V7.6.8 Servlet on Win2k3 VM, Tomcat, ResourceAnalyzer;
DevStudio - R7.6.8, FlexEnable,VisDis; MRE/BID/self-service/Rcaster/ Office2k3;
DB-SQL2005;