Focal Point
Can anyone help

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

June 16, 2006, 09:17 PM
Adolf Mergulhao
Can anyone help
I am trying to run a report that can display flags onto an AHTML report. I have a image for each country. How do I compile a report so that the Country name appears and the next column if the image of the flag of the country.

Any Ideas

An example

Germany Flag (image of the flag)
Frane Flag (image of the flag)


Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 19, 2006, 07:05 AM
Tony A
Hi Adolf,

How about just using a COMPUTE for your flag column, something like -

  COMPUTE flag_col/A120 = '<img src='||COUNTRY||'.jpg border=0 alt="'||COUNTRY||'">'


Of course, you'll have to ensure that the value for COUNTRY has no embedded spaces such as per CAR file. Haven't tested the above, but it should be OK.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 19, 2006, 07:22 AM
Adolf Mergulhao
Here is the coding I getting an error message when I enter the request code.

the image files are ger.jpg for germany eng.jpg for england etc

TABLE FILE WORLDCUP
-* Generated by Report Assist
PRINT
MATCH_SCHEDULE AS 'Match Schedule'
WORLD_RANK AS 'World ranking'
GROUP_SIDE AS 'Group'
POINTS_SCORED AS 'Points'
GAMES_PLAYED AS 'Played'
WON AS 'Won'
LOST AS 'Lost'
DREW AS 'Drew'
GOALS AS 'Goals'
GA AS 'Goal against'
GOALS_DIFF AS 'Goal Diff'
YELLOW_CARDS AS 'Yellow cards'
RED_CARDS AS 'Red cards'
TOP_SCORER AS 'Top scorer'
MAN_MATCH AS 'Man of the match'
FOULS AS 'No of fouls'
PLAYERS_BOOKED AS 'Player booked'
UP_STAR AS 'High Flyers'
DOWN_STAR AS 'Low Flyers'
WON_AGAINST AS 'Won against'
WORLD_CUP_WINS AS 'World Cups'
WINNING_YEARS AS 'Year won'
FLAG AS 'Flag reference'
GOLD_BALL AS 'Golden ball player'
BY HIGHEST GAMES_PLAYED NOPRINT
BY GROUP_SIDE NOPRINT
BY GROUP_POSITION AS 'Position'
BY COUNTRY AS 'Country'
ON TABLE SUBHEAD
" "
HEADING
" <+0>World Cup 2006 Statistical Analysis Active Report<+0> <+0> "
FOOTING
"Report produced on <+0>&DATEtMDYY <+0> ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
LINES-PER-PAGE=20,
WHEN=N3 GT 2,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
LINES-PER-PAGE=20,
$
TYPE=DATA,
SIZE=8,
BACKCOLOR=( RGB(234 234 255) 'WHITE' ),
$
TYPE=DATA,
COLUMN=N17,
COLOR='RED',
$
TYPE=DATA,
COLUMN=N16,
COLOR=RGB(255 204 0),
$
TYPE=DATA,
COLUMN=N19,
COLOR='BLACK',
$
TYPE=DATA,
COLUMN=N18,
COLOR='BLACK',
$
TYPE=DATA,
COLUMN=N3,
SIZE=9,
STYLE=BOLD,
$
TYPE=DATA,
COLUMN=N3,
COLOR='RED',
STYLE=BOLD,
MACRO=COND0001,
$
TYPE=DATA,
COLUMN=N4,
SIZE=9,
STYLE=BOLD+ITALIC,
$
TYPE=DATA,
COLUMN=N21,
SIZE=8,
STYLE=NORMAL,
$
TYPE=TITLE,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N3,
COLOR='RED',
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N4,
COLOR='GREEN',
$
TYPE=TABHEADING,
SIZE=9,
STYLE=BOLD,
$
TYPE=TABHEADING,
IMAGE=BIIMAGE.gif,
POSITION=(+0.000000 +0.000000),
IMAGEBREAK=ON,
$
TYPE=TABFOOTING,
SIZE=9,
STYLE=BOLD,
$
TYPE=TABFOOTING,
LINE=2,
JUSTIFY=CENTER,
$
TYPE=TABFOOTING,
LINE=3,
JUSTIFY=CENTER,
$
TYPE=HEADING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
COLOR='NAVY',
STYLE=BOLD+ITALIC,
$
TYPE=FOOTING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=FOOTING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=8,
COLOR='GREEN',
$
TYPE=FOOTING,
LINE=1,
OBJECT=TEXT,
ITEM=2,
SIZE=8,
COLOR='GREEN',
$
TYPE=FOOTING,
LINE=1,
OBJECT=TEXT,
ITEM=3,
SIZE=8,
COLOR='GREEN',
$
TYPE=FOOTING,
LINE=1,
OBJECT=TEXT,
ITEM=4,
SIZE=8,
COLOR='GREEN',
$
TYPE=FOOTING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
SIZE=8,
COLOR='GREEN',
$
TYPE=SUBHEAD,
SIZE=9,
STYLE=BOLD,
$
TYPE=SUBFOOT,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=SUBTOTAL,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
COLUMN=ROWTOTAL(1),
BACKCOLOR=RGB(234 234 255),
$
TYPE=ACROSSTITLE,
SIZE=8,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
SIZE=9,
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N19,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N18,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N21,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N22,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N5,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N6,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N24,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N0,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N7,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N23,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N20,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N26,
WRAP=8.000000,
$
TYPE=REPORT,
COLUMN=N28,
WRAP=8.000000,
$
ENDSTYLE
END


Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 19, 2006, 07:33 AM
Tony A
Adolf,

I take it that the field FLAG just contains the file name? If that is true then your problem is likely to be the fact that a file name between two TD tags will not show the image for you. You will have to enclose it in an IMG tag. Replace your "FLAG AS 'Flag reference'" line with -

  COMPUTE FLAG_IMG/A80 = '<img src='||FLAG||' border=0>';


You will have to modify the "src=" to include the path to where your images are, such as "src=/ibi_html/images/".

T

p.s. When you want to include code in your post, click on the red icon showing two carats and a forward slash in the far right of the icon tool bar when creating a reply.



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 19, 2006, 07:53 AM
Adolf Mergulhao
teh images files are stored in
C:\ibi\apps\mis7

The code runs without an errors by the flags are no displayed. just a quick query the image is eng.jpg does teh compute need to reference the .jpg extension


Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server
June 19, 2006, 08:06 AM
Adolf Mergulhao
Thanks Tony it worked.

You are the best


Webfocus 7.6.2 on Windows Enterprise 2003 Server and
Webfocus 7.6.2 on HP Unix Server