Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Hiding an Image in HTML output...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Hiding an Image in HTML output...
 Login/Join
 
Platinum Member
posted
I have the following code:
     COMPUTE A_GREENBAR/A15 = FTOA(GREENBAR, '(D12)', A_GREENBAR); AS 'ALPHA Green' NOPRINT
     COMPUTE A_BLUEBAR/A15 = FTOA(BLUEBAR, '(D12)', A_BLUEBAR); AS 'ALPHA Blue' NOPRINT
     COMPUTE A_ORANGEBAR/A15 = FTOA(ORANGEBAR, '(D12)', A_ORANGEBAR); AS 'ALPHA Orange' NOPRINT
     COMPUTE A_PURPLEBAR/A15 = FTOA(PURPLEBAR, '(D12)', A_PURPLEBAR); AS 'ALPHA Purple' NOPRINT
     COMPUTE A_REDBAR/A15 = FTOA(REDBAR, '(D12)', A_REDBAR); AS 'ALPHA Red' NOPRINT

COMPUTE MYBAR/A750 =
'<TD WIDTH="104" ALIGN="LEFT" >' |
'<IMG RUNAT="SERVER" SRC="https://mySite/myFolder/images/gGreen.gif" ' |
' HEIGHT=13 WIDTH="' | A_GREENBAR | '">' |
'<IMG runat="server" SRC="https://mySite/myFolder/images/gBlue.gif" ' |
' HEIGHT=13 WIDTH="' | A_BLUEBAR | '">' |
'<IMG runat="server" SRC="https://mySite/myFolder/images/gOrange.gif" ' |
' HEIGHT=13 WIDTH="' | A_ORANGEBAR | '">' |
'<IMG runat="server" SRC="https://mySite/myFolder/images/gPurple.gif" ' |
' HEIGHT=13 WIDTH="' | A_PURPLEBAR | '">' |
'<IMG runat="server" SRC="https://mySite/myFolder/images/gRed.gif" ' |
' HEIGHT=13 WIDTH="' | A_REDBAR | '">' |
'</TD>'; AS ''  


If the value for A_GREENBAR or A_BLUEBAR or... is/are equal to 0 then I want to hide this image in the MYBAR using visible=false. I am trying to use the example in Tips and Techniques Graphtype... but I can not hide the colored bars when they are equal to 0.

Any Ideas??

ERINP

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


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Virtuoso
posted Hide Post
Sorry ... I don't think I get it ... which image do you want to hide exactly? under which conditions?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
njsden,
As an example if the FTOA(GREENBAR, '(D12)', A_GREENBAR); is EQ to 0 then in the MYBAR code I want to add visible="false" something like:
  
'<TD WIDTH="104" ALIGN="LEFT" >' |
'<IMG RUNAT="SERVER" SRC="https://mySite/myFolder/images/gGreen.gif" ' |
' HEIGHT=13 WIDTH="' | A_GREENBAR | '" visible="false">' |


actually I will probably create another compute and dynamically place true or false in as the value.

Does that make sense??

ERINP


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Expert
posted Hide Post
quote:
visible="false"

Where did you get that from?

CSS Visibility is controlled by this syntax:

visibility:hidden;


Take a look at this documentation: CSS Display and Visibility


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Francis,
In Visual Studio 2005 I can hide the image using:
 <img runat="server" src= "https://mySite/myFolder/images/gGreen.gif" alt="" style="height:13px" visible="false"/> 

I am merely trying to do in webFOCUS what I typically do in Visual Studio.

I can attempt the CSS in my code but I was trying to avoid creating the class, referencing it, building it dynamically, and coding it...

ERINP


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Virtuoso
posted Hide Post
visible="false" is an ASP.NET attribute, not part of HTML. Under the covers, ASP.NET creates the CSS necessary to render those objects as specified.

You don't need to create a CSS class for that. Just use inline styling with what Francis recommended.

See:

'<TD WIDTH="104" ALIGN="LEFT" >' |
'<IMG RUNAT="SERVER" SRC="https://mySite/myFolder/images/gGreen.gif" ' |
' HEIGHT=13 WIDTH="' | A_GREENBAR | '" style="visibility:hidden;">' |


That runat="server" stuff is also not needed! It's only applicable to ASP.NET as well.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Now, what's the purpose of adding an image to the page if it's not going to be visible?

If you need to go through the trouble of determining visibility based on A_COLORBAR, you could instead determine if the whole IMG tag is needed based on the same.

As a bonus, the web page will render slightly faster!



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
njsden and Francis,
thank you for the insite and the help.
Using the Inline Styling did the trick now I just need to make the "style="visibility:hidden;" dynamic based on values within my report.

Thanks again,
ERINP


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Platinum Member
posted Hide Post
quote:

Now, what's the purpose of adding an image to the page if it's not going to be visible?


Based on a sample in the tips and techniques I am using the colorbars to create a horizontal graph for eachrow of data within a report. I have 5 colors, some or all may be blank, based on there percentages I set the width of the image as a representation of the underlying data. which allows for a visualization of the data. Once I get it hooked up I will create a CAR example to better explain.


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Virtuoso
posted Hide Post
Something like this ...

COMPUTE A_GREENBAR/A100 = IF GREENBAR GT 0 THEN '<img src="https://mySite/myFolder/images/gGreen.gif" ' ||
                            'height="13" width="' || FTOA(GREENBAR, '(D12)') || '" />' ELSE ''; 
COMPUTE A_BLUEBAR/A100  = IF BLUEBAR GT 0 THEN '<img src="https://mySite/myFolder/images/gBlue.gif" ' ||
                            'height="13" width="' || FTOA(BLUEBAR, '(D12)') || '" />' ELSE ''; 
...
COMPUTE MYBAR/A750 =
'<td width="104" align="left" >' || A_GREENBAR || A_GREENBAR || ... || A_REDBAR || '</td>';



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Oh, I did not see your response before I posted the message above. Anyway, it does not really matter. Hopefully the visibility style will do what you need.

Cheers!



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
njsden,
Thats the type of logic I was looking for... I was wondering how I was going to wiggle thru the combinations and permutations for 5 colored bars... Thank You for shedding light on my clouded thinking. Idea

ERINP


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Virtuoso
posted Hide Post
You're welcome! You had most of it there anyway so your thinking was much clearer than you think Wink

If this is now working for you, would you mind editing your post and prefixing its title with [SOLVED]?

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
njsden,
I added the [solved] to the header of my original post. I am going to re-create what I was/am attempting to do with the CAR file cuz its sort of neat.

Thanks Again,
ERINP


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Virtuoso
posted Hide Post
Great! Please do post your sample code once it's ready. As you said, it is a neat technique which either of us here may have a need for in future projects.

Thank you!



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Hiding an Image in HTML output...

Copyright © 1996-2020 Information Builders