Focal Point
[SOLVED by IB] HTML Parameters in Graph

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

April 27, 2007, 01:27 AM
lakshmi
[SOLVED by IB] HTML Parameters in Graph
Hi,

I'm desingning a HTML page where I've a dropdown control.I'm populating it dynamically using Data Source....And I've a graph ...The X Axis column I'm using for the Graph has to come from the values selected in the Drop Down...

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


Lakshmi
WF 713 WinXP/IIS/Apache Self Service
October 29, 2008, 11:56 AM
<Meghan>
Did you ever get a solution to this problem - I'm trying to do the exact same thing and am having no luck.
November 05, 2008, 12:41 PM
Kerry
Hi Meghan,

If this is still a problem on your site, please contact Information Builders' Customer Support Services and open a case for it. You may either call at 1-800-736-6130, or access online at InfoResponse.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
November 05, 2008, 01:40 PM
<JG>
Kerry,

How was this SOLVED?
November 05, 2008, 02:07 PM
Kerry
Hi JG,

The solution for this one is to open a case for further assistance. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
November 05, 2008, 02:32 PM
<JG>
Kerry,
I'm sorry but
quote:
open a case for further assistance

is not a solution
It is at best a hope.
November 05, 2008, 04:38 PM
dhagen
Example:

Graph (baseapp/fp_car_graph.fex):
  
-* File fp_car_graph.fex
-*INTERNAL_PROPERTIES$fieldDisplayMode=label;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$enablePreview=true;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$prefixDisplayMode=;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$GlobalRecordLimit=500;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$SampleData=false;OBJECTID=GLOBAL
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.SALES
BY &GROUPING
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
ENDSTYLE
END


HTML (baseapp/fp_car_html.htm):
  
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<META id=UTF-8 http-equiv=Content-Type content="text/html; charset=UTF-8">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var rltVersion = "764";
var cgipath = "cgipath";
var ibirls = "ibirls2";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {

UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload

//Begin function button1_OnClick
function button1_OnClick(ctrl) {
// TODO: Add your event handler code here
OnExecute(ctrl)
}
//End function button1_OnChange

//Begin function combobox1_onChange
function combobox1_onChange(ctrl) {
OnExecute(ctrl);
}
//End function combobox1_onChange
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<IFRAME id=iframe1 style="Z-INDEX: 1; LEFT: 30px; WIDTH: 980px; POSITION: absolute; TOP: 78px; HEIGHT: 555px" tabIndex=1 name=iframe1 frameBorder=no executebuttonId="button1" requests_list="0" HEIGHTOLD="555" WIDTHOLD="980" autoExecute="True"></IFRAME>
<SPAN id=text1 style="Z-INDEX: 2; LEFT: 25px; WIDTH: 88px; POSITION: absolute; TOP: 20px; HEIGHT: 16px" tabIndex=2>GROUPING</SPAN>
<SELECT language=javascript id=combobox1 style="Z-INDEX: 3; LEFT: 120px; POSITION: absolute; TOP: 20px" tabIndex=3 onchange=combobox1_onChange(this) size=1 name=GROUPING requests_list="0" labelid="text1" addalloption="0" accept="0" operation="NONE" selectedvalue datasource boundtovariable="1" requiredfield="1459626" datatype="0" sourcetype="typeMaster">
<OPTION value=COUNTRY selected displaytext="COUNTRY">COUNTRY</OPTION>
<OPTION value=CAR displaytext="CAR">CAR</OPTION>
<OPTION value=MODEL displaytext="MODEL">MODEL</OPTION></SELECT> 
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden inputcontrolids="combobox1">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=baseapp name=ibiapp_app>
<xml id=ibi_requests>
<script>

<requests>

<request requestid="0" sourcetype="typeFex" targettype="iframe" targetname="iframe1" ibif_ex="fp_car_graph.fex" ibic_server="EDASERVE" activereport="0" reportcolumns="" ibiapp_app="baseapp">

<variables>

<variable parametercreatedinreslay="0" displayfield="GROUPING" format="" field="GROUPING" file="car.mas" desc="GROUPING" datatype="0" operation="" default="" name="GROUPING" textvarname="" accept="0" type="unresolved" select="0" min="" max="" controltype="7" create="1"></variable></variables></request></requests></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>



Basically, if you put the graph in an html for via layout painter. Set the dropdown as required (dynamic or static). Change the onChange event of the drop down to perform the OnExecute(ctrl) JS function.

Note: Ensure that the SELECT tag has the request_list attribute and value that points to the appropriate fex in the XML data island, or the onChange event will do nothing.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott