robert fuschetto Posted April 6, 2021 Share Posted April 6, 2021 I saw /recall this from one of the WF courses we did but the coursebook is not specific enough for me to successfully implement. What I really want is to display QTY1, QTY2 and if QTY1> QTY2 then show a green circle. I started with this: -DEFAULT &IMAGE_THEME = thtml -DEFAULT &IMAGE_SIZE = 20 -SET &REDCIRCLE =<img src="images/red_dot.png"height=&IMAGE_SIZE.EVAL width=&IMAGE_SIZE.EVAL>; -SET &GREENCIRCLE =<img src="images/green_dot.png"height=&IMAGE_SIZE.EVAL width=&IMAGE_SIZE.EVAL>; Then I thought, i should not even need those! I added a compute that does this: COMPUTE Image/A30 = IF QTY1 LE QTY2 THEN images/red_dot.png ELSE images/green_dot.png; Now the compute it works to a point. It does not display the red or green circle but rather shows the text: images/red_dot.png or images/green_dot.png. NEXT I added &GREENCIRCLE and &REDCIRCLE to the page header for the heack of it. Nothing appears. Bottom line, I missed the boat on this one! Any suggestions as to the best approach for this Link to comment Share on other sites More sharing options...
David Beagan Posted April 6, 2021 Share Posted April 6, 2021 Are you trying to do this TABLE FILE ibisamp/ggsales PRINT UNITS DOLLARS COMPUTE Image/A30 = IF UNITS LE 1600 THEN 'images/red_dot.png' ELSE 'images/green_dot.png'; AS 'Traffic,Light' BY CATEGORY WHERE SEQ_NO LE 9 ON TABLE SET PAGE NOLEAD ON TABLE PCHOLD FORMAT HTML ON TABLE SET STYLE * TYPE=REPORT, BORDER=LIGHT, $ TYPE=TITLE, COLOR=WHITE, BACKCOLOR=SILVER, $ TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .01), SIZE=(.16 .18), $ ENDSTYLE END Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted April 6, 2021 Share Posted April 6, 2021 Robert Davids example should help you. You were missing the stylesheet component for the image. Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 6, 2021 Author Share Posted April 6, 2021 Yes and no. Or master files are on the EDASERVER in a folder. My fex is under DOMAINS in a folder; say its called QTYReports. The red and green dot images sit alongside the fexes under DOMAINS in a folder called IMAGES. Would this be an issue It feels like I am not referencing the images correctly OR more likely its not substituting the image but rather just evaluates and displays the string: COMPUTE Image/A30 = IF QTY1 LE QTY2 THEN images/red_dot.png ELSE images/green_dot.png; as Traffic Light Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted April 6, 2021 Share Posted April 6, 2021 Robert Does Davids sample code work on your system Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 6, 2021 Author Share Posted April 6, 2021 YES! I took everything from here down and pasted into minenow it worksIll try to figure out how I went wrong ON TABLE SET PAGE NOLEAD ON TABLE PCHOLD FORMAT HTML ON TABLE SET STYLE * TYPE=REPORT, BORDER=LIGHT, $ TYPE=TITLE, COLOR=WHITE, BACKCOLOR=SILVER, $ TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .01), SIZE=(.16 .18), $ ENDSTYLE Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 6, 2021 Author Share Posted April 6, 2021 I rebuilt mine from scratch stopping after adding the compute. What formatting should I be applying to the compute At this point I have this: ON TABLE SET PAGE NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET STYLE * $ ENDSTYLE Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 6, 2021 Author Share Posted April 6, 2021 more specifcially, what do I do in the GUI to the compute column Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted April 6, 2021 Share Posted April 6, 2021 Robert Excellent question and I dont know how to do it either. The only way I could make it work was to edit the report in text and add these lines. between the ON TABLE SET STYLE * and ENDSTYLE TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .01), SIZE=(.16 .18), $ David is it possible to do the styling change in the GUI After I posted this I put that stylesheet syntax in a stylesheet that I referenced in the fex INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$ and that worked so I didnt have to touch the fex manually. Link to comment Share on other sites More sharing options...
David Beagan Posted April 6, 2021 Share Posted April 6, 2021 Im thinking not with the InfoAssist GUI. Possibly with the App Studio GUI. I think that the line of code you want could be added to the default style sheet. I think that was the approach that Debra Waybright did for HEADALIGN=BODY in this one: Excel totals in a separate cell Link to comment Share on other sites More sharing options...
Patrick Huebgen Posted April 7, 2021 Share Posted April 7, 2021 MOST IMPORTANT add ON TABLE SET HTMLENCODE ON to your report In addition I recorded a technique recently - maybe you like this Patrick Link to comment Share on other sites More sharing options...
David Beagan Posted April 7, 2021 Share Posted April 7, 2021 Thanks Patrick, good to know about fontawsome. The technique we were discussing is not specific to HTML and therefore not dependent on the HTMLENCODE setting. It works with PDF and XLSX too. Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 7, 2021 Author Share Posted April 7, 2021 chuck.wolff: TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .01), SIZE=(.16 .18), $ Well I have lights! I hope the enhance the GUI though. RE: References to IMAGE: COMPUTE Image/A30 Is Image a keyword or could it anything, like COMPUTE QtyImage/A30 COMPUTE DollarImage/A30 and if it could be anything, how would this stuff need to be altered TYPE=DATA, JUSTIFY=CENTER, COLUMN=Image, IMAGE=(Image), POSITION=(.01 .01), SIZE=(.16 .18), $ Link to comment Share on other sites More sharing options...
David Beagan Posted April 7, 2021 Share Posted April 7, 2021 If you were to use: COMPUTE QtyImage/A30 then the style sheet code would change in two places: TYPE=DATA, JUSTIFY=CENTER, COLUMN=QtyImage, IMAGE=(QtyImage), POSITION=(.01 .01), SIZE=(.16 .18), $ Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted April 7, 2021 Share Posted April 7, 2021 You could also make the field name a variable and then the stylesheet could remain static and just set the variable in the fex. TYPE=DATA, JUSTIFY=CENTER, COLUMN=&IMAGE_FIELD, IMAGE=(&IMAGE_FIELD), POSITION=(.01 .01), SIZE=(.16 .18), $ Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 7, 2021 Author Share Posted April 7, 2021 One last thingmy cubemate says the images themselves must reside here: basappimages. Yet in the code I simply type, for example: images/greenlight.png NOT: basapp/images/greenlight.png How does it know The reason I ask is under our DOMAINS, we have a folder called: images that happens to have all the images we usein fact the green light / red light pngs are here. I assumed it was looking here but my cube mate said it only found the green light / red light once copied to baseapp/images. Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 7, 2021 Author Share Posted April 7, 2021 actually another last thing. So I now have running something simple. It shows the Percent increase or decrease and a red or green light: how do I get rid of the border above / below the green DOT. You can change the settings in the border settings in the GUI but it resets right back to : Light. If you turn it off in the codeit seems to be ignored. Link to comment Share on other sites More sharing options...
David Beagan Posted April 7, 2021 Share Posted April 7, 2021 I think that the reference to images/green_dot.png is finding the file /ibi/apps/images/green_dot.png not from a repository domain. If you simply referenced green_dot.png then I think it could find the file anywhere on the app path. Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 7, 2021 Author Share Posted April 7, 2021 for us, images/green_dot.png is somehow found under: EDASERVERApplicationsbaseappimagesgreen_dot.png How it knows to look thereI have no idea! It sort of stinks because we typically store our other other graphics (arrows, construction signs etc) under: DOMIANS/ourdomain/images Link to comment Share on other sites More sharing options...
David Beagan Posted April 7, 2021 Share Posted April 7, 2021 I could get it to work with files in a Domain named image like this (also has BORDER=OFF to get rid of the border): TABLE FILE ibisamp/ggsales PRINT UNITS DOLLARS COMPUTE COLOR/A15 = IF UNITS LE 1600 THEN 'RED' ELSE 'GREEN'; AS 'Traffic,Light' BY CATEGORY WHERE SEQ_NO LE 9 ON TABLE SET PAGE-NUM NOLEAD ON TABLE PCHOLD FORMAT HTML ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,$ TYPE=DATA, COLUMN=COLOR, BORDER=OFF, $ TYPE=DATA, COLUMN=COLOR, WHEN=COLOR EQ 'RED', IMAGE=IBFS:/WFC/Repository/image/red_dot.png, $ TYPE=DATA, COLUMN=COLOR, WHEN=COLOR EQ 'GREEN', IMAGE=IBFS:/WFC/Repository/image/green_dot.png,$ ENDSTYLE END Link to comment Share on other sites More sharing options...
robert fuschetto Posted April 7, 2021 Author Share Posted April 7, 2021 Thanks All! we will play w/that Dave. The border issue is funny. I tried this originally: TYPE=DATA, COLUMN=N2, IMAGE=(WrvuImage2), SIZE=(0.250000 0.250000), BORDER-BOTTOM=OFF,BORDER-TOP=OFF, and got this: I tried this: TYPE=DATA, COLUMN=COLOR, BORDER=OFF, $ and get this: so we must tinker. I think we discovered today another way to do all this is with Wingdings so now I am into that. The png files are easier until you export to Excelthen the user can move the traffic lights around. It seems the Wingdings are sortable etc. Fun stuff to play with. THANKS FOR ALL HELP! Link to comment Share on other sites More sharing options...
Patrick Huebgen Posted April 8, 2021 Share Posted April 8, 2021 @robertf Looking at your wRVUS report. Did you looked at the WebFOCUS KPI extensions like GitHub ibi/wf-extensions-chart d3-based graph extensions for WebFocus 8200 . Contribute to ibi/wf-extensions-chart development by creating an account on GitHub. For Wingdings - be aware that this technique will require the font to be installed on any computer that is accessing this report. Regards Patrick Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now