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     accordian report question

Read-Only Read-Only Topic
Go
Search
Notify
Tools
accordian report question
 Login/Join
 
Gold member
posted
Hi, I am working on a fex that contains alot of sorts by field with noprint because some of the first by's are to be used in the heading.
This is what I have:

TABLE FILE HOLD1
HEADINGE
" &DATE"
"Term "accordian report to expand on zip "
" "
SUM STATE CITY ZIP STUCTR
NAME ID ADDRESS
BY TERM NOPRINT
BY COLLEGE NOPRINT
BY STATE NOPRINT
BY CITY NOPRINT
BY ZIP NOPRINT
ON TABLE COLUMN-TOTAL
ON TABLE SET STYLE *
TYPE=REPORT,
GRID=OFF,
FONT='COURIER NEW',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE = HEADING,
FONT='COURIER NEW',
SIZE=11,
COLOR='MAROON',
BACKCOLOR='NONE',
STYLE=BOLD,
$
ENDSTYLE
ON TABLE SET EXPANDABLE ON
END
-RUN

this above fex does not work at all even from the first by field term.

so I took out every other by field except the by zip I wanted expanding on and this still did not work with noprint.

It only works when I have one by field without noprint "eg. BY ZIP" but it changes the layout of the report. Is there anyway I can tweak this report to show STATE CITY ZIP and expand on ZIP?

Thanks for your help in advance!
KM


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
 
Posts: 71 | Registered: May 23, 2004Report This Post
Virtuoso
posted Hide Post
The accordian report only works on visible by fields.

This technique uses a little bit of javascript to expand a number of columns when you run the table request, so you can open the first n columns and then expand from the n+1 by field. this is a smaple table request, the define and the reference to the define in the subfoot are required:
  
SET STYLEMODE=PAGED
DEFINE FILE CAR
callJS/A240 = '<script src="../../tests/test27.js" type="text/javascript"></script>' |
              '<script>window.onload=clickItemsOpen;var columnsToOpen=2;</script>';
END
TABLE FILE CAR
ON TABLE SUBFOOT
"<callJS"
PRINT
     SALES RCOST DCOST 
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
ON TABLE SET PAGE-NUM OFF
ON TABLE SET EXPANDABLE ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     LEFTMARGIN=0.250000,
     RIGHTMARGIN=0.250000,
     TOPMARGIN=0.250000,
     BOTTOMMARGIN=0.250000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     FONT='ARIAL',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
     RIGHTGAP=0.125000,
$
TYPE=DATA,
     SIZE=8,
     BACKCOLOR=( RGB(234 234 255) 'WHITE' ),
$
TYPE=TITLE,
     BORDER=LIGHT,
     BORDER-STYLE=RIDGE,
     BORDER-COLOR=RGB(51 51 153),
     SIZE=9,
     COLOR='WHITE',
     BACKCOLOR=RGB(147 172 219),
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=9,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=9,
     STYLE=BOLD,
$
TYPE=HEADING,
     BORDER=LIGHT,
     BORDER-STYLE=RIDGE,
     BORDER-COLOR=RGB(51 51 153),
     SIZE=12,
     COLOR='WHITE',
     BACKCOLOR=RGB(147 172 219),
     STYLE=BOLD,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=1,
     SIZE=14,
$
TYPE=FOOTING,
     BORDER=LIGHT,
     BORDER-STYLE=RIDGE,
     BORDER-COLOR=RGB(51 51 153),
     COLOR='WHITE',
     BACKCOLOR=RGB(147 172 219),
     STYLE=BOLD,
$
TYPE=SUBHEAD,
     SIZE=9,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     BORDER=LIGHT,
     BORDER-STYLE=RIDGE,
     BORDER-COLOR=RGB(51 51 153),
     SIZE=9,
     COLOR='WHITE',
     BACKCOLOR=RGB(147 172 219),
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     SIZE=8,
     STYLE=BOLD,
$
TYPE=ACROSSVALUE,
     SIZE=8,
     STYLE=BOLD,
$
TYPE=ACROSSTITLE,
     SIZE=8,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     SIZE=9,
     STYLE=BOLD,
$
ENDSTYLE
END


The javascript file, in this case called test27.js, save to a place that is referenced in thescript src in the define:
  
function clickItemsOpen(){
var i=0;var s='';var t='';var u='';
// Get an array of all the td tags in the document.
var allTD = document.getElementsByTagName("td");
// How many td tags are there
var numTD = allTD.length;
// Loop through all the td tags
for (i=0;i<numTD-1;++i) {
// First of 3 checks - if the td tag doesn't have an image, go to next iteration
  if (allTD[i].getElementsByTagName("img").length == 0) continue;
// Second of 3 checks - if there is no attribute called ibiattr in the td, go to next iteration
  if (allTD[i].getAttribute("ibiattr") == 0) continue;
// Third of 3 checks - if the attribute called ibiattrc in the td has a value greater than the 
// column to expand, go to next iteration
  if (allTD[i].getAttribute("ibiattrc") > columnsToOpen) continue;
// get the a tag within the td
  s=allTD[i].getElementsByTagName("a");
// get the href within the a tag  
  t=s[0].getAttribute("href");
// substring the href to get the call to the function
  u=t.substring(11,t.length);
// use eval to call the function  
  eval(u)
// remove the link to stop user contracting the report  
  allTD[i].removeChild(s[0]);
  }
// border.collapse causes issues on Firefox
if(navigator.userAgent.indexOf("Firefox")!=-1) document.getElementsByTagName("table")[0].style.borderCollapse="separate";  
}


In the DEFINE in the table request, change the value of columnsToOpen to be what you want.

This should work for any accordian report, and maybe give you the layout you want.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Thanks For your respond, Alan. I will look into this and test it out.


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
 
Posts: 71 | Registered: May 23, 2004Report This Post
Virtuoso
posted Hide Post
Alan

I will give this script a try too. Looks promising.

My new colleague is good in javascript, I will show this to him.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
Alan,

Very nice!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
so sweet! thanks so much alan.
having omitted this feature is really an oversight in the accordian report concept.

definitely Tip of the Year!! for summit 08 this year.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Well thank you Sue. Cool


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report 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     accordian report question

Copyright © 1996-2020 Information Builders