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     Proper alignment SUBFOOT for PDF and EXCEL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Proper alignment SUBFOOT for PDF and EXCEL
 Login/Join
 
Silver Member
posted
I have a FOCEXEC that for various reasons needs to use SUBFOOT and positional formatting to align the subtotals and grand totals. I have the alignment working perfectly for PDFs. However, I pass a parameter to the FOCEXEC to determine if it should generate a PDF or an EXCEL 2000 file. Everything works great and looks great EXCEPT for the SUBFOOT lines. I've done a few tweaks to alignment and all it does is screw up my PDF alignment. How can I align my excel subfoots differently than my PDF subfoot? or what's the best mechanism that will align correctly for both?


SET ALL=ON, NODATA=''
-DEFAULT &rptfmt = 'PDF';
-SET &ECHO=ALL;

SQL SQLMSS SET SERVER SERVERNAME
SQL SQLMSS                                                                      
EX DB.dbo.SP '&ddlDirector', '&ddlManager', '&ddlYear';

TABLE FILE SQLOUT
PRINT *          
ON TABLE HOLD AS REPDATA
END

DEFINE FILE REPDATA
DIRNAME/A15 = DirectorLogin;
MGRNAME/A15 = ManagerLogin;
PPACT/D12M = PActDollars;
PPYTD/D12M = PYTDDollars;
PYTDCHANGE/D7.1% = PYTDChangeDollars;
PCPLAN/D12M = CPlanDollars;
PCYTD/D12M = CYTDDollars;
CPVSACT/D7.1% = CPVSDollars;
END


TABLE FILE REPDATA
PRINT 
	DirectorLogin AS 'DIRECTOR'
	ManagerLogin AS 'MANAGER'
	Category/A8 AS 'CATEGORY'
	Other_Name/A8 AS 'OTHER'
	Mrg AS 'MGR'
	Country/A8 AS 'COUNTRY'
	PPACT AS 'Total,Actual'
	PPYTD AS 'YTD'
	PYTDCHANGE AS 'TY/LY,YTD +/-'
	PCPLAN AS 'Plan,DOLLARS'
	PCYTD AS 'ACT,YTD'
	CPVSACT AS '2006,Plan vs,Act +/-'
COMPUTE PREVPERCENT/D7.1% = (PPACT / TOT.PPACT) * 100; AS '2006 %,to Total'
COMPUTE CURRPERCENT/D7.1% = (PCPLAN / TOT.PCPLAN) * 100; AS '2007 %,to Total'

COMPUTE PACTYEAR/D7.1% = (PPACT / TOT.PPACT) * 100; NOPRINT
COMPUTE PYTDYEAR/D7.1% = (PPYTD/TOT.PPYTD) * 100; NOPRINT
COMPUTE CPLANYEAR/D7.1% = (PCPLAN / TOT.PCPLAN) * 100; NOPRINT
COMPUTE CYTDYEAR/D7.1% = (PCYTD/TOT.PCYTD) * 100; NOPRINT
	

HEADING CENTER
"Report Date: &DATEMDYY"
" "

BY Mrg NOPRINT

ON Mrg SUBFOOT
" <+0> Total <+0> <MRG <+0> <ST.PPACT <+0> <ST.PPYTD <+0> <ST.PCPLAN <+0> <ST.PCYTD "
"Percent to total year <+0> <ST.PACTYEAR <+0> <ST.PYTDYEAR <+0> <ST.CPLANYEAR <+0> <ST.CYTDYEAR "

ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLEMODE FIXED
ON TABLE SUBFOOT
" <+0> Grand Total <+0> <TOT.PPACT <+0> <TOT.PPYTD <+0> <TOT.PCPLAN <+0> <TOT.PCYTD "
ON TABLE PCHOLD FORMAT &rptfmt
ON TABLE SET STYLE *
	UNITS=IN,
	PAGESIZE='LETTER',
	SQUEEZE=ON,
	LEFTMARGIN=0.20,
	RIGHTMARGIN=0.20,
	TOPMARGIN=0.10,
	BOTTOMMARGIN=0.10,
	ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
	GRID=ON,
	FONT='ARIAL',
	SIZE=7,
	COLOR='BLACK',
	BACKCOLOR='NONE',
	STYLE=NORMAL,
	LINEBREAK='CRLF',
$
TYPE=TITLE,STYLE=BOLD,JUSTIFY=CENTER,$
TYPE=HEADING, STYLE=BOLD, JUSTIFY=CENTER, BACKCOLOR=RGB(170 213 255),$
TYPE=SUBFOOT,HEADALIGN=BODY,STYLE=BOLD,BACKCOLOR=ORANGE,$
TYPE=TABFOOTING,HEADALIGN=BODY,STYLE=BOLD,BACKCOLOR=LIGHT BLUE,$

TYPE=REPORT,COLUMN=P1,WIDTH=15,JUSTIFY=LEFT,$ 
TYPE=REPORT,COLUMN=P2,WIDTH=15,JUSTIFY=LEFT,$
TYPE=REPORT,COLUMN=P3,WIDTH=9,JUSTIFY=LEFT,$
TYPE=REPORT,COLUMN=P4,WIDTH=9,JUSTIFY=LEFT,$
TYPE=REPORT,COLUMN=P5,WIDTH=4,JUSTIFY=CENTER,$
TYPE=REPORT,COLUMN=P6,WIDTH=9,JUSTIFY=LEFT,$
TYPE=REPORT,COLUMN=P7,WIDTH=10,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P8,WIDTH=10,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P9,WIDTH=6,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P10,WIDTH=10,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P11,WIDTH=10,BACKCOLOR=YELLOW,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P12,WIDTH=6,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P13,WIDTH=6,JUSTIFY=RIGHT,$
TYPE=REPORT,COLUMN=P14,WIDTH=5,JUSTIFY=RIGHT,$
TYPE=TITLE,COLUMN=C*,JUSTIFY=CENTER,$

TYPE=SUBFOOT,STYLE=BOLD,LINE=1,ITEM=1,OBJECT=TEXT,JUSTIFY=LEFT,POSITION=Category,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=LEFT,POSITION=Supplier_Name,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=1,ITEM=2,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PPACT,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=1,ITEM=3,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PPYTD,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=1,ITEM=4,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PCPLAN,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=1,ITEM=5,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PCYTD,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=2,ITEM=1,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PPACT,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=2,ITEM=2,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PPYTD,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=2,ITEM=3,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PCPLAN,$
TYPE=SUBFOOT,STYLE=BOLD,LINE=2,ITEM=4,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PCYTD,$

TYPE=TABFOOTING,STYLE=BOLD,LINE=1,ITEM=1,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PPACT,$
TYPE=TABFOOTING,STYLE=BOLD,LINE=1,ITEM=2,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PPYTD,$
TYPE=TABFOOTING,STYLE=BOLD,LINE=1,ITEM=3,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PCPLAN,$
TYPE=TABFOOTING,STYLE=BOLD,LINE=1,ITEM=4,OBJECT=FIELD,JUSTIFY=RIGHT,POSITION=PCYTD,$



ENDSTYLE

END

SET EMPTYREPORT=ON
-RUN
-IF &RECORDS EQ 0 GOTO NORPT;
-EXIT
-NORPT
-HTMLFORM NOREC2




WebFOCUS 7.1.5 on Win2K using SQL2000/SQL2005/ORACLE10.4
 
Posts: 47 | Registered: March 02, 2007Report This Post
Virtuoso
posted Hide Post
Check out Mickey's write up on PDF output for some insight.
http://www.informationbuilders.com/support/developers/index.html

You are going to have to add some GOTO statments for different Styling for each type of Output.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Here's a simple example that works for both PDF and Excel. I've added the colours to show which elements are affected by which style-sheet code. The COLSPAN is ignored for PDF, but helps position the second element in the SUBFOOT for Excel 2000.

TABLE FILE CAR
SUM
SALES RETAIL DEALER
BY COUNTRY
BY CAR

ON COUNTRY SUBFOOT
"SUBTOTAL<+0><ST.SALES<+0><ST.RETAIL<+0><ST.DEALER"
HEADING
"WEBFOCUS REPORT"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLESHEET *
FONT='ARIAL', SIZE=8, GRID=OFF, $
TYPE=SUBFOOT, HEADALIGN=BODY, STYLE=BOLD, JUSTIFY=RIGHT,$
TYPE=SUBFOOT,ITEM=1, COLSPAN=2, POSITION=COUNTRY, JUSTIFY=LEFT, COLOR=ORANGE, $
TYPE=SUBFOOT,ITEM=2,POSITION=SALES, COLOR=RED,$
TYPE=SUBFOOT,ITEM=3,POSITION=RETAIL, COLOR=GREEN,$
TYPE=SUBFOOT,ITEM=4,POSITION=DEALER, COLOR=BLUE,$
END

I hope this helps.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Oh now that's nice.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
i had some issue related to this .... my report should be in excel format....

The name SUBTOTAL should be in the CAR column.i.e., it should align with Car column ....
any idea of it can be done?


714
 
Posts: 21 | Location: bangalore | Registered: December 18, 2008Report This Post
Guru
posted Hide Post
Change the line

TYPE=SUBFOOT,ITEM=1, COLSPAN=2, POSITION=COUNTRY, JUSTIFY=LEFT, COLOR=ORANGE

to

TYPE=SUBFOOT,ITEM=1, COLSPAN=2, POSITION=CAR, JUSTIFY=LEFT, COLOR=ORANGE


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Guru
posted Hide Post
For Excel just change the JUSTIFY
TYPE=SUBFOOT,ITEM=1, COLSPAN=2, POSITION=CAR, JUSTIFY=RIGHT, COLOR=ORANGE, $


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Platinum Member
posted Hide Post
Can you get this to work with ON COUNTRY SUMMARIZE?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report 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     Proper alignment SUBFOOT for PDF and EXCEL

Copyright © 1996-2020 Information Builders