Jump to content

I saw /recall this from one of the WF courses we did but the...


robert fuschetto

Recommended Posts

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

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

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

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

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

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

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

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

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

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

@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

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