Focal Point
[CLOSED] Sharing parameters values

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

February 28, 2017, 05:38 PM
SPPC
[CLOSED] Sharing parameters values
Hi Experts,
I have a chart embedded in a html that calls another chart through a hyperlink.

The first chart recibes the parameters value from a section parameters and showed the data ok. But the second chart ask me the parameter despite i specified the parameter in the filter section.

I don't know how specify the filter to inherit the value of the parameter
Thanks for your help.

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8.1
Windows
February 28, 2017, 11:51 PM
tomatosauce
I think what you are looking for is passing parameters from your first HTML to second Chart.

I just solved the same issue today after going through the following technique. Let me know if this helps.

http://www.informationbuilders...letter/12-4/05_denst

1) In HTML Composer under Requests and Data Sources Panel, add a new external request for Webfocus procedure (in your case chart 2)

2) For the button element/link in your html create a new task under tasks and animation panel and add a external request for your chart 2 with target as new window.


Tharun Katanguru
SBOX- 8205 DEV/TEST/PROD : 8105 8205
Linux, All Outputs
March 01, 2017, 09:32 AM
SPPC
Thanks for your answer.
But the hyperlink is in an attribute of the first chart (embedded in the html), i need the link there, because the second chart depends the all parameters given and a new one Which corresponds to the bar selected by the user in the first graph (bar graphic).


WebFocus 8.1
Windows
March 01, 2017, 03:13 PM
MartinY
You can do all this using the GUI. This is what I did for below sample.
The parent need the country as parameter.
The child also need the country AND the clicked column value (CAR). Both values are passed to the child.

As reference, here a sample

Parent graph
ENGINE INT CACHE SET ON
-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
SUM CAR.BODY.SEATS
BY CAR.COMP.CAR
WHERE CAR.ORIGIN.COUNTRY EQ &FLTCNTRY. (|FORMAT=A10).COUNTRY.QUOTEDSTRING;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N2, TARGET='_blank', FOCEXEC=IBFS:/WFC/Repository/IT/child.fex(FLTCAR=CAR.COMP.CAR FLTCNTRY=&FLTCNTRY.QUOTEDSTRING), $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN

Child graph
ENGINE INT CACHE SET ON
-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
SUM CAR.BODY.RETAIL_COST
    CAR.BODY.DEALER_COST
BY CAR.CARREC.MODEL
WHERE CAR.COMP.CAR EQ &FLTCAR. (|FORMAT=A16).CAR.QUOTEDSTRING;
WHERE CAR.ORIGIN.COUNTRY EQ &FLTCNTRY. (|FORMAT=A10).COUNTRY.QUOTEDSTRING;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT 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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN


I suggest that you take some IBI training, it may help you especially if you start using WebFocus.


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
March 02, 2017, 09:34 AM
SPPC
Martin,
I did it by the GUI interface but i don't know why the value of some parameters is lost.

I have five parameters and the values ​​of three of those parameters do not reach the second graph (the latter is called by hyperlink inside the first graph) but if they reach the first one.

The problem is not the parameter as such but its value.

I appreciate your help.


WebFocus 8.1
Windows
March 02, 2017, 09:54 AM
MartinY
At this point you have to share your code of both fex, the parent and the child.
Don't forget to add your code between the [ code ] tag.
</>
last button option


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