As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hello, I am new to webfocus. I have a problem with my chainlinked dropdown boxes. One of the current reports i am working on has two procedures on single screen. my dropdown boxes are referring to a .mas file. Once i execute the code i am getting duplicate values in the first combobox in the chainlink. Please help.
< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<TITLE>HtmlPage
</TITLE>
<script id=clientEventHandlersJS type=text/javascript>
function button1_OnClick(ctrl) {
// TODO: add validation code here
fill_min_year()
OnExecute(ctrl)
}
function button2_OnClick(ctrl) {
// TODO: add validation code here
OnExecute(ctrl)
}
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}
function button2_OnClick(ctrl) {
// TODO: add validation code here
OnExecute(ctrl)
}
</SCRIPT>
<script type=text/javascript>
function fill_min_year()
{
if ((document.getElementById('my_compare_check').checked == true)&& (document.getElementById('combobox2').options[document.getElementById('combobox2').selectedIndex].value!=2006))
{
//alert(document.getElementById('my_hidden_min_year').value);
document.getElementById('my_hidden_min_year').value = (document.getElementById('combobox2').options[document.getElementById('combobox2').selectedIndex].value)-1;
}
else //if (document.getElementById('my_compare_check').checked == false)
{
//alert(document.getElementById('my_hidden_min_year').value)
document.getElementById('my_hidden_min_year').value = document.getElementById('combobox2').options[document.getElementById('combobox2').selectedIndex].value;
}
}
</SCRIPT>
<script for=window eventname="onload">window.onload = function() { window_onload(); }
</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto; BACKGROUND-COLOR: lightgrey">
<iframe id=report1 style="FONT-SIZE: 12pt; Z-INDEX: 1; LEFT: 10px; WIDTH: 490px; FONT-FAMILY: Century; POSITION: absolute; TOP: 40px; HEIGHT: 500px; BACKGROUND-COLOR: #ffff99" tabIndex=1 name=report1 executebuttonId="button1" requests_list="0" autoExecute="False" elementtype="2">
</IFRAME>
<SPAN id=text2 style="FONT-SIZE: 10pt; Z-INDEX: 27; LEFT: 20px; VERTICAL-ALIGN: bottom; WIDTH: 70px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; HEIGHT: 20px" tabIndex=27>Select Year
</SPAN>
<INPUT id=my_compare_check style="Z-INDEX: 19; LEFT: 660px; WIDTH: 20px; POSITION: absolute; TOP: 10px; HEIGHT: 15px" onclick=fill_min_year[) tabIndex=23 type=checkbox value=Compare name=compare_check>
<SPAN id=text7 style="FONT-SIZE: 10pt; Z-INDEX: 24; LEFT: 550px; WIDTH: 110px; POSITION: absolute; TOP: 10px; HEIGHT: 7px" tabIndex=24>Compare TY vs LY
</SPAN>
<INPUT id=my_hidden_min_year style="Z-INDEX: 25; LEFT: 880px; VISIBILITY: hidden; POSITION: absolute; TOP: 10px" tabIndex=25 accept=0 name=min_year operation="NONE" datasource="sales_by_dept_daily.mas" datatype="1" datafieldtype="CHAR" displayfield="COMP_STORE_STATUS" datafield="COMP_STORE_STATUS">
<iframe id=report2 style="FONT-SIZE: 12pt; Z-INDEX: 7; LEFT: 500px; WIDTH: 490px; FONT-FAMILY: Century; POSITION: absolute; TOP: 40px; HEIGHT: 500px; BACKGROUND-COLOR: #ffff99" tabIndex=7 name=report2 executebuttonId="button2" requests_list="1" autoExecute="False" elementtype="2">
</IFRAME>
<SPAN id=text3 style="FONT-SIZE: 10pt; Z-INDEX: 8; LEFT: 340px; VERTICAL-ALIGN: bottom; WIDTH: 120px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; HEIGHT: 20px" tabIndex=8>Select Department
</SPAN>
<SELECT id=combobox3 style="FONT-SIZE: 10pt; Z-INDEX: 9; LEFT: 460px; VERTICAL-ALIGN: middle; WIDTH: 60px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; BACKGROUND-COLOR: #ffcc99; TEXT-ALIGN: center" tabIndex=9 name=dept operation="NONE" datasource="SALES_BY_DEPT_DAILY.mas" datatype="1" datafieldtype="PACKED" displayfield="DEPT" datafield="DEPT" labelid="text3" addalloption="0" accept="0" sourcetype="typeMaster" dfformat="P4" newchainnumber="0" ibiapp_app="#" ibic_server="EDASERVE" chainnumber="0" inchainindex="3" cacheruntimedata="0">
</SELECT>
<SPAN id=text4 style="FONT-SIZE: 10pt; Z-INDEX: 10; LEFT: 180px; VERTICAL-ALIGN: bottom; WIDTH: 80px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; HEIGHT: 20px" tabIndex=10>Select Week
</SPAN>
<SELECT id=combobox4 style="FONT-SIZE: 10pt; Z-INDEX: 11; LEFT: 260px; VERTICAL-ALIGN: middle; WIDTH: 60px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; BACKGROUND-COLOR: #ffcc99; TEXT-ALIGN: center" tabIndex=11 name=Week operation="NONE" datasource="SALES_BY_DEPT_DAILY.mas" datatype="1" datafieldtype="PACKED" displayfield="DWWEEK" datafield="DWWEEK" labelid="text4" addalloption="0" accept="0" sourcetype="typeMaster" dfformat="P3" newchainnumber="0" ibiapp_app="#" ibic_server="EDASERVE" chainnumber="0" inchainindex="2" cacheruntimedata="0">
</SELECT>
<SPAN id=text1 style="FONT-SIZE: 10pt; Z-INDEX: 12; LEFT: 700px; VERTICAL-ALIGN: bottom; WIDTH: 130px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; HEIGHT: 19px" tabIndex=12>Select type of display
</SPAN>
<SELECT id=combobox1 style="FONT-SIZE: 10pt; Z-INDEX: 13; LEFT: 830px; WIDTH: 80px; FONT-FAMILY: Century; POSITION: absolute; TOP: 10px; BACKGROUND-COLOR: #ffcc99" tabIndex=13 name=WFFMT operation="NONE" datasource datatype="0" datafieldtype="CHAR" labelid="text1" addalloption="0" accept="0" sourcetype="typeMaster">
<OPTION value=HTML selected displaytext="HTML">HTML
</OPTION>
<OPTION value=PDF displaytext="PDF">PDF
</OPTION>
<OPTION value=EXL2K displaytext="EXL2K">EXL2K
</OPTION>
</SELECT>
<INPUT language=java_script id=button1 style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; Z-INDEX: 5; LEFT: 920px; WIDTH: 60px; FONT-FAMILY: Century; POSITION: absolute; TOP: 14px; HEIGHT: 20px; BACKGROUND-COLOR: #33cc33" onclick=button1_OnClick[this) tabIndex=5 type=button size=8 value=Run name=button1 requests_list="0;2">
< !--
<INPUT id=button1 style="Z-INDEX: 16; LEFT: 900px; WIDTH: 100px; POSITION: absolute; TOP: 10px; HEIGHT: 20px" tabIndex=16 type=button value=Button name=RUN> --->
<SPAN id=text5 style="Z-INDEX: 23; LEFT: 90px; WIDTH: 580px; POSITION: absolute; TOP: 540px; HEIGHT: 30px" tabIndex=19>
<FONT size=-1>
<STRONG>Note: TY = Year value selected in "Select Year" combobox
LY = TY-1
</STRONG>
</FONT>
</SPAN>
<SELECT id=combobox2 style="Z-INDEX: 26; LEFT: 90px; WIDTH: 70px; POSITION: absolute; TOP: 10px; BACKGROUND-COLOR: #ffcc99" tabIndex=26 name=dwyear operation="NONE" datasource="SALES_BY_DEPT_DAILY.mas" datatype="1" datafieldtype="INTEGER" displayfield="DWYEAR" datafield="DWYEAR" addalloption="0" accept="0" sourcetype="typeMaster" newchainnumber="0" ibiapp_app="#" ibic_server="EDASERVE" chainnumber="0" inchainindex="1" cacheruntimedata="0" numofrecords="-1">
</SELECT>
<xml id=ibi_requests>
<requests>
<request requestid="0" targetname="report1" ibif_ex="report1" targettype="0" sourcetype="typeAdhocfex" ibiapp_app="">
< ![CDATA[-DEFAULT &dwyear = &DATEYY.EVAL;
-DEFAULT &min_year = &DATEYY.EVAL;
JOIN
SALES_BY_DEPT_DAILY.SALES_BY_DEPT_DAILY.DEPT IN SALES_BY_DEPT_DAILY TO MULTIPLE
DWF190_DEPT.DWF190_DEPT.DEPT IN DWF190_DEPT AS J0
END
DEFINE FILE SALES_BY_DEPT_DAILY
DAY_WEEK/A3=
IF DW_DOW EQ 1 THEN 'SUN' ELSE
IF DW_DOW EQ 2 THEN 'MON' ELSE
IF DW_DOW EQ 3 THEN 'TUE' ELSE
IF DW_DOW EQ 4 THEN 'WED' ELSE
IF DW_DOW EQ 5 THEN 'THU' ELSE
IF DW_DOW EQ 6 THEN 'FRI' ELSE 'SAT';
DATE_FLAG/A2=IF COMP_STORE_STATUS EQ 0 THEN 'NC' ELSE 'CO';
CSALES1/D12-CM=IF DATE_FLAG EQ 'CO' AND DWYEAR EQ &dwyear THEN SALES_RTL ELSE 0;
NSALES1/D12-CM=IF DATE_FLAG EQ 'NC' AND DWYEAR EQ &dwyear THEN SALES_RTL ELSE 0;
CMKDN1/D12-CM=IF DATE_FLAG EQ 'CO' AND DWYEAR EQ &dwyear THEN MKDN_PROMO ELSE 0;
NMKDN1/D12-CM=IF DATE_FLAG EQ 'NC' AND DWYEAR EQ &dwyear THEN MKDN_PROMO ELSE 0;
CSALES2/D12-CM=IF DATE_FLAG EQ 'CO' AND DWYEAR EQ &min_year AND &dwyear GT &min_year THEN SALES_RTL ELSE 0;
NSALES2/D12-CM=IF DATE_FLAG EQ 'NC' AND DWYEAR EQ &min_year AND &dwyear GT &min_year THEN SALES_RTL ELSE 0;
CMKDN2/D12-CM=IF DATE_FLAG EQ 'CO' AND DWYEAR EQ &min_year AND &dwyear GT &min_year THEN MKDN_PROMO ELSE 0;
NMKDN2/D12-CM=IF DATE_FLAG EQ 'NC' AND DWYEAR EQ &min_year AND &dwyear GT &min_year THEN MKDN_PROMO ELSE 0;
TYLY/A2=IF &dwyear EQ &min_year THEN '' ELSE IF DWYEAR EQ &dwyear THEN 'TY' ELSE IF DWYEAR EQ &min_year THEN 'LY';
END
-SET &SUBFOOT1 = IF &dwyear GT &min_year THEN 'WEEK TOTALS<+0>CO<CSALES1<CMKDN1<CSALES2<CMKDN2' ELSE 'WEEK TOTALS<+0>CO<CSALES1<CMKDN1' ;
-SET &SUBFOOT2 = IF &dwyear GT &min_year THEN ' <+0>NC<NSALES1<NMKDN1<NSALES2<NMKDN2' ELSE ' <+0>NC<NSALES1<NMKDN1' ;
TABLE FILE SALES_BY_DEPT_DAILY
SUM
CSALES1 NOPRINT
NSALES1 NOPRINT
CMKDN1 NOPRINT
NMKDN1 NOPRINT
CSALES2 NOPRINT
NSALES2 NOPRINT
CMKDN2 NOPRINT
NMKDN2 NOPRINT
BY
DWWEEK AS 'WEEK'
SUM
SALES_RTL NOPRINT
MKDN_PROMO NOPRINT
COMPUTE CSALES/D12.2 = IF DATE_FLAG EQ 'CO' THEN CSALES + SALES_RTL ELSE CSALES; NOPRINT
COMPUTE NSALES/D12.2 = IF DATE_FLAG EQ 'NC' THEN NSALES + SALES_RTL ELSE NSALES; NOPRINT
COMPUTE XSALES/D12.2 = C9; AS 'SALES RTL'
COMPUTE C_MKDN/D12.2 = IF DATE_FLAG EQ 'CO' THEN C_MKDN + MKDN_PROMO ELSE C_MKDN; NOPRINT
COMPUTE N_MKDN/D12.2 = IF DATE_FLAG EQ 'NC' THEN N_MKDN + MKDN_PROMO ELSE N_MKDN; NOPRINT
COMPUTE X_MKDN/D12.2 = C10; AS 'MKDNS'
BY
DWWEEK AS 'WEEK'
BY
DW_DOW NOPRINT
BY
DAY_WEEK AS 'DAY'
BY
COMP_STORE_STATUS NOPRINT
BY
DATE_FLAG AS ''
ACROSS
HIGHEST TYLY AS ''
ON DAY_WEEK SUBTOTAL AS ''
ON DAY_WEEK SUBFOOT
"&SUBFOOT1.EVAL"
"&SUBFOOT2.EVAL"
WHEN DAY_WEEK EQ 'SAT';
ON TABLE SUBHEAD
"<DEPT_DESCRIPTION "
WHERE ( DWYEAR GE &min_year) AND ( DWYEAR LE &dwyear) AND ( DEPT EQ &dept.(FIND DEPT IN SALES_BY_DEPT_DAILY).Select Department. ) AND ( DWWEEK EQ &Week.(FIND DWWEEK IN SALES_BY_DEPT_DAILY).Select Week. ) AND ( DWWEEK LT 54 );
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
PAGECOLOR=RGB(255 255 153),
$
TYPE=REPORT,
BORDER=LIGHT,
BORDER-COLOR=RGB(255 204 153),
FONT='TIMES NEW ROMAN',
SIZE=8,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLUMN=P12,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=P13,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=N8,
SIZE=8,
JUSTIFY=RIGHT,
$
TYPE=DATA,
ACROSSCOLUMN=N10,
JUSTIFY=RIGHT,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABHEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
SIZE=10,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
COLOR='BLUE',
STYLE=BOLD+ITALIC,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
BY=2,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=8,
STYLE=NORMAL,
JUSTIFY=LEFT,
WIDTH=1.125,
$
TYPE=SUBFOOT,
BY=3,
SIZE=8,
$
TYPE=SUBFOOT,
BY=3,
LINE=1,
OBJECT=TEXT,
ITEM=1,
STYLE=NORMAL,
JUSTIFY=LEFT,
WIDTH=.750,
$
TYPE=SUBFOOT,
BY=3,
LINE=1,
OBJECT=TEXT,
ITEM=2,
STYLE=NORMAL,
JUSTIFY=RIGHT,
WIDTH=.500,
$
TYPE=SUBFOOT,
BY=3,
LINE=1,
OBJECT=FIELD,
ITEM=1,
STYLE=NORMAL,
JUSTIFY=RIGHT,
WIDTH=.875,
$
TYPE=SUBFOOT,
BY=3,
LINE=1,
OBJECT=FIELD,
ITEM=2,
STYLE=NORMAL,
JUSTIFY=CENTER,
WIDTH=1.250,
$
TYPE=SUBFOOT,
BY=3,
LINE=1,
OBJECT=FIELD,
ITEM=3,
STYLE=NORMAL,
JUSTIFY=CENTER,
WIDTH=.625,
$
TYPE=SUBFOOT,
BY=3,
LINE=1,
OBJECT=FIELD,
ITEM=4,
STYLE=NORMAL,
JUSTIFY=CENTER,
WIDTH=.500,
$
TYPE=SUBFOOT,
BY=3,
LINE=2,
OBJECT=TEXT,
ITEM=1,
STYLE=NORMAL,
JUSTIFY=LEFT,
WIDTH=.750,
$
TYPE=SUBFOOT,
BY=3,
LINE=2,
OBJECT=TEXT,
ITEM=2,
STYLE=NORMAL,
JUSTIFY=RIGHT,
WIDTH=.500,
$
TYPE=SUBFOOT,
BY=3,
LINE=2,
OBJECT=FIELD,
ITEM=1,
STYLE=NORMAL,
JUSTIFY=RIGHT,
WIDTH=.875,
$
TYPE=SUBFOOT,
BY=3,
LINE=2,
OBJECT=FIELD,
ITEM=2,
STYLE=NORMAL,
JUSTIFY=CENTER,
WIDTH=1.250,
$
TYPE=SUBFOOT,
BY=3,
LINE=2,
OBJECT=FIELD,
ITEM=3,
STYLE=NORMAL,
JUSTIFY=CENTER,
WIDTH=.625,
$
TYPE=SUBFOOT,
BY=3,
LINE=2,
OBJECT=FIELD,
ITEM=4,
STYLE=NORMAL,
JUSTIFY=CENTER,
WIDTH=.500,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSVALUE,
ACROSS=1,
JUSTIFY=CENTER,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(255 204 153),
STYLE=BOLD,
JUSTIFY=RIGHT,
$
ENDSTYLE
END]]>
<variables>
<variable field="" file="sales_by_dept_daily.mas" desc="" datatype="0" operation="" name="dwyear" accept="0" type="default" select="0">
</variable>
<variable field="" file="sales_by_dept_daily.mas" desc="" datatype="0" operation="" name="min_year" accept="0" type="default" select="0">
</variable>
<variable field="DEPT" file="SALES_BY_DEPT_DAILY.mas" desc="Select Department" datatype="1" operation="" name="dept" accept="0" type="unresolved" select="0">
</variable>
<variable field="DWWEEK" file="SALES_BY_DEPT_DAILY.mas" desc="Select Week" datatype="1" operation="" name="Week" accept="0" type="unresolved" select="0">
</variable>
<variable field="" file="SALES_BY_DEPT_DAILY.mas" desc="Select type of display output" datatype="0" operation="" name="WFFMT" accept="0" type="unresolved" select="0">
<value value="HTML" display="HTML"/>
<value value="PDF" display="PDF"/>
<value value="EXL2K" display="EXL2K"/>
</variable>
</variables>
</request>
<request requestid="1" targetname="report2" ibif_ex="report2" targettype="0" sourcetype="typeAdhocfex" ibiapp_app="">
< ![CDATA[-DEFAULT &dwyear = &DATEYY.EVAL;
-DEFAULT &min_year = &DATEYY.EVAL;
JOIN
SALES_BY_DEPT_DAILY.SALES_BY_DEPT_DAILY.DEPT IN SALES_BY_DEPT_DAILY TO MULTIPLE
DWF190_DEPT.DWF190_DEPT.DEPT IN DWF190_DEPT AS J0
END
DEFINE FILE SALES_BY_DEPT_DAILY
MONTHS/A3=
IF DWMONTH EQ 1 THEN 'FEB' ELSE
IF DWMONTH EQ 2 THEN 'MAR' ELSE
IF DWMONTH EQ 3 THEN 'APR' ELSE
IF DWMONTH EQ 4 THEN 'MAY' ELSE
IF DWMONTH EQ 5 THEN 'JUN' ELSE
IF DWMONTH EQ 6 THEN 'JUL' ELSE
IF DWMONTH EQ 7 THEN 'AUG' ELSE
IF DWMONTH EQ 8 THEN 'SEP' ELSE
IF DWMONTH EQ 9 THEN 'OCT' ELSE
IF DWMONTH EQ 10 THEN 'NOV' ELSE
IF DWMONTH EQ 11 THEN 'DEC' ELSE 'JAN';
TYLY/A2=IF &dwyear EQ &min_year THEN '' ELSE IF DWYEAR EQ &dwyear THEN 'TY' ELSE IF DWYEAR EQ &min_year THEN 'LY';
DATE_FLAG/A14=IF COMP_STORE_STATUS EQ 0 THEN 'NC' ELSE 'CO';
END
TABLE FILE SALES_BY_DEPT_DAILY
-*WHERE RECORDLIMIT EQ 20
-*AND ( DWWEEK EQ 14 );
-*SUM STORE_NUM NOPRINT SALES_RTL AS 'YEARLY SALES' NOPRINT
-* COMPUTE XSALES =C3; AS 'DAILY SALES'
-*COMPUTE CMSALES=IF DATE_FLAG EQ 'COMP STORE' THEN XSALES + CMSALES ELSE CMSALES;
-*COMPUTE NMSALES=IF DATE_FLAG EQ 'NON COMP STORE' THEN C5 ELSE NMSALES;
-*COMPUTE MSALES= IF NMSALES EQ LAST NMSALES OR NMSALES EQ 0 THEN CMSALES ELSE NMSALES; AS 'MONTHLY SALES'
-*COMPUTE TSALES=IF DAY EQ LAST DAY THEN NSALES + CSALES ELSE 0; AS TOTAL
-*BY STORE_NUM NOPRINT
-*BY DATE_FLAG NOPRINT
SUM
SALES_RTL NOPRINT
MKDN_PROMO NOPRINT
COMPUTE CMSALES/D12.2 = IF DATE_FLAG EQ 'CO' THEN CMSALES + SALES_RTL ELSE CMSALES; NOPRINT
COMPUTE NMSALES/D12.2 = IF DATE_FLAG EQ 'NC' THEN NMSALES + SALES_RTL ELSE NMSALES; NOPRINT
COMPUTE XSALES/D12.2S = C1; AS 'MONTHLY SALES'
COMPUTE CYSALES/D12.2 = IF NMSALES EQ 0 THEN CMSALES ELSE CMSALES + NMSALES;
AS 'YTD SALES'
COMPUTE CM_MKDN/D12.2 = IF DATE_FLAG EQ 'CO' THEN CM_MKDN + MKDN_PROMO ELSE CM_MKDN; NOPRINT
COMPUTE NM_MKDN/D12.2 = IF DATE_FLAG EQ 'NC' THEN NM_MKDN + MKDN_PROMO ELSE NM_MKDN; NOPRINT
COMPUTE X_MKDN/D12.2S = C2; AS 'MONTHLY MKDN'
COMPUTE CY_MKDN/D12.2 = IF NM_MKDN EQ 0 THEN CM_MKDN ELSE CM_MKDN + NM_MKDN;
AS 'YTD MKDN'
BY
DWMONTH NOPRINT
BY
MONTHS
BY
DATE_FLAG AS ''
ACROSS
HIGHEST TYLY AS ''
ON MONTHS SUBTOTAL
X_MKDN AS 'TOTAL'
ON MONTHS SUBTOTAL
XSALES AS 'TOTAL'
HEADING
" <DEPT_DESCRIPTION "
WHERE ( DWYEAR GE &min_year) AND ( DWYEAR LE &dwyear) AND ( DEPT EQ &dept.(FIND DEPT IN SALES_BY_DEPT_DAILY).Select a Department. ) AND ( DWWEEK LT 54 ) AND ( DWYEAR LE &dwyear );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
PAGECOLOR=RGB(255 255 153),
$
TYPE=REPORT,
BORDER=LIGHT,
BORDER-COLOR=RGB(255 204 153),
FONT='TIMES NEW ROMAN',
SIZE=8,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
COLUMN=N1,
SIZE=8,
$
TYPE=DATA,
COLUMN=N2,
SIZE=8,
$
TYPE=DATA,
COLUMN=N3,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N1,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N2,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N3,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N4,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N5,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N6,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N7,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N8,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N9,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N10,
SIZE=8,
$
TYPE=DATA,
ACROSSCOLUMN=N11,
SIZE=8,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=10,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=8,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=2,
SIZE=8,
$
TYPE=HEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
SIZE=8,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=SUBTOTAL,
BY=2,
BACKCOLOR=RGB(255 204 153),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSVALUE,
ACROSS=1,
JUSTIFY=CENTER,
$
TYPE=ACROSSVALUE,
COLUMN=ROWTOTAL(1),
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=ACROSSTITLE,
ACROSS=1,
JUSTIFY=CENTER,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END]]>
<variables>
<variable field="" file="" desc="" datatype="0" operation="" name="dwyear" accept="0" type="default" select="0">
</variable>
<variable field="" file="sales_by_dept_daily.mas" desc="" datatype="0" operation="" name="min_year" accept="0" type="default" select="0">
</variable>
<variable field="DEPT" file="SALES_BY_DEPT_DAILY.mas" desc="Select a Department" datatype="1" operation="" name="dept" accept="0" type="unresolved" select="0">
</variable>
<variable field="" file="SALES_BY_DEPT_DAILY.mas" desc="Select type of display output" datatype="0" operation="" name="WFFMT" accept="0" type="unresolved" select="0">
<value value="HTML" display="HTML"/>
<value value="PDF" display="PDF"/>
<value value="EXL2K" display="EXL2K"/>
</variable>
</variables>
</request>
<request requestid="2" sourcetype="typeAdhocfex" targettype="0" targetname="report2" ibif_ex="report2" ibiapp_app="">
</request>
</requests>
</xml>
</BODY>
</HTML>
This message has been edited. Last edited by: <tkota>,
If you look at the screen where you choose fields from the master you will see that one field becomes the BY and the other the sum field. Try duplicating this behaviour in a fex to see if you get duplicates.
You could also just create a fex to give you your results and call that instead of the master file. Just remember that it need to show only 2 fields and return the output as xml.
It would need to have variable(s) corresponding to an input variables coming from other control(s).
One thing that you can do to see whether you have a FOCUS problem or a JavaScript problem (which is what I think it may be) is to add the ALLOPTION to your combobox2 and give it a value. If you see that ALLOPTION appear in your drop down then the control is being populated twice.
If it turns out to be a FOCUS problem then, as Fernando says, you can mimic what the JS is doing by running a fex like -
TABLE FILE SALES_BY_DEPT_DAILY
SUM FST.DWYEAR
BY DWYEAR
ON TABLE PCHOLD FORMAT XML
END
-RUN
This is what the JS actually runs to populate the combobox. If parses the output and then adds the option logic dynamically.
If it is the JavaScript problem then I would suggest you have a word with IB as it would probably require a change to their JS module or a good understanding of it at least - I don't have the time I am afraid .
Good luck
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004