Focal Point
[SOLVED] Not able to get changes reflected in Active dash after upd irpcusf.js file

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

August 22, 2018, 10:32 AM
Neelima
[SOLVED] Not able to get changes reflected in Active dash after upd irpcusf.js file
Hi All,

As per statement on tutorial, I have created irpcusf.js JavaScript file for active technology to change the label value dynamically. below are the code
// Values used in the following example
var newValue = 'CONFIDENTIAL REVENUE REPORT';
/* Here is an example of how a Text object created as part of an
active report or active dashboard is accessed and modified at
run time.
Reference the object to modify, then
Set the object with new text */
var obj = document.getElementById('Text_1');
if(obj) obj.innerHTML = newValue;

this code is added in my output but "CONFIDENTIAL REVENUE REPORT" text is not coming in Label.

I am not able to set this value . please help me on same.

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


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
August 22, 2018, 11:04 AM
Tony A
Show an example of your report using one of the sample files such as GGSALES or CAR etc. including the label.

How familiar are you with traversing the DOM using JavaScript?

Do you know how to use developer tools for the browser that you are using?


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
August 22, 2018, 03:57 PM
Neelima
Hi Tony,

I have little bit familiar with Javascript and Jquery. Yes, I have used the Developer tools to check the exception but did not get any exception.

below are code for irpcusf.js

var ArApi = null;
function user_init()
{
if(ArApi==null) ArApi=new getAReportObj();


}
// Values used in the following example
var newValue = 'CONFIDENTIAL REVENUE REPORT';
/* Here is an example of how a Text object created as part of an
active report or active dashboard is accessed and modified at
run time.
Reference the object to modify, then
Set the object with new text */
var obj = document.getElementById('Text_1');
alert(newValue);
if(obj) obj.innerHTML = newValue;

___________________
and for Active Dashbord:-

-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
*-HOLD_SOURCE
COMPOUND LAYOUT PCHOLD FORMAT AHTML
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4^activedashboard=1', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, ARGRAPHENGINE=JSCHART, ACTIVE_UNITS=PTS, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
OBJECT=STRING, NAME='Text_1', TEXT='
Heading Label
', POSITION=(0.563 0.438), MARKUP=ON, WRAP=ON, DIMENSION=(7.655 0.400), font='TREBUCHET MS', color=RGB(0 0 0), style=bold, size=12, METADATA='left: 0.563in; top: 0.438in; width: 7.655in; height: 0.4in; text-align: center; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12pt; font-weight: bold; position: absolute; z-index: 1; -ms-word-wrap: break-word;', $
COMPONENT='chart1', TEXT='chart1', TOC-LEVEL=2, POSITION=(0.604 0.875), DIMENSION=(7.500 4.479), COMPONENT-TYPE=GRAPH, ARREPORTSIZE=DIMENSION, METADATA='left: 0.604in; top: 0.875in; width: 7.5in; height: 4.479in; position: absolute; z-index: 2;', $
END
SET COMPONENT='chart1'
-*component_type chart
-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
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
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
BY CAR.CARREC.MODEL
ACROSS CAR.COMP.CAR
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 1
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

-*IA_GRAPH_FINISH
COMPOUND END

Thanks

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


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
August 22, 2018, 05:05 PM
Waz
Where does irpcusf.js live and how is it added ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 23, 2018, 01:17 AM
Neelima
I have put irpcusf.js in baseapp as per information from below post

http://forums.informationbuild...577091686#3577091686

do I need to call irpcusf.js file explicitly in fex ?


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
August 23, 2018, 04:37 AM
Tony A
You need to go back to the original topic (your link) and read where the line "// ADD CUSTOM CODE HERE" suggests that you put your code.

e.g.

var ArApi = null;
function user_init()
{
 if(ArApi==null) ArApi=new getAReportObj();


// Values used in the following example
var newValue = 'CONFIDENTIAL REVENUE REPORT';
/* Here is an example of how a Text object created as part of an
active report or active dashboard is accessed and modified at
run time.
Reference the object to modify, then
Set the object with new text */
var obj = document.getElementById('Text_1');
alert(newValue);
if(obj) obj.innerHTML = newValue;

}


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 17, 2018, 08:30 AM
Neelima
Thank you All.

Sorry for late reply.As per suggestion, we are able to call Js inside the active code.

-Neelima


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies