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     [SHARING] Text over Image in a basic report
Go
New
Search
Notify
Tools
Reply
  
[SHARING] Text over Image in a basic report
 Login/Join
 
Expert
posted
Closing Comments: I knew that We Can Do That in WebFOCUS! I hope more people benefit from this and "Invent Applications around it".

Original Post: So, here's what I produced in App Studio (Text Editing) using TABLE, READFILE, A lot of HTML Tags, DIV, etc...

The question is: Can we do this in InfoAssist? Only kidding... How about a basic
TABLE FILE [filename]
... ... ... 
END
... Without -READFILE into variable then !IB.AMPing the variable in -HTMLFORM...? I have all those images, sized as needed...

Thanks, Doug

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


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
You may be able to do this with CSS.


But there is very little info to go on.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6124 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks Waz... And, just to add to it, The number of rows returned varies... So, Looping is required the way that I am doing it, successfully, now.

Maybe this is a NFR,,,
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Are you looking for something like this?

-* Download images to /baseapp
-* https://i.postimg.cc/3wxVh7vH/chevrongrn.png
-* https://i.postimg.cc/Nfy0sqRm/chevronyel.png
-* https://i.postimg.cc/jq35YdnR/chevronred.png

 TABLE FILE GGSALES
 SUM
 COMPUTE Date1/MDYY   = DATE; NOPRINT
 COMPUTE Date2/A8MDYY = Date1; NOPRINT
 COMPUTE Date3/A10    = EDIT(Date2,'99/99/9999'); NOPRINT
 COMPUTE Image/A15    = IF DATE LT '19960801' THEN 'chevrongrn.png' ELSE IF DATE LT '19970201' THEN 'chevronyel.png' ELSE 'chevronred.png'; NOPRINT
 COMPUTE Data/A999    = '<div style="position:relative;text-align:center;"><img src="/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_RUN&|BIP_folder=IBFS%253A%252FEDA%252FEDASERVE%252Fbaseapp&|BIP_item=' |
                         Image | '"><div style="position:absolute;top:50%;left:50%;transform:translate(-50%,-40%);">&|nbsp;&|nbsp;' |
                         Date3 | '</div></div>';
      BY REGION AS ''
      BY ST     AS ''
  ACROSS PCD    AS ''
 ON TABLE SET STYLE *
 INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty, $
 ENDSTYLE
 END  


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 139 | Registered: October 19, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Doug,

This would be an excellent example for the type of functions I demoed at Summit in 2016/17. The text could be laid on top of an SVG without issue.

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: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Tony A great idea.

 TABLE FILE GGSALES
 SUM
 COMPUTE Date1/MDYY   = DATE; NOPRINT
 COMPUTE Date2/A8MDYY = Date1; NOPRINT
 COMPUTE Date3/A10    = EDIT(Date2,'99/99/9999'); NOPRINT
 COMPUTE Color/A15    = IF DATE LT '19960801' THEN 'lime' ELSE IF DATE LT '19970201' THEN 'yellow' ELSE 'red'; NOPRINT
 COMPUTE Data/A999    = '<div style="position:relative;text-align:center;"><svg width="110" height="20"><polygon points="0,1 20,10 0,23 110,23 130,10 110,1" style="fill:'|
                         Color | ';stroke:gray;stroke-width:2;" /><div style="position:absolute;top:50%;left:50%;transform:translate(-50%,-40%);">' |
                         Date3 | '</div></div>';
      BY REGION AS ''
      BY ST     AS ''
  ACROSS PCD    AS ''
 ON TABLE SET STYLE *
 INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty, $
 ENDSTYLE
 END


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 139 | Registered: October 19, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
I was suggesting taking it one step further by using a FUNCTION - because then it is reuseable within InfoAssist.

I've added the date conversion to remind people that you can do all sorts of things in FUNCTIONs.

EX -LINES * EDAPUT MASTER,ORD_PROGRESS,CV,MEM
FILE=ORD_PROGRESS,SUFFIX=FOC
SEGNAME=SEG1
FIELD=ORDER_NO,   ,A15   ,A15   ,FIELDTYPE=I, $
FIELD=CUST_PO,    ,A15   ,A15   ,$
FIELD=LOCATION,   ,A30   ,A30   ,$
FIELD=DATE_ORD,     MISSING ON ,A8DMYY ,A8   ,$
FIELD=DATE_RCVD,    MISSING ON ,A8DMYY ,A8   ,$
FIELD=DATE_INTBEG,  MISSING ON ,A8DMYY ,A8   ,$
FIELD=DATE_INTEND,  MISSING ON ,A8DMYY ,A8   ,$
FIELD=DATE_SHIPPED, MISSING ON ,A8DMYY ,A8   ,$
FIELD=DATE_INSBEG,  MISSING ON ,A8DMYY ,A8   ,$
FIELD=DATE_INSEND,  MISSING ON ,A8DMYY ,A8   ,$
EDAPUT*
-RUN

CREATE FILE ORD_PROGRESS
MODIFY FILE ORD_PROGRESS
FREEFORM ORDER_NO CUST_PO LOCATION DATE_ORD DATE_RCVD DATE_INTBEG DATE_INTEND DATE_SHIPPED DATE_INSBEG DATE_INSEND
DATA
SO11463445,PO,SomeWhere,24012019,30012019,31012019,20022019,20022019,23022019,,$
SO11489767,PO,SomeWhere,29012019,05022019,0,,,,,$
SO11489768,PO,SomeWhere,29012019,05022019,06022019,9,,,,$
SO11515973,PO,SomeWhere,04022019,0,0,9,,,,$
SO11515974,PO,SomeWhere,04022019,15022019,18022019,20022019,20022019,23022019,,$
SO11528583,PO,SomeWhere,06022019,15022019,15022019,9,,,,$
SO11534772,PO,SomeWhere,04022019,12022019,14022019,28022019,28022019,06032019,,$
SO11534774,PO,SomeWhere,04022019,05022019,06022019,22022019,,,,$
SO11534775,PO,SomeWhere,07022019,12022019,13022019,,,,,$
END
-RUN

DEFINE FUNCTION F_CHEVRON (DISPDATE/A8, INFMT/A8, OUTFMT/A8)
  COLOUR/A27     = IF DISPDATE EQ ''  THEN '#fff'
              ELSE IF DISPDATE EQ '0' THEN '#f00'
	      ELSE IF DISPDATE EQ '9' THEN '#fefbbf' ELSE '#b2efc6';
  F_DISPDATE/A17 = IF DISPDATE IN ('','0','9') THEN '' ELSE
                   IF SUBSTRING(LJUST(8,OUTFMT,'A8'),3,1) IN ('D','M') THEN EDIT(DATECVT(DISPDATE, INFMT, OUTFMT),'99/99/9999')
                                                                       ELSE EDIT(DATECVT(DISPDATE, INFMT, OUTFMT),'9999/99/99');
  F_CHEVRON/A350 = '<svg width="120" height="21" version="1.1" xmlns="http://www.w3.org/2000/svg">'
                || '<polygon points="0,1 20,11 0,21 110,21 130,11 110,1" style="fill:' || COLOUR || ';stroke:#000;stroke-width:0.25;" />'
                || '<text x="65" y="11" dy="0.35em" text-anchor=middle style="font-size:12px;fill:#000;">' || F_DISPDATE || ' </text>'
                || '</svg>';
END
-RUN

DEFINE FILE ORD_PROGRESS
  G_DATE_ORD/A350     = F_CHEVRON(DATE_ORD, 'I8DMYY', 'A8MDYY');
  G_DATE_RCVD/A350    = F_CHEVRON(DATE_RCVD, 'I8DMYY', 'A8MDYY');
  G_DATE_INTBEG/A350  = F_CHEVRON(DATE_INTBEG, 'I8DMYY', 'A8MDYY');
  G_DATE_INTEND/A350  = F_CHEVRON(DATE_INTEND, 'I8DMYY', 'A8MDYY');
  G_DATE_SHIPPED/A350 = F_CHEVRON(DATE_SHIPPED, 'I8DMYY', 'A8MDYY');
  G_DATE_INSBEG/A350  = F_CHEVRON(DATE_INSBEG, 'I8DMYY', 'A8MDYY');
  G_DATE_INSEND/A350  = F_CHEVRON(DATE_INSEND, 'I8DMYY', 'A8MDYY');
END

TABLE FILE ORD_PROGRESS
PRINT
	  CUST_PO      AS 'Customer,PO'
	  LOCATION     AS 'Location'
	  G_DATE_ORD     AS 'Order,Date'
	  G_DATE_RCVD    AS 'Inventory,Received'
	  G_DATE_INTBEG  AS 'Intergaration,Start'
	  G_DATE_INTEND  AS 'Integration,Complete'
	  G_DATE_SHIPPED AS 'Ship to,Location'
	  G_DATE_INSBEG  AS 'Installation,Start'
	  G_DATE_INSEND  AS 'Installation,Complete'
   BY ORDER_NO     AS 'Sales,Order,
ON TABLE SET PAGE NOLEAD
ON TABLE SET ACROSSTITLE SIDE
ON TABLE SET STYLE *
  grid=off, $
  type=report, lines-per-page=unlimited, $
  type=title, justify=center, $
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: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Good One


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1634 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Tony, I like it.


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 139 | Registered: October 19, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Excellent Tony! I knew we could We can do that in WebFOCUS!, and in InfoAssist... How great is that!

See you at Summit?
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Yes Doug, I'll be there this year.



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: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Yea! See you there... In Your Session...

So, why do I get this (No Chevrons):
With this code (Yep, I changed it a pit to better match my scenario):
-*EX -LINES * EDAPUT MASTER,ORDERZ,CV,MEM
FILEDEF ORDERZ DISK D:\IBI\APPS\BUSINESS_INTELLIGENCE\ORDERZ.mas
-RUN
-WRITE ORDERZ FILE=ORDERZ,SUFFIX=FOC
-WRITE ORDERZ SEGNAME=SEG1
-WRITE ORDERZ FIELD=SO_NUMBER,    ,A15   ,A15,   TITLE='SO Number', ,FIELDTYPE=I, $
-WRITE ORDERZ FIELD=PO_NUMBER,    ,A15   ,A15,   TITLE='PO Number', ,$
-WRITE ORDERZ FIELD=LOCATION,     ,A30   ,A30,   TITLE='', ,$
-WRITE ORDERZ FIELD=DATE_ORD,     MISSING ON ,A8DMYY ,A8   ,$
-WRITE ORDERZ FIELD=DATE_RCVD,    MISSING ON ,A8DMYY ,A8   ,$
-WRITE ORDERZ FIELD=DATE_INTBEG,  MISSING ON ,A8DMYY ,A8   ,$
-WRITE ORDERZ FIELD=DATE_INTEND,  MISSING ON ,A8DMYY ,A8   ,$
-WRITE ORDERZ FIELD=DATE_SHIPPED, MISSING ON ,A8DMYY ,A8   ,$
-WRITE ORDERZ FIELD=DATE_INSBEG,  MISSING ON ,A8DMYY ,A8   ,$
-WRITE ORDERZ FIELD=DATE_INSEND,  MISSING ON ,A8DMYY ,A8   ,$
-*EDAPUT*
-RUN

CREATE FILE ORDERZ
MODIFY FILE ORDERZ
FREEFORM SO_NUMBER PO_NUMBER LOCATION DATE_ORD DATE_RCVD DATE_INTBEG DATE_INTEND DATE_SHIPPED DATE_INSBEG DATE_INSEND
DATA
011463445,000000123,Tennessee,24012019,30012019,31012019,20022019,20022019,23022019,,$
011489767,000000456,New York,29012019,05022019,0,,,,,$
011489768,000000789,Tennessee,29012019,05022019,06022019,9,,,,$
011515973,000000101,New York,04022019,0,0,9,,,,$
011515974,000000112,Tennessee,04022019,15022019,18022019,20022019,20022019,23022019,,$
011528583,000000131,New York,06022019,15022019,15022019,9,,,,$
011534772,000000516,Tennessee,04022019,12022019,14022019,28022019,28022019,06032019,,$
011534774,000000718,Virginia,04022019,05022019,06022019,22022019,,,,$
011534775,000000910,Kansas,07022019,12022019,13022019,,,,,$
END
-RUN

DEFINE FUNCTION F_CHEVRON (DISPDATE/A8, INFMT/A8, OUTFMT/A8)
  COLOUR/A27 = IF DISPDATE EQ ''  THEN '#fff'
          ELSE IF DISPDATE EQ '0' THEN '#f00'
          ELSE IF DISPDATE EQ '9' THEN '#fefbbf' ELSE '#b2efc6';
  F_DISPDATE/A17 = IF DISPDATE IN ('','0','9')                         THEN 'n/a' ELSE
                   IF SUBSTRING(LJUST(8,OUTFMT,'A8'),3,1) IN ('D','M') THEN EDIT(DATECVT(DISPDATE, INFMT, OUTFMT),'99/99/9999')
                                                                       ELSE EDIT(DATECVT(DISPDATE, INFMT, OUTFMT),'9999/99/99');
  F_CHEVRON/A350 = '<svg width="120" height="21" version="1.1" xmlns="http://www.w3.org/2000/svg">'
                || '<polygon points="0,1 20,11 0,21 110,21 130,11 110,1" style="fill:' || COLOUR || ';stroke:#000;stroke-width:0.25;" />'
                || '<text x="65" y="11" dy="0.35em" text-anchor=middle style="font-size:12px;fill:#000;">' || F_DISPDATE || ' </text>'
                || '</svg>';
END
-RUN

DEFINE FILE ORDERZ
  G_DATE_ORD/A350     = F_CHEVRON(DATE_ORD, 'I8DMYY', 'A8MDYY');
  G_DATE_RCVD/A350    = F_CHEVRON(DATE_RCVD, 'I8DMYY', 'A8MDYY');
  G_DATE_INTBEG/A350  = F_CHEVRON(DATE_INTBEG, 'I8DMYY', 'A8MDYY');
  G_DATE_INTEND/A350  = F_CHEVRON(DATE_INTEND, 'I8DMYY', 'A8MDYY');
  G_DATE_SHIPPED/A350 = F_CHEVRON(DATE_SHIPPED, 'I8DMYY', 'A8MDYY');
  G_DATE_INSBEG/A350  = F_CHEVRON(DATE_INSBEG, 'I8DMYY', 'A8MDYY');
  G_DATE_INSEND/A350  = F_CHEVRON(DATE_INSEND, 'I8DMYY', 'A8MDYY');
END

TABLE FILE ORDERZ
PRINT PO_NUMBER      AS 'Customer,PO'
	  LOCATION       AS 'Location'
	  G_DATE_ORD     AS 'Order,Date'
	  G_DATE_RCVD    AS 'Inventory,Received'
	  G_DATE_INTBEG  AS 'Intergaration,Start'
	  G_DATE_INTEND  AS 'Integration,Complete'
	  G_DATE_SHIPPED AS 'Ship to,Location'
	  G_DATE_INSBEG  AS 'Installation,Start'
	  G_DATE_INSEND  AS 'Installation,Complete'
BY    SO_NUMBER      AS 'Region'
ON TABLE SET PAGE NOLEAD
ON TABLE SET ACROSSTITLE SIDE
ON TABLE SET STYLE *
  grid=off, $
  type=report, font=arial, lines-per-page=unlimited, $
  type=title, justify=center, $
ENDSTYLE
END  
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Works fine for me (once I get rid of the permanent master code etc.!!).

What browser and browser version are you using?

I am guessing that you're using IE8!! You need IE9 minimum for SVG support.

Also beware that IE's SVG is quite "loose" and if you exceed width and/or height specs, IE will "adjust"nthe SVG. Chrome will not, so the SVG in the Function will truncate. So you might like to change it to the following -

  F_CHEVRON/A350 = '<svg width="100" height="21" version="1.1" xmlns="http://www.w3.org/2000/svg">'
                || '<polygon points="0,1 15,11 0,21 85,21 100,11 85,1" style="fill:' || COLOUR || ';stroke:#000;stroke-width:0.25;" />'
                || '<text x="50" y="11" dy="0.35em" text-anchor=middle style="font-size:12px;fill:#000;">' || F_DISPDATE || ' </text>'
                || '</svg>';


You still need IE9 minimum though Smiler

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: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Two things:
1) I'm outputting to IE 11.
2) The 'EX -LINES * EDAPUT MASTER,ORDERZ,CV,MEM' produces the "Cannot include resource specified IBFS:/-LINES" error. So, I changed to the FILEDEF.

I guess it goes deeper as I don't get the chevons from the code in dbeagan's May 01 2019 20:59 post either.

I'll take Much Better notes in your Summmit Session(s) this year... I Promise Smiler
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
1) I don't have IE11 so cannot test (emulation from Edge). Check the mode from within developer tools to see what mode it is actually running in - just in case! Even though it says it's IE11, it might be running in emulation because of HTML headers etc.

2) You are running from within "MRE" so you need the alternate EXEC or prefix with -MRNOEDIT - but you knew that and it was just a "senior moment" Wink

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: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Yeah... I knew that... sometime ago... I seem to have forgotten more than I can remember Smiler ... Stack Overflow? Anyway, that worked... Of course it did Smiler

I'm so looking forward to Summit to see how much more I can cram into this brain of mine... And do a Major Defrag to clear out all the stuff that's changed since 1983...
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Nice Thread


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 453 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
Now, I'm making a 'Nice Thread' (Thanks Hallway) even better.

Of course Tony was correct in what he stated. However, it needed "ON TABLE PCHOLD FORMAT AHTML", or HTML, added for it to work on my system from within App Studio. Weird... But that's all that I did (There's a lot of Browser stuff going on here, which is fine). Maybe there's a deeper explanation to that which may or may not be discovered. But, here it is... Tony's Original Fex, with that one PCHOLD line added.

Thanks Again Tony... See you at Summit Smiler
 
Posts: 3034 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Awesome technique.

Wish I had a use for it. Perhaps I should invent one.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6124 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks Waz!

@ Doug, I was a little concerned when you suggested AHTML but having just tried it, the FILTER option actually shows the graphic (8.2.05) which is reassuring!

Even sorting works fine (on initial checks anyway!).

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: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Waz: Go For It!
quote:
Perhaps I should invent one.
Tony: You got me going on this and I kept on going. You're a great Teacher... Professor...
Of course, I knew that We Can Do That in WebFOCUS!
I hope more people benefit from this and "Invent Applications around it.
See You At Summit!

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


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3034 | 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     [SHARING] Text over Image in a basic report

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