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.
Is there a stylesheet option/code for adding the filters to a report output to EXL2K format
NO!
So here is a dodgy way to do it.
DEFINE FILE CAR
AUTOFILTER/A162 = '</td></tr><tr><td x:autofilter="all" x:autofilterrange="$A$2:$C$2">COUNTRY</td>'
| '<td class=xl100 x:autofilter="all">CAR</td>'
| '<td class=xl100 x:autofilter="all">MODEL' ;
END
TABLE FILE CAR
HEADING
"<AUTOFILTER "
PRINT COUNTRY AS ''
CAR AS ''
MODEL AS ''
ON TABLE PCHOLD FORMAT EXL2K
END
This message has been edited. Last edited by: Waz,
In case anyone is interested in styling the column titles produced by Waz's great post, the standard StyleSheet options don't work. There may be a better way to do this (using a class?), but I found that brute force in-line CSS does the job:
DEFINE FILE CAR
AUTOFILTER/A700 = '<tr>'
| '<td style="white-space:normal;mso-pattern:auto none;font-family:arial;color:white;font-size:12px;font-weight:700;text-align:center;background-color:rgb(79,129,189);" x:autofilter="all" x:autofilterrange="$A$2:$C$2">Country<br></td>'
| '<td style="white-space:normal;mso-pattern:auto none;font-family:arial;color:white;font-size:12px;font-weight:700;text-align:center;background-color:rgb(79,129,189);" x:autofilter="all">Car<br></td>'
| '<td style="white-space:normal;mso-pattern:auto none;font-family:arial;color:white;font-size:12px;font-weight:700;text-align:center;background-color:rgb(79,129,189);" x:autofilter="all">Model<br></td>'
| '</tr>' ;
END
-*
TABLE FILE CAR
HEADING
"Report Heading<AUTOFILTER"
PRINT
COUNTRY AS ''
CAR AS ''
MODEL AS ''
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, FONT='ARIAL NARROW', SIZE=10, COLOR='BLACK', STYLE=NORMAL,
WRAP=ON, SQUEEZE=ON, TITLETEXT='Car Info', $
TYPE=HEADING, SIZE=13, STYLE=BOLD, COLOR=WHITE, BACKCOLOR=RGB(165 165 165), JUSTIFY=CENTER, $
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END
Edit: Had to remove ENDEFLT.STY because it was somehow corrupting the auto-filter values.This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
I will be having to use your solution to create an XL sheet with filters. I tried to minimize Dan's example by eliminating some of the attributes. However I find that I must have
white-space:normal;mso-pattern:auto none;
Can you tell me why. Or better, how would I go about to provide only the color and size attributes?
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, 2006
Sorry, but I am by no means a CSS expert. I found the CSS code on-line somewhere and played with it until it worked. I also don't know why some of it is necessary, I just know it stopped working if I removed certain pieces of the code. You should be able to remove the background color, text alignment, font weight, etc. if not needed. But the "white-space" and "mso-pattern" attributes must be necesssary because otherwise I would have removed them myself.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
If you have a copy of Excel 2003 laying around, you can do just about anything that WebFOCUS doesn't provide by creating a template (.mht file) with an autorun macro. You can turn on filters, freeze panes, rotate column titles, add filtered subtotals, use excel graphs, vertically center column titles, embed excel comments in cells, more border options, etc.
There are lots of posts on Focal Point about using Excel 2003 template files.
We are migrating to WF8 and all of this works in WF8 but you must build the .mht file in Excel 2003. MS stopped support for .mht files beginning with Excel 2007. I have not yet played with the new template formats in Excel 2010. But I am hoping they will work as well, if not, I will wait for IBI to support that and hold on to my copy of Excel 2003 until they do.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006