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.
this only works in html, but it works; maybe someone else can figure out how to kick it up a notch
DEFINE FILE CAR
MYCOUNTRY/A100=
'<div style="writing-mode: tb-rl;filter:flipv fliph">' | COUNTRY | '</DIV>';
END
TABLE FILE CAR
SUM SALES AS ''
ACROSS MYCOUNTRY AS ''
BY CAR
ON TABLE SET STYLE *
TYPE = REPORT, GRID=OFF,$
TYPE=ACROSSVALUE, BY=MYCOUNTRY,JUSTIFY=LEFT,COLOR=RED,$
END
Sander, can you show us the css that would do it, please? thanks.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I might be wrong, but you have already given the CSS which is contained in your example's STYLE syntax.
As the output to EXL2K is actually XML IB should be able to incorporate the CSS, especially as the heading cells normally share a CSS attribute. This would obviously require an NFR to be raised and it would only (I think) be supported in MSIE as FILTER is MS specific. Therefore those who use Firefox or Netscape through choice (their's or their Company's) will not be able to make use of it?
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, 2004
I also got nice reply from IBI. There is a possiblity to do it in EXCEL through HTML.
CTSS Newsletter - February 2005 Using HTMLFORMTYPE to Trigger Excel Features From WebFOCUS Code By David Beagan It wasn't long ago that dynamically producing a WebFOCUS report that would automatically return a grid of data into an Excel spreadsheet on the user's desktop was a real "gee-whiz" feature. In recent years, however, expectations have raised and users started to also want some formatting on their reports.
Enter the EXL2K format, which enabled report formatting with things such as colors and fonts. Customers were happy for a while, but nevertheless came to expect even more.
While WebFOCUS is good at formatting report output for automatic display in Excel, it is not a universal Excel controller. The EXL2K output format was not designed to automatically trigger any Excel feature from WebFOCUS code. Many common Excel features, such as creating cell borders, inserting horizontal and vertical page breaks, and outputting to multiple worksheets and freeze panes ad infinitum, have remained tantalizingly out of the reach of users. Patiently explaining to them why these features were unavailable works for a while, but eventually impatience grows into dissatisfaction.
In light of these unfulfilled customer needs, I happened to notice an interesting WebFOCUS setting. At the time I didn't have the time to explore it further but made note of it. Later, when confronted with yet another of these seemingly impossible tasks (Can WebFOCUS create a report with column titles displayed vertically, as can be done with Excel's format cells feature by changing the orientation to 90?) I used this as my motivation to explore the setting further. After a couple of hours of experimentation I was able to create the vertical column titles. While basking in the gratification of this accomplishment, I almost didn't notice an unintentional but interesting side effect: The report also had cell borders! Perhaps by now I have provoked your curiosity.
The WebFOCUS setting is HTMLFORMTYPE. Documentation on this feature is rather sparse. I could only find the following:
HTMLFORMTYPE Sets the output format type of an -HTMLFORM report.
Which barely hints at the potential of this setting. So let's look at a basic example that uses this setting. Suppose that a training history report based on the standard employee table is desired. The report is to list training dates on the right side and each employee's name is to appear at the top. To conserve space, employee names should be written vertically. Also desired are cell borders, single lines in the vertical direction and double lines in the horizontal direction. The report code looks like this:
SET CSSURL=http://localhost/approot/baseapp/h1.css SET PAGE=NOLEAD SET GRID=OFF DEFINE FILE EMPLOYEE NAME/A26=FIRST_NAME|' '|LAST_NAME; END TABLE FILE EMPLOYEE SUM ED_HRS/I7 AS '' BY DAT_INC AS '' ACROSS NAME AS '' ON TABLE SET HTMLCSS ON ON TABLE HOLD FORMAT HTML ON TABLE SET STYLE * TYPE=ACROSSVALUE,CLASS=rotate,$ TYPE=DATA,CLASS=border,$ ENDSTYLE END -RUN SET HTMLFORMTYPE=XLS -HTMLFORM HOLD The report references a Cascading Style Sheets (CSS) file in the BASEAPP application:
SET CSSURL=http://localhost/approot/baseapp/h1.css SET PAGE=NOLEAD SET GRID=OFF DEFINE FILE EMPLOYEE NAME/A26=FIRST_NAME|' '|LAST_NAME; END TABLE FILE EMPLOYEE SUM ED_HRS/I7 AS '' BY DAT_INC AS '' ACROSS NAME AS '' ON TABLE SET HTMLCSS ON ON TABLE HOLD FORMAT HTML ON TABLE SET STYLE * TYPE=ACROSSVALUE,CLASS=rotate,$ TYPE=DATA,CLASS=border,$ ENDSTYLE END -RUN SET HTMLFORMTYPE=XLS -HTMLFORM HOLD The report references a Cascading Style Sheets (CSS) file in the BASEAPP application:
SET PAGE=NOLEAD
SET GRID=OFF
-RUN
TABLE FILE CAR
SUM SALES AS ''
ACROSS BODYTYPE AS ''
BY COUNTRY AS ''
ON TABLE SET HTMLCSS ON
ON TABLE HOLD AS REP001 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=ACROSSVALUE,CLASS=rotate,$
TYPE=DATA,CLASS=border,$
ENDSTYLE
END
-RUN
SET HTMLFORMTYPE=XLS
-RUN
-HTMLFORM BEGIN
<STYLE>
.border
{
font-size:9pt;
text-align:right;
border-style:solid solid double;
}
.rotate
{
mso-rotate:90;
vertical-align:bottom;
height:175;
}
</STYLE>
<BODY>
!IBI.FIL.REP001;
</BODY>
HTMLFORMTYPE appears not to be documented on the 5.3.2 documentation CD, it is possible that it doesn't exist for WF 5.2.5.
Interestingly, it only works for Excel, not for HTML.This message has been edited. Last edited by: Francis Mariani,
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
HTML version with CSS, without DEFINE and embedded CSS:
TABLE FILE CAR
SUM SALES AS ''
ACROSS COUNTRY AS ''
BY CAR
ON TABLE SET PAGE NOPAGE
ON TABLE HOLD AS REP001 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE = REPORT, GRID=OFF,$
TYPE=ACROSSVALUE, CLASS=vertical, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<STYLE>
BODY
{
font-family: Arial, sans-serif; font-size: 15px;
}
TD
{
font-size: 12px;
}
.vertical
{
writing-mode: tb-rl;
filter:flipv fliph;
};
</STYLE>
<BODY>
!IBI.FIL.REP001;
</BODY>
-HTMLFORM END
This does not work with Excel.
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
I never knew about the HTMLFORMTYPE setting. This is nice to know for the future. We currently do not do any XLS output reports. Now if IBI would only add PDF as an option for HTMLFORMTYPE.This message has been edited. Last edited by: mgrackin,
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
FYI, I did a search on IBI Tech Support for HTMLFORMTYPE and it only appears in the WF 5.2 Developing Reporting Applications manual. It does not appear in any of the the WF71 manuals that I have.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Mickey, you're quite right. This is from the 5.2 doc:
quote:
HTMLFORMTYPE - Sets the output format type of an -HTMLFORM report.
This doesn't tell us much.
There are a three technical bulletins and it looks like this setting can be used in a few creative ways. I wonder if this will last, or is it something that will drop in a future version.
You'll have to sign in to Tech Support to view these documents.
FILEDEF HOLD1 DISK HOLD1 -RUN TABLE FILE CAR PRINT COUNTRY CAR MODEL ON TABLE NOTOTAL ON TABLE HOLD AS HOLD1 FORMAT HTML END -RUN -*SET HTMLFORMTYPE=XLS -HTMLFORM HOLD1 -RUN
Error occurred. ERROR: ERROR_MR_NO_OPEN can't open HOLD1.htm
If I remove the -HTMLFORM part:
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18 0 HTML FILE SAVED ...
I used -HTMLFORM many times, what is wrong with that code?? I would like to use the SET HTMLFORMTYPE=XLS and show the HTML form instead of PC FORMAT EXL2K
It looks like you can't use HTMLFORMTYPE=XLS in 5.2.5.
As for the error you're getting, MRE always complicates things. I imagine MRE is looking for the HOLD1 file somewhere in the domain.
Try this:
TABLE FILE CAR PRINT COUNTRY CAR MODEL ON TABLE NOTOTAL ON TABLE HOLD AS HOLD1 FORMAT HTML END -RUN -*SET HTMLFORMTYPE=XLS -RUN -HTMLFORM BEGIN !IBI.FIL.HOLD1; -HTMLFORM END -RUN
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
Thanks Francis, that worked! Even with the HTMLFORMTYPE = XLS I was able to get an Excel sheet. I'll try to fix my vertical alignment with a CSS now... But there is a lot to put in that CSS because the Excel sheet now look naked )