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     [CLOSED] Dynamically Resize & control the Division <Div>

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Dynamically Resize & control the Division <Div>
 Login/Join
 
Member
posted
I'm displaying a WebFOCUS report created by ON TABLE HOLD FORMAT HTML in a Division. I have to dynamically resize and control the Division
. I have Javascipt code that does this but it requires that the Division have an ID parameter associated with it. WF does not include the ID parameter in the Division. Is there a way that I can create the ID using WF code at run time?

Example: WF provides this:



I want to create this:



Has anyone done this before? Thanks.

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


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report This Post
Expert
posted Hide Post
Richard, please use
[code]
[/code]
tags around code and HTML you want to include in your posting.

How do you get WebFOCUS to generate "div" tags, it doesn't normally do so?


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
Member
posted Hide Post
Francis -

my HTML file is created by
  
TABLE FILE....
.
.
ON TABLE HOLD FORMAT HTML
END


which creates

  
.
.
<DIV class='scrollDiv'>
.
.


I need the

  
.
.
<DIV> to include
.
.


id="theReport"

So the
would look something like this:

  
.
.
<DIV class='scrollDiv' id="theReport">
.
.


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report This Post
Expert
posted Hide Post
Please illuminate me on how you got WebFOCUS to generate the
<DIV class='scrollDiv'>
tag. Did you create this report using a DevStudio GUI tool, if so, which one?


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
Member
posted Hide Post
in all honesty i don't know other than to include the complete TABLE request. Here it is. Sorry for its length.
  
SET HTMLCSS = ON
SET ASNAMES=OFF
TABLE FILE HOLD51
PRINT ZZ_INDICATOR       AS 'Performance Indicator'
      INFOLOGO AS ' '
   ZUNIT_NAME AS 'Agency'
   LINK_ZZ_TARGET         AS 'YTD,Target'
      LINK_ZZ_ACUTAL         AS 'YTD,Actual'
      ZZ_ZPCT_CHANGE        AS 'Change,From,Target'
   LAST_DATA_MYR AS 'Data,Through'
      ZTREND_IND  NOPRINT
      TREND_IND  NOPRINT
   INDICATOR_SEQ NOPRINT
   UNIT_ID NOPRINT
-*----------------------------------------------------------------------------------------------------------------
BY TAG_NAME NOPRINT
BY ZPERSPECT_DISPLAY_ORDER NOPRINT
BY ZGOAL_DISPLAY_ORDER NOPRINT
BY ZGOAL AS 'Goal' NOPRINT
BY ZUNIT_DISPLAY_ORDER NOPRINT
 BY  MASTER_RPT_PRINT_ORDER  NOPRINT AS 'MSTR,PRINT,ORDER'
 BY  ZSORT                   NOPRINT AS 'ZSORT'
 BY  RPT_PRINT_ORDER         NOPRINT AS 'PRINT,ORDER'

WHERE ENDDATE_FLAG EQ 'X'

ON TAG_NAME SUBHEAD
 "<TAG_NAME"
ON ZGOAL SUBHEAD
 "<ZGOAL"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS XYZ FORMAT HTML
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     LEFTMARGIN=0.055556,
     RIGHTMARGIN=0.055556,
     TOPMARGIN=0.055556,
     BOTTOMMARGIN=0.125000,
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,FONT='ARIAL',GRID=ON,
$
TYPE=REPORT, HFREEZE=ON,SCROLLHEIGHT=4.5,
$
TYPE=HEADING,LINE=1,
    SIZE=12,STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=HEADING,LINE=2,
    SIZE=12,STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=HEADING,LINE=3,
    SIZE=8,STYLE=BOLD,FONT='ARIAL',JUSTIFY=CENTER,
$
TYPE=HEADING,LINE=4,
    SIZE=8,STYLE=BOLD,FONT='ARIAL',
$
TYPE=HEADING,LINE=5,
    SIZE=8,STYLE=BOLD,FONT='ARIAL',
$
TYPE=HEADING,LINE=6,
    SIZE=8,FONT='ARIAL',
$
TYPE=HEADING,LINE=7,
    SIZE=8,FONT='ARIAL',
$
TYPE=SUBHEAD,BY=TAG_NAME,
     LINE=1,
     FONT='ARIAL',SIZE=10,
     COLOR='WHITE',BACKCOLOR='BLACK',STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=SUBHEAD,BY=ZGOAL,
     LINE=1,
     FONT='ARIAL',SIZE=10,COLOR='BLACK',
     BACKCOLOR='SILVER',STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=TITLE,
     FONT='ARIAL',
     SIZE=8,COLOR='WHITE',BACKCOLOR='STEEL BLUE',
     STYLE=-UNDERLINE+BOLD,
     JUSTIFY=CENTER,
$
TYPE=REPORT,COLUMN=ZGOAL,
     FONT='ARIAL',SIZE=8,
     COLOR='STEEL BLUE',STYLE=BOLD,WRAP=1.500000,
$
TYPE=REPORT,COLUMN=ZZ_INDICATOR,
     HGRID=ON,VGRID=OFF,SIZE=8,STYLE=BOLD,
     WRAP=4.00000,WHEN=UNIT_ID EQ 'MTAHQ',
$
TYPE=REPORT,COLUMN=ZZ_INDICATOR,
     HGRID=ON,VGRID=OFF,SIZE=8,COLOR=RGB(80 80 80),
     WRAP=4.00000,WHEN=ZSORT EQ '3C',
$
TYPE=REPORT,COLUMN=ZZ_INDICATOR,
     HGRID=ON,VGRID=OFF,SIZE=8,
     WRAP=4.00000,
$
TYPE=REPORT,COLUMN=LAST_DATA_MYR,
     SIZE=8,WRAP=.600000,
  JUSTIFY=CENTER,
$
TYPE=REPORT,COLUMN=ZUNIT_NAME,
     SIZE=8,WRAP=0.800000,
 JUSTIFY=CENTER,
$
TYPE=REPORT,COLUMN=ZUNIT_NAME,
     SIZE=8,WRAP=0.800000,STYLE=BOLD,
 JUSTIFY=CENTER,WHEN=UNIT_ID EQ 'MTAHQ',
$
TYPE=REPORT,COLUMN=INFOLOGO,JUSTIFY=CENTER,
$
TYPE=REPORT,COLUMN=LINK_ZZ_ACUTAL,
     SIZE=8,WRAP=0.700000,HGRID=ON,VGRID=OFF,
  JUSTIFY=CENTER,BACKCOLOR='SILVER',
$
-*TYPE=REPORT,COLUMN=LINK_ZZ_ACUTAL,
-*     SIZE=8,WRAP=0.700000,
-*  JUSTIFY=CENTER,COLOR='WHITE',WHEN=LINK_ZZ_ACUTAL EQ 'X',
$
TYPE=REPORT,COLUMN=LINK_ZZ_TARGET,
     SIZE=8,WRAP=0.700000,BACKCOLOR='SILVER',
  JUSTIFY=CENTER,
$
TYPE=REPORT,COLUMN=ZZ_CURRENT_MTH_ACTUAL,
     SIZE=8,WRAP=0.700000,
  JUSTIFY=CENTER,
$
TYPE=REPORT,COLUMN=ZZ_ZPCT_CHANGE,
     SIZE=8,STYLE=BOLD,
     WRAP=.55000,
  JUSTIFY=CENTER,
$
TYPE=DATA,COLUMN=ZZ_ZPCT_CHANGE,
     BACKCOLOR = RGB(51 153 102) , WHEN=ZTREND_IND EQ 'POSITIVE',
     COLOR=WHITE,SIZE=8,WRAP=0.600000,
  JUSTIFY=CENTER,
$
TYPE=DATA,COLUMN=ZZ_ZPCT_CHANGE,
     BACKCOLOR = 'RED' , WHEN=ZTREND_IND EQ 'NEGATIVE',
     COLOR=WHITE,SIZE=8,WRAP=0.600000,
  JUSTIFY=CENTER,
$
TYPE=DATA,COLUMN=ZZ_ZPCT_CHANGE,
     BACKCOLOR = 'YELLOW' , WHEN=ZTREND_IND EQ 'NEUTRAL',
     SIZE=8,WRAP=0.600000,
  JUSTIFY=CENTER,
$
TYPE=DATA,COLUMN=ZZ_ZPCT_CHANGE,
     BACKCOLOR = 'WHITE' , WHEN=ZTREND_IND EQ 'BLANK',
     SIZE=8,WRAP=0.600000,
  JUSTIFY=CENTER,
$
TYPE=DATA,COLUMN=ZZ_ZPCT_CHANGE,
     BACKCOLOR = 'WHITE' , WHEN=ZTREND_IND EQ 'NOCOLOR',
     SIZE=8,WRAP=0.600000,
  JUSTIFY=CENTER,
$

ENDSTYLE
ON TABLE SET NODATA ' '
END



WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report This Post
<JG>
posted
Francis HFREEZE=ON is what creates the DIVs

Richard you are going to have to modify your Javascript

Try using getElementsByTagName this will return an array,
look at the code to check it index of the div tag you want,
probably 0 and using that you should be able to give it an id.

This message has been edited. Last edited by: <JG>,
 
Report This Post
Member
posted Hide Post
Yes, the reports are long and need to keep the headings and column titles fixed at the top of the screen so I used HFREEZE. So does anyone know how I can name the DIVs so the JAVASCRIPT that I have to resize the Divs will work?

Thanks.


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report This Post
<JG>
posted
Sorry Richard I was just editing when you beat me with your reply
 
Report This Post
Expert
posted Hide Post
As JG mentions, you could try getElementsByTagName.

E.g.:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
    'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>

<html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<script type='text/javascript'>
function resizeDiv1()
{
document.getElementsByTagName('DIV')[0].style.height = 150;
}
</script>

<style type='text/css'>
div { border: 1px solid black; }
</style>

<title> test </title>
</head>

<body onload="resizeDiv1();">

<div>1 aaa<br />1 bbb<br />1 ccc<br /></div>
<div>2 aaa<br />2 bbb<br />2 ccc<br /></div>
<div>3 aaa<br />3 bbb<br />3 ccc<br /></div>
</body>
</html>


For some reason, this does not work in Firefox.


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
<JG>
posted
quote:
getElementsByTagName

There are several well documented differences between IE and FireFox using this method
 
Report This Post
Expert
posted Hide Post
WebFOCUS example:

TABLE FILE CAR
SUM
SALES
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
BY LENGTH

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS XYZ FORMAT HTML

ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', GRID=ON, $
TYPE=REPORT, HFREEZE=ON, SCROLLHEIGHT=4.5, $
END
-RUN

-HTMLFORM BEGIN
!IBI.FIL.XYZ;

<script type='text/javascript'>
document.getElementsByTagName('DIV')[1].style.height = 350;
document.getElementsByTagName('DIV')[1].style.overflow = 'auto';
</script>

-HTMLFORM END


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
Member
posted Hide Post
francis - the issue with your last post is doesn't the htmlform begin statement cause the report to be displayed?

my issue is that WF is NOT displaying any of the content that I create with it. I am creating a host of htm files using WF and then deploying them to another of my web servers that knows nothing about WF. It is from this web server that all the content that i've created is displayed.


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report This Post
<JG>
posted
Then you need to adjust your source javascript
 
Report This Post
Expert
posted Hide Post
Richard,

I'm only trying to help, but if you do not provide all the information up front my assistance can't be very effective...

If you're creating a host of html files (not evident in your original posting), how are you putting them together on the other server?


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
Virtuoso
posted Hide Post
Use the ON TABLE HOLD FORMAT HTMTABLE instead, then use an AJAX call to retrieve the file and insert it into the DIV tag.

Fex
TABLE FILE CAR
SUM
     SALES
BY COUNTRY
ON TABLE HOLD AS baseapp/my_report FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
ENDSTYLE
END
 


HTML to call it
<html>
     <head>
          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
          <script type="text/javascript" src="/approot/baseapp/js/prototype-1.6.1.0.js" ></script>
          <script>
               window.onload = function() {
                    new Ajax.Updater('myReport', '/approot/baseapp/my_report.htm');
               }
          </script>
     </head>
     <body >
          <div id="myReport"></div>
     </body>
</html>  

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


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
<JG>
posted
quote:
HFREEZE

It's not supported for htmtable
 
Report This Post
Expert
posted Hide Post
quote:
prototype-1.6.1.0.js
Darryl,

You're quoting that third party framework again when a lot of shops will not permit downloads of this type (short-sighted maybe), so your solution (albeit a very good method) won't suit everyone Frowner

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Tony,

Yes, I realize that not everyone will be able to use a third party JS framework. In my client base, that number is getting lower every day.

That being said, although my examples still use it, it does not take away from the root of the potential solution. For those that do not have a framework, there are still plenty of examples on the web - and in this forum - of AJAX calls without a framework. If the example makes sense, then a solution is an hour of research away. I personally think it talks to this post a wee bit!

Later

p.s. did anyone notice that the latest version of PMF actually comes bundled with this very same framework?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
thank you all for your help and advice.


WF 7.7.3
Windows 2003 Server
PDF
HTML
EXL2k
 
Posts: 27 | Location: NYC | Registered: February 27, 2004Report 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     [CLOSED] Dynamically Resize & control the Division <Div>

Copyright © 1996-2020 Information Builders