Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [WORKAROUND] Double-List Controls For SUM and BY Fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] Double-List Controls For SUM and BY Fields
 Login/Join
 
Guru
posted
Hi -
I am trying to build an HTML Launch Page that uses Double-List Controls where a user can select the fields they want in the SUM and BY sections of a report. The challenge I have is that the 'output' of the Double-List Control looks like...

'SumField1' OR 'SumField2' OR 'SumField3'.

I have two goals here. The first is to do this in a way that the user is not limited to the number of fields they can select in the Double-List Control. The other is to convert the 'output' of the Double-List Control into proper code for a report.

Is it possible to reference the items in the Double-List Control by an index number? For example, if the control is named sumSelect, would there be a sumSelect.1 value and a sumSelect.2 value and so on?

I guess the conversion for the SUM portion of the report would be fairly simple. I could just use STRREP to remove the single-quotes and OR values. The part I'm having trouble with is converting the SORT portion of the report into separate BY lines.

Any suggestions?

Thanks,

Dan

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

What attribute settings do you have for your "double list" control?

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, 2004Report This Post
Guru
posted Hide Post
Tony,

I'm using the Double-List Control provided by the HTML Composer.
The left side (selectfrom) is not assigned to a parameter but is populated from the data source.
The right side (selectto) is assigned to a parameter and gets its values based on what the user selects on the left side.
Both sides are set to allow multiple selections.

Are there other specific attributes you are looking for?

Thanks,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

To see the attributes you will need to look at the HTML source.

I've not used the double list control so I'll try it when I get the chance.

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, 2004Report This Post
Guru
posted Hide Post
Here is a sample (Running in MRE)

FEX CODE:

TABLE FILE CAR
SUM
     DEALER_COST
BY MODEL
HEADING
"&CNTRYSEL.(OR(FIND COUNTRY,COUNTRY IN CAR)).CNTRYSEL. "
ON TABLE PCHOLD FORMAT HTML
END


HTML LAUNCH PAGE CODE:

<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<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 customselect1_OnClick
function customselect1_OnClick(ctrl) {
// TODO: Add your event handler code here
moveSelection(ctrl, false)
}
//End function customselect1_OnClick

//Begin function customselect1_OnDblClick
function customselect1_OnDblClick(ctrl) {
// TODO: Add your event handler code here
moveSelection(ctrl, true)
}
//End function customselect1_OnDblClick

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

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<INPUT language=javascript id=button1 style="Z-INDEX: 1; LEFT: 370px; WIDTH: 70px; POSITION: absolute; TOP: 10px; HEIGHT: 30px" onclick=button1_OnClick(this) tabIndex=1 type=button value=Go! name=button1 requests_list="0">
<SPAN language=javascript id=customselect1 ondblclick=customselect1_OnDblClick(this) style="Z-INDEX: 2; LEFT: 10px; WIDTH: 350px; POSITION: absolute; TOP: 10px; HEIGHT: 180px" onclick=customselect1_OnClick(this) tabIndex=2 elementtype="36">
<SPAN id=ITEM2 style="Z-INDEX: 3; LEFT: 0px; WIDTH: 99px; POSITION: absolute; TOP: 0px; HEIGHT: 19px" tabIndex=3>CNTRYSEL</SPAN>
<INPUT id=customselect1_addbutton style="Z-INDEX: 4; LEFT: 160px; WIDTH: 17px; POSITION: absolute; TOP: 20px; HEIGHT: 24px; BACKGROUND-COLOR: lavender" tabIndex=4 type=button value=">" name=button2>
<INPUT id=customselect1_removebutton style="Z-INDEX: 5; LEFT: 159px; WIDTH: 17px; POSITION: absolute; TOP: 49px; HEIGHT: 24px; BACKGROUND-COLOR: lavender" tabIndex=5 type=button value="<" name=button3>
<SELECT id=customselect1_selectfrom style="Z-INDEX: 6; LEFT: 0px; WIDTH: 150px; POSITION: absolute; TOP: 20px; HEIGHT: 150px" tabIndex=6 multiple size=3 name=listbox1 dfformat="A10" dynalldisplayvalue="ALL" addalloption="1" operation="OR" datafield="COUNTRY" displayfield="COUNTRY" sourcetype="typeMaster" datatype="1" datasource="car.mas" defaultlocation="29,0,83,59"></SELECT>
<SELECT id=customselect1_selectto style="Z-INDEX: 7; LEFT: 190px; WIDTH: 150px; POSITION: absolute; TOP: 20px; HEIGHT: 150px" tabIndex=7 multiple size=3 name=CNTRYSEL operation="OR" sourcetype="typeMaster" datatype="1" datasource accept="0" boundtovariable="1" requiredfield="1449418"></SELECT></SPAN>
<IFRAME id=iframe1 style="Z-INDEX: 8; LEFT: 450px; WIDTH: 600px; POSITION: absolute; TOP: 10px; HEIGHT: 300px" tabIndex=8 name=outPut HEIGHTOLD="300" WIDTHOLD="600"></IFRAME>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden inputcontrolids="customselect1_selectfrom;customselect1_selectto">
<INPUT id=IBIMR_domain style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=mydomain/mydomain.htm name=IBIMR_domain>
<INPUT id=IBIMR_folder style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=#myfolder name=IBIMR_folder>
<INPUT id=ibif_ex style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=app/carstuff.htm name=ibif_ex>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden name=ibiapp_app ismre="1">
<INPUT id=ibic_server style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=EDASERVE name=ibic_server>
<xml id=ibi_requests>
<script>
<requests>
<request requestid="0" sourcetype="typeFex" targettype="iframe" targetname="outPut" ibif_ex="app/carrpt.fex" IBIMR_domain="mydomain/mydomain.htm" IBIMR_folder="#myfolder" IBIMR_sub_action="MR_STD_REPORT" activereport="0" reportcolumns="" ibiapp_app="">
<variables>
<variable parametercreatedinreslay="0" displayfield="COUNTRY" format="" field="COUNTRY" file="car.mas" desc="CNTRYSEL" datatype="1" operation="OR" default="" name="CNTRYSEL" textvarname="" accept="0" type="unresolved" select="1" min="" max="" controltype="36" create="1"></variable></variables></request></requests></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

Just tried out the double listbox and it basically consists of two normal selects that IB provide JS to build the function.

When I submit the form I get a URL like this (I didn't bother with all the IBI_ variables as I only wanted the form variables) -
http://localhost:8080/ibi_apps/WFServlet?listbox2=ENGLAND&listbox2=FRANCE&listbox2=ITALY
which will be interpretted by WF as the following variables and values
&listbox2 = ENGLAND
&listbox20 = 3
&listbox20 = ENGLAND
&listbox20 = FRANCE
&listbox20 = ITALY
These should be easily built into your required type of coding and I guess that is what you're after? I'm using 7.6.5 standalone DS but things haven't changed that much between 7.6 releases.

What code are you getting? (Just the contents of the form will do)

T

p.s. Have I ever mentioned how awful the generated code is (hand coders nightmare)?
No?
Are you sure Wink

This message has been edited. Last edited by: Tony A,



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, 2004Report This Post
Expert
posted Hide Post
Dan,

The attribute (which is why I wanted to see them) that is causing the OR is the OPERATION attribute on the customselect1_selectto control.

There are a few values that this can be - AND, OR, NONE etc. and they control how the variable is built. With your current value of OR you get what you have. Change it to AND and you get the drift.

I can't remember what value it should be to provide the idnexed variables that you need but I am sure that I posted it some time ago (>3 years?).

Have a hunt around and see if you can find it. I am sure that the post was about the module ibirls.js so that might help narrow it down.

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, 2004Report This Post
Guru
posted Hide Post
Tony,

This may be a silly question but how did you get the URL info? When I run the FEX or the HTML page all I get in the browser is https://servername:sslport/ibi_apps/WFServlet. Could the fact that I'm running this from MRE and/or running with SSL be preventing me from seeing the rest of the URL? Or is it something so obvious I'm just missing it?

Thanks,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Guru
posted Hide Post
Tony - I think I found the posting you mentioned here.

Thanks again,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Run it to a new window instead of the iframe. I actually stripped out the MRE stuff and then added -TYPE &FOCEXURL to the fex.

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, 2004Report This Post
Expert
posted Hide Post
quote:
I think I found the posting you mentioned
Well found and good luck!

T

p.s. You also found a topic that had been "mabelled". I wonder how many there are Wink



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, 2004Report This Post
Platinum Member
posted Hide Post
I like to lern, link good for lerning. Is document for ibirls.js? No wait I look in search for it Smiler

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
Platinum Member
posted Hide Post
I find link, is this page but now 3 year ago. Is anybody else have update?

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
Guru
posted Hide Post
Tony,

I must still be doing something wrong. Either that or there IS a big enough difference from 7.6.5 to 7.6.8. No matter how I configure the multi-select in my launch page I can not get it to pass
&CNTRYSEL.0, &CNTRYSEL.1, &CNTRYSEL.2, &CNTRYSEL.3, etc.


I added
-? &
to the end of my FEX and all I see is
&CNTRYSEL = 'ENGLAND' OR 'ITALY' OR 'JAPAN'


Are you willing to post the code you ran to get your output with
&listBox.0, &listBox.1, &listBox.2, &listBox.3, etc.
?

Thanks!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

Sure will but it will have to wait until I get to the machine with 7.6.5 on it (I only have 7.1.6 against 7.6.2 server here). I also have to recreate it - I mullered it by replacing it with your code once you posted it. Frowner

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, 2004Report This Post
Guru
posted Hide Post
OOPS! Music Sorry about that. I sure appreciate your efforts!


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

No problem, now that I'm at the 7.6.5 install I've been able to recreate. Bear in mind I don't normally use the GUI and I've only put minimal controls on (I didn't even bother with a fex!). The URL produced is
http://localhost:8080/ibi_apps/WFServlet?ITEM1=+&listbox2=ENGLAND&listbox2=FRANCE&listbox2=ITALY&listbox2=JAPAN
which should serve your purposes.

Here is the HTML code - you'll notice that the "operation" attribute for listbox2 is not given which is what I think you need.

Good luck

T
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<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 customselect1_OnClick
function customselect1_OnClick(ctrl) {
// TODO: Add your event handler code here
moveSelection(ctrl, false)
}
//End function customselect1_OnClick

//Begin function customselect1_OnDblClick
function customselect1_OnDblClick(ctrl) {
// TODO: Add your event handler code here
moveSelection(ctrl, true)
}
//End function customselect1_OnDblClick
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<FORM id=form2 style="Z-INDEX: 2; LEFT: 20px; WIDTH: 800px; POSITION: absolute; TOP: 20px; HEIGHT: 430px" tabIndex=2 name=form2 onsubmit=OnExecute(this); action=http://localhost:8080/ibi_apps/WFServlet method=get target=_BLANK form_dist_between_desc_and_input="10" form_hor_dist_between_controls="10" vert_dist_between_controls="10" form_number_of_columns="4" form_number_of_visible_rows="4" form_prompt_location="1" default_slider_type="4">
<INPUT id=form2Submit style="Z-INDEX: 3; LEFT: 10px; BACKGROUND-IMAGE: url(/ibi_html/javaassist/ibi/html/describe/run16.gif); WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 400px; HEIGHT: 22px; BACKGROUND-COLOR: lavender" tabIndex=3 type=submit value=" " name=ITEM1>
<INPUT id=form2Reset style="Z-INDEX: 4; LEFT: 70px; BACKGROUND-IMAGE: url(/ibi_html/javaassist/ibi/html/describe/reset.gif); WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 400px; HEIGHT: 22px; BACKGROUND-COLOR: lavender" tabIndex=4 type=reset value=" " name=reset1>
<FIELDSET id=form2_formbodyid style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; Z-INDEX: 5; LEFT: 5px; PADDING-BOTTOM: 0px; OVERFLOW: auto; WIDTH: 790px; BORDER-TOP-STYLE: none; PADDING-TOP: 0px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: absolute; TOP: 5px; HEIGHT: 390px; BORDER-BOTTOM-STYLE: none" tabIndex=5 formbody="1">
<SPAN language=javascript id=customselect1 ondblclick=customselect1_OnDblClick(this) style="Z-INDEX: 6; LEFT: 15px; WIDTH: 480px; POSITION: absolute; TOP: 15px; HEIGHT: 150px" onclick=customselect1_OnClick(this) tabIndex=6 elementtype="36">Enter text
<INPUT id=customselect1_addbutton style="Z-INDEX: 7; LEFT: 230px; WIDTH: 17px; POSITION: absolute; TOP: 30px; HEIGHT: 24px; BACKGROUND-COLOR: lavender" tabIndex=7 type=button value=">" name=button1>
<INPUT id=customselect1_removebutton style="Z-INDEX: 8; LEFT: 230px; WIDTH: 17px; POSITION: absolute; TOP: 70px; HEIGHT: 24px; BACKGROUND-COLOR: lavender" tabIndex=8 type=button value="<" name=button2>
<SELECT id=customselect1_selectfrom style="Z-INDEX: 9; LEFT: 20px; WIDTH: 200px; POSITION: absolute; TOP: 30px; HEIGHT: 110px" tabIndex=9 multiple size=3 name=listbox1 datasource="CAR.mas" datatype="1" sourcetype="typeMaster" ibic_server="EDASERVE" ibiapp_app="focalpoint" displayfield="COUNTRY" datafield="COUNTRY" ibiformat="A10" dfformat="A10" defaultlocation="29,0,83,60"></SELECT>
<SELECT id=customselect1_selectto style="Z-INDEX: 10; LEFT: 260px; WIDTH: 200px; POSITION: absolute; TOP: 30px; HEIGHT: 110px" tabIndex=10 multiple size=3 name=listbox2 operation></SELECT></SPAN></FIELDSET></FORM>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden inputcontrolids="customselect1_selectfrom;customselect1_selectto">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=focalpoint name=ibiapp_app></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>



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, 2004Report This Post
Virtuoso
posted Hide Post
Guys,

A lot of code for a double list box...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Danny,

As produced via the 7.6.5 GUI - a form (two buttons) and double list box (which consists of four controls).

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, 2004Report This Post
Guru
posted Hide Post
Well, I went ahead and submitted a case for this. No matter what I do I can't get the multiple instances of the amper variable. Maybe it is something with 7.6.8.

I'll post an update when I learn something.

Cheers


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Guru
posted Hide Post
Came up with this as a workaround for the time being...
Assuming the output of the Multi-Select Listbox looks like this:
'Selection1' OR 'Selection2' OR 'Selection3
and so on...

This should work (at least it has so far):
-SET &ECHO = ALL;
-DEFAULT &WFFMT = 'HTML'
-DEFAULT &SUMPRNT = 'SUM'
-DEFAULT &VERBLIST = '''DEALER_COST'' OR ''RETAIL_COST'' OR ''SALES'''
-DEFAULT &SORTLIST = '''COUNTRY'' OR ''CAR'' OR ''BODYTYPE'''
-SET &VERB = IF &SUMPRNT EQ 'PRINT' THEN 'PRINT' ELSE 'SUM';
-SET &VERBOBJ1 = STRREP(&VERBLIST.LENGTH, &VERBLIST, 1, '''', 0, 'x', &VERBLIST.LENGTH, A&VERBLIST.LENGTH);
-SET &VERBOBJ  = STRREP(&VERBOBJ1.LENGTH, &VERBOBJ1, 3,' OR', 0, 'x', &VERBOBJ1.LENGTH, A&VERBOBJ1.LENGTH);
-SET &SORTOBJ1 = STRREP(&SORTLIST.LENGTH, &SORTLIST, 1, '''', 0, 'x', &SORTLIST.LENGTH, A&SORTLIST.LENGTH);
-SET &SORTOBJ  = 'BY ' | STRREP(&SORTOBJ1.LENGTH, &SORTOBJ1, 2, 'OR', 2, 'BY', &SORTOBJ1.LENGTH, A&SORTOBJ1.LENGTH);

TABLE FILE CAR
&VERB
&VERBOBJ
&SORTOBJ
ON TABLE PCHOLD FORMAT &WFFMT
END

-? &


Note: The DEFAULTs are only in there to keep me from re-typing every time I tested this.

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
<esheng>
posted
Just want to confirm that Dan's Workaround works.

We had a similar requirement which allows user to report on any columns of any tables. We used the same approach to extract columns from multiselect listbox (items connected either with OR or AND).
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [WORKAROUND] Double-List Controls For SUM and BY Fields

Copyright © 1996-2020 Information Builders