Jump to content

It is quite possible that there is no way around this, but I...


Ben Maxwell

Recommended Posts

It is quite possible that there is no way around this, but I am now able to successfully write some FML Code which dynamically returns images.

My only issue is that when this dumps into Excel, you are able to click and drag the image around, and thereby are unable to sort the data and sort the traffic lights as well.

 

Is there any way to tweak this code to make it happen

TABLE FILE IBISAMP/GGSALES

SUM

GGSALES.SALES01.UNITS

GGSALES.SALES01.DOLLARS

COMPUTE Image/A30 = IF UNITS LE 1000000 THEN images/red_dot.png ELSE images/green_dot.png; AS Traffic,Light

FOR

GGSALES.SALES01.CATEGORY

Coffee AS Coffee LABEL R0100 OVER

Food AS Food LABEL R0200 OVER

Gifts AS Gifts LABEL R0300 OVER

RECAP R1000(1)/P20CB=R0100+R0200+R0300;

AS Total Items OVER

RECAP R1000(3)=IF R1000(1) GT 5000000 THEN images/red_dot.png ELSE IF R1000(1) LT 5000000 THEN images/green_dot.png;

OVER

RECAP R1100(1)/P20CB=100000*(R0100+R0200+R0300);

AS Crazy Test Total OVER

RECAP R1100(3)=IF R1100(1) GT 5000000 THEN images/red_dot.png ELSE IF R1000(1) LT 5000000 THEN images/green_dot.png;

ON TABLE SET PAGE NOLEAD

ON TABLE SET ASNAMES ON

ON TABLE NOTOTAL

ON TABLE PCHOLD FORMAT XLSX

ON TABLE SET XLSXPAGESETS ON

ON TABLE SET STYLE *

$

TYPE=REPORT,

BORDER-TOP=LIGHT,

BORDER-BOTTOM=LIGHT,

BORDER-LEFT=LIGHT,

BORDER-RIGHT=LIGHT,

$

TYPE=DATA,

COLUMN=N4,

IMAGE=(Image),

SIZE=(0.152778 0.166667),

$

TYPE=TITLE,

COLOR=WHITE,

BACKCOLOR=SILVER,

$

ENDSTYLE

END

Link to comment
Share on other sites

I was not able to reproduce your sorting issue. I ran your code {after having to replace all tick marks as they didnt copy and paste as tick marks into the WF text editor) and putting the images in place on my server and was able to sort A to Z and Z to A and custom sorts by the two measures and the images moved accordingly. I am using 8.2.06.27
Link to comment
Share on other sites

Interesting

Here is the Original Output

 

When I Sort of Column A, the images do follow suit (and the same as true when sorting on Columns B or C)

 

A couple of the limitations are

 

Cant sort of the Traffic Light Column

Cant filter on the Traffic Light Column

Someone can click and drag the traffic lights however they wish

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...