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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
Can anyone give me an idea for an interactive report where I can let my users to pick the columns they want to view in the report including by the items they want to sort. PRINT &COL1 &COL2 BY &COL3
The problem is I have a html page to start with bunch of check boxes. how can I know how many columns will the user pick at the time of input? I am not sure if I'm explaining this right, but any ideas would be greatly helpful.
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004
Below is some code you could use once you get the HTML to pass a name value pair. The Java UI that I have to work with passes FLDSORT0=[0-n] FLDSRTOR1-n=[value]. I don't think that really aswer but is a dynamic option to building the TABLE statement. If I can determine how the name value pairs are built will add another post.
well, here's what i do. you do have checkboxes, right? we're not talking multi-select...right? I make each checkbox a boolean value; If say, my users want UNITS and DOLLARS and SEASONS and DIVISIONS then in my launch page: NAME MYUNITS VALUE=1 and is NOT checked; NAME MYDOLS VALUE=1 and is NOT checked; etc, Then in my fex: -DEFAULT &MYUNITS = 0; -DEFAULT &MYDOLS = 0; etc then -SET &MYVAR1 = IF &MYUNITS IS 1 THEN 'UNITS' ELSE ''; -SET &MYVAR2 = IF &MYDOLLARS IS 1 THEN 'DOLLARS' ELSE ' ' ; -SET &HOWMANY = &MYUNITS + &MYDOLLARS + more; ..in my fex SUM &MYVAR1 &MYVAR2 these references are nothing if the variable wasn't checked. The total &HOWMANY tells me how many vars i gotta make room for in my output. Does this help? This really is how i do it all the time. But i do actually initialize one of my variables, just to get the ball rolling.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
If you use a multi-select box, there's less code to create. When submitted, a multi-select boxes passes the following variables ("PARMNAME" is the name of your select box): &PARMNAME0 (that's zero) telling you how many values were selected, and &PARMNAME1 ... &PARMNAME99. If only one was selected, then &PARMNAME0 won't exist (which can be tested for in Dialog Manager). This is the easiest way to pass a variable number of parms to WebFOCUS.