Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image in the report column using InfoAssist in 8204
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Image in the report column using InfoAssist in 8204
 Login/Join
 
Expert
posted
So, based on the 'Image in the report column does not appear in 8201m' post, the question is: How is this possible entirely in 8204 InfoAssist?

I'm already anticipating the solution being 'Use a Reporting Object'. But, I, (By I, I mean 'They'), need everything done in IA.

Here's the code, and a few lines of the result, from App Studio:
-* Code:
-SET &UP_ARROW  ='<span style="color: green; font-size:100%; weight=1200;">&|#x2197;</span>';
-SET &DOWN_ARROW='<span style="color: red;   font-size:100%; weight=1200;">&|#x2198;</span>';
DEFINE FILE CAR
Arrow/A128 = IF SEATS EQ 2 THEN '&DOWN_ARROW' ELSE IF SEATS EQ 4 THEN '=' ELSE '&UP_ARROW' ;
END

TABLE FILE CAR
SUM SEATS Arrow AS '*'
BY MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET CACHELINES ON
ON TABLE SET BYDISPLAY ON
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, BORDER=LIGHT, $
ENDSTYLE
END

-* The first few lines of the result: The '↗' world be green and the '↘' would be red.
MODEL            SEATS *
100 LS 2 DOOR AUTO   5 ↗ 
2000 4 DOOR BERLINA  4 = 
2000 GT VELOCE       2 ↘ 
. . .

Thanks, Doug

This message has been edited. Last edited by: FP Mod Chuck,


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Doug,

Repeat your mantra to yourself again. You've obviously forgotten the message.

The answer, of course, is yes - providing you do not want the characters to be variables(?).

Just add the &|#x2198 directly into your define and then conditionally colour the background for the ARROW column using the "Traffic Light Conditions" from the "More" menu item when right clicking on the column in question.

With all these recent questions on IA, would it be beneficial for you ('They') to get your local IB team to give some tuition specifically on IA?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5573 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Code from proof entirely in IA.
-*COMPONENT=Define_CAR
DEFINE FILE CAR
ARROW/A12=IF CAR.BODY.SEATS EQ 2 THEN '&|#x2197' ELSE IF CAR.BODY.SEATS EQ 4 THEN '=' ELSE '&|#x2198' ;
END
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET HTMLCSS=ON
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE CAR
SUM CAR.BODY.SEATS
ARROW AS '*'
BY CAR.CARREC.MODEL
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET GRWIDTH 1
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=N2 EQ 2, $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=N2 GT 4, $
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, PAGESIZE=A4, $
TYPE=DATA, COLUMN=N3, MACRO=Condition_1, FONT='ARIAL', BACKCOLOR=(RGB(255 0 0) RGB(255 0 0)), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_2, FONT='ARIAL', BACKCOLOR=(RGB(0 255 64) RGB(0 255 64)), $
ENDSTYLE
END

-RUN


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5573 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks Tony. I do believe that We Can Do That In WebFOCUS!
We Can Do That In WebFOCUS!
We Can Do That In WebFOCUS! But, in IA Frowner ? Here's what I'm getting:


The difference is the -DEFAULTH &WF_HTMLENCODE=ON or OFF; setting. IA Has it as 'ON' when it needs to be 'OFF'.

The question is: How to change that for specific fexes within IA? As it may inadvertently affect others if we set is for the environment.


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Of course!

Does it have to be those characters or could they use HEXBYT(221,'A1') and 223 using the SYMBOL font?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5573 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
Does it have to be those characters or could they use HEXBYT(221,'A1') and 223 using the SYMBOL font?
Short answer: No... I started with 'codes', based on the 'Image in the report column does not appear in 8201m' post. However, images would be better. However, I had issues (running thru a learning curve in 8204 IA) accessing images, it didn't work the same way as in that post. I uploaded the 'Arrow Images' to a Common App Folder and can get them to a Common Domain Folder, where ever Best Practices would recommend.

Thanks, Doug
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
So, the questions remain:

1) How, within IA, can we change an environmental variable, such as: &WF_HTMLENCODE from ON to OFF ;?

2) What, within IA, is the proper addressing to use an image within a COMPUTE or DEFINE?

Thanks, Doug
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
quote:
Originally posted by Doug:

1) How, within IA, can we change an environmental variable, such as: &WF_HTMLENCODE from ON to OFF ;?


To make TonyA's Example work, select the Procedure Settings and change the HTML Encode to Off (Link to the docs HERE) :

This message has been edited. Last edited by: Hallway,


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 347 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
quote:
Originally posted by Doug:
quote:
Does it have to be those characters or could they use HEXBYT(221,'A1') and 223 using the SYMBOL font?
Short answer: No... I started with 'codes', based on the 'Image in the report column does not appear in 8201m' post. However, images would be better. However, I had issues (running thru a learning curve in 8204 IA) accessing images, it didn't work the same way as in that post. I uploaded the 'Arrow Images' to a Common App Folder and can get them to a Common Domain Folder, where ever Best Practices would recommend.

Thanks, Doug


If you'd rather use an image you can. You just need to put in the <img> with the proper src link. Below is an example built entirely in IA+ using both code and images. in the image, I have an app folder called images on my reporting server that I am referencing to:
  
-*COMPONENT=Define_car
DEFINE FILE ibisamp/car
CODE/A12=IF CAR.BODY.SEATS EQ 2 THEN '&|darr;' ELSE IF CAR.BODY.SEATS EQ 4 THEN '&|rarr;' ELSE '&|uarr;' ;
IMAGE/A250V=IF CAR.BODY.SEATS EQ 2 THEN '<img src="/ibi_apps/run/ibfs?IBFS_path=/EDA/EDASERVE/images/D_xlRedArrow.png" alt="Red Arrow Down">' ELSE 
IF CAR.BODY.SEATS EQ 4 THEN '<img src="/ibi_apps/run/ibfs?IBFS_path=/EDA/EDASERVE/images/C_xlYellowArrow.png" alt="Yellow Arrow Right">' ELSE 
'<img src="/ibi_apps/run/ibfs?IBFS_path=/EDA/EDASERVE/images/A_xlGreenArrow.png" alt="Green Arrow Up">' ;
END
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET HTMLCSS=ON
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE ibisamp/car
SUM CAR.BODY.SEATS
CODE
IMAGE
BY CAR.CARREC.MODEL
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET GRWIDTH 1
ON TABLE SET AUTOFIT OFF
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/endeflt.sty,$
DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=N2 EQ 2, $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=N2 GT 4, $
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, HFREEZE=OFF, $
TYPE=DATA, COLUMN=N2, JUSTIFY=CENTER, $
TYPE=DATA, COLUMN=N3, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=11, COLOR=RGB(232 155 35), STYLE=BOLD, HYPERLINK-COLOR=RGB(232 155 35), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_1, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=11, COLOR=RGB(255 0 0), STYLE=BOLD, HYPERLINK-COLOR=RGB(255 0 0), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_2, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=11, COLOR=RGB(0 128 0), STYLE=BOLD, HYPERLINK-COLOR=RGB(0 128 0), $
ENDSTYLE
END

-RUN




Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 347 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
You could also use an svg for the arrow in your define:
  
SVG/A200V=IF CAR.BODY.SEATS EQ 2 THEN '<svg height="16" width="16" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><polygon points="7,1 19,1 19,13 25,13 13,25 1,13 7,13" style="fill: red; stroke: black; stroke-width: 1;" /></svg>' 
ELSE IF CAR.BODY.SEATS EQ 4 THEN '<svg height="16" width="16" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><polygon points="13,1 25,13 13,25 13,19 1,19 1,7 13,7" style="fill: yellow; stroke: black; stroke-width: 1;" /></svg>'
ELSE '<svg height="16" width="16" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" ><polygon points="13,1 25,13 19,13 19,25 7,25 7,13 1,13" style="fill: green; stroke: black; stroke-width: 1;" /></svg>';


   

This message has been edited. Last edited by: Hallway,


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 347 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks, and sorry for the delayed reply. I'll check that 'image' solution today.


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image in the report column using InfoAssist in 8204

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.