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

I have the following repro code where I would like to also h...


Martin Yergeau

Recommended Posts

I have the following repro code where I would like to also have the Image displayed in Sub-Total and Grand-Total.

Is this possible using this method for image display

I have found another way to display image that also work with S-T and G-T but not working with PDF format.

With this sample, both S-T & G-T should display the green dot.

Solution must work for HTML & PDF.

TABLE FILE GGSALES

PRINT UNITS

COMPUTE Image/A30 = IF (UNITS LE 1600 AND CATEGORY EQ 'Coffee')

OR (UNITS LE 1100 AND CATEGORY EQ 'Gifts')

THEN 'logo_img/dot_red.gif'

ELSE 'logo_img/dot_green.gif'; AS 'Traffic,Light'

BY CATEGORY

ON CATEGORY RECOMPUTE AS 'Sub-Total'

WHERE SEQ_NO LE 9 OR (SEQ_NO GT 2880 AND SEQ_NO LE 2889);

ON TABLE SET PAGE NOLEAD

ON TABLE PCHOLD FORMAT HTML

ON TABLE RECOMPUTE AS 'Grand-Total'

ON TABLE SET STYLE *

TYPE=REPORT, BORDER=LIGHT, $

TYPE=TITLE, COLOR=WHITE, BACKCOLOR=SILVER, $

TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .03), SIZE=(0.15 0.15),

-*TYPE=SUBTOTAL, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .03), SIZE=(0.15 0.15), $

-*TYPE=GRANDTOTAL, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .03), SIZE=(0.15 0.15), $

$

ENDSTYLE

END

Link to comment
Share on other sites

I am also trying to create a legend in the report header to explain with is the signification of the dots color but not able to have the dot (image) displayed in heading when its pdf output.

-DEFAULTH &WFFMT = 'HTML'

DEFINE FILE GGSALES

DOTRED /A150V = IF '&WFFMT.EVAL' EQ 'HTML' THEN '<IMG SRC="/ibi_apps/run/ibfsIBFS_path=EDA/EDASERVE/logo_img/dot_red.gif">' ELSE 'logo_img/dot_red.gif';

DOTGREEN /A150V = IF '&WFFMT.EVAL' EQ 'HTML' THEN '<IMG SRC="/ibi_apps/run/ibfsIBFS_path=EDA/EDASERVE/logo_img/dot_green.gif">' ELSE 'logo_img/dot_green.gif';

END

TABLE FILE GGSALES

PRINT UNITS

COMPUTE Image/A30 = IF (UNITS LE 1600 AND CATEGORY EQ 'Coffee')

OR (UNITS LE 1100 AND CATEGORY EQ 'Gifts')

THEN 'logo_img/dot_red.gif'

ELSE 'logo_img/dot_green.gif'; AS 'Traffic,Light'

DOTRED NOPRINT

DOTGREEN NOPRINT

BY CATEGORY

ON CATEGORY RECOMPUTE AS 'Sub-Total'

WHERE SEQ_NO LE 9 OR (SEQ_NO GT 2880 AND SEQ_NO LE 2889);

 

HEADING

"<DOTRED : Less than 1600 units"

"<DOTGREEN : More than 1600 units"

 

ON TABLE SET PAGE NOLEAD

ON TABLE PCHOLD FORMAT &WFFMT

ON TABLE RECOMPUTE AS 'Grand-Total'

ON TABLE SET STYLE *

TYPE=REPORT, BORDER=LIGHT, $

TYPE=TITLE, COLOR=WHITE, BACKCOLOR=SILVER, $

TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .03), SIZE=(0.15 0.15), $

TYPE=SUBTOTAL, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .03), SIZE=(0.15 0.15), $

TYPE=GRANDTOTAL, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .03), SIZE=(0.15 0.15), $

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