Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

I am building a table report in WebFocusDesigner that sums a...


Casey Green

Recommended Posts

I am building a table report in WebFocusDesigner that sums all of the margins allocated to a particular sales team over a period of time and sorts the results descending, starting with the highest margin. The stakeholder would like to see the first result (aka the row with the highest margin) in bold and red font. Is there a way to add a traffic light conditional to an entire row to achieve this
Link to comment
Share on other sites

Hi Casey,

Are you able to edit your report using the text editor If so, here is my suggested solution.

Using the CAR sample data, I summed SALES by COUNTRY. Then I ranked the SALES field and sorted the values from largest to smallest. I saved the report and closed the window. In my home page, I navigated to this report and opened it in the text editor. Right before the ENDSTYLE tag, I added this code:

$

TYPE=DATA,

WHEN=RANK EQ 1,

COLOR='RED',

STYLE='BOLD',

$

 

When I run the report, the first line (i.e. row with the highest sales) is displayed in bold, red font. Give this a try and let me know if it works.

Link to comment
Share on other sites

The only solution I can think of requires the use of HOLD files. I first create my table with a TOT_SALES field and save the output to a HOLD file. Using the HOLD file, I compute a rank field and sort it by highest TOT_SALES. Then I style my output conditional on the rank field value.

I am unable to provide step by step instructions for the GUI, but hopefully this code will give you some insight:

TABLE FILE CAR

SUM SALES

BY TOTAL SALES AS 'TOT_SALES'

BY COUNTRY

ON TABLE HOLD AS SALES

ON TABLE SET ASNAMES ON

END

 

TABLE FILE SALES

PRINT SALES

COMPUTE RNK_NBR/I2 = LAST RNK_NBR + 1; NOPRINT

BY HIGHEST TOT_SALES NOPRINT

BY COUNTRY

 

ON TABLE SET STYLE *

$

TYPE=DATA,

WHEN=RNK_NBR EQ 1,

COLOR='RED',

STYLE='BOLD',

$

ENDSTYLE

END

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...