Focal Point
Dynamic Ranking

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

February 25, 2005, 03:46 AM
<PT>
Dynamic Ranking
I want to select dynamic ranking like in one combo box it should show top and bottom and in other it should show numbers sothat i can select top 10 or bottom 15.

Anybody knows how to do it with GUI?
February 26, 2005, 07:37 AM
<JG>
It's not possible to do this in the gui tools because they do not allow you to parameterize WebFocus keywords such as HIGHEST/LOWEST or the values that you pass them.

You need to manually edit the code so that it looks as follows. However make sure that you do all of your styling for the output first as the code will not open in the painter or layout tools afterwards.



TABLE FILE CAR
PRINT

MODEL
RANKED AS 'RANK' BY
&TB.(,).Top/Bottom.
&TN.(<1,1>,<2,2>,<3,3>,<4,4>,<5,5>,<6,6>,
<7,7>,<8,8>,<9,9>,<10,10>,<11,11>,<12,12>,
<13,13>,<14,14>,<15,15>).Number.

DEALER_COST
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

Regards

JG

This message has been edited. Last edited by: <Mabel>,
February 28, 2005, 05:56 AM
<PT>
It doesn't allow me to save or execute following code.

It shows error in &TN variable
&TN.(<1,1>,<2,2>,<3,3>,<4,4>,<5,5>,
<6,6>,<7,7>,<8,8>,<9,9>,<10,10>,<11,11>,<12,12>,
<13,13>,<14,14&g t;,<15,15>Wink.Number.


Can you please revert back

Pranali

This message has been edited. Last edited by: <Mabel>,
February 28, 2005, 06:22 AM
<JG>
Pranali, I suspect that you tried to paste the code into the source view of the painter. This will generate exactly the error you describe when you try to save it.

The way to do it is to style your basic report, close the painter and then use the edit in text editor option and paste it that way.

Also make sure that the tags have not been substituted when you paste, sometimes when copying or pasting from HTML the GT and LT signs get substituted by the HTML code values.

JG
March 01, 2005, 05:44 AM
<Sugiyama>
Hi Pranali

Let's try

(MRE env)
TABLE FILE filename
PRINT fieldname
RANKED BY
&LH.(LOWEST,HIGHEST).LOWEST or HIGHEST.
&RANK.(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15).RANK.
ranking fieldname
END

(NOT MRE env)
EX rankprog LOWEST,10

rankprog is

-DEFAULT &1=LOWEST,&2=15
TABLE FILE filename
PRINT fieldname
RANKED BY &1 &2 ranking fieldname
END

Good Luck!