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     [SOLVED] Aligning defined fields in a subfoot for HTML, PDF, and Excel

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Aligning defined fields in a subfoot for HTML, PDF, and Excel
 Login/Join
 
Platinum Member
posted
Aligning text and subtotals in a subfoot with specific columns works. However, when trying to align defined fields in a subfoot with other defined field columns is another story.

I've duplicated the situation with the code below. What is needed is to embed the 3 bonus fields in a subfoot and align them under the 3 date fields.

The stylesheet code in this example doesn't work; it is there just for this example.

Please advise on the correct code for HTML, PDF, and Excel outputs.

 

DEFINE FILE EMPDATA
    DATE1/MDY = HIREDATE + 100;
    DATE2/MDY = HIREDATE + 200;
    DATE3/MDY = HIREDATE + 300;
    BONUS1/D12.2 = SALARY *.05;
    BONUS2/D12.2 = SALARY *.15;
    BONUS3/D12.2 = SALARY *.25;
END

-SET &NOPRINT = IF &LINES EQ 0 THEN ' ' ELSE 'NOPRINT';

TABLE FILE EMPDATA
    PRINT
         PIN
	 FIRSTNAME
         MIDINITIAL
	 LASTNAME
	 TITLE
         SALARY
         HIREDATE
         DATE1
         DATE2
         DATE3
    BY DIV
    BY DEPT

ON DEPT SKIP-LINE
ON DEPT SUBFOOT WITHIN
"<AREA <BONUS1 <BONUS2 <BONUS3"
"line 2 of subfoot"
" "

HEADING
"This is a test"
" "

FOOTING
" "
"this is the footing"

ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     BACKCOLOR=RGB(255 176 176),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     COLOR='NAVY',
$
TYPE=FOOTING, SIZE=12, STYLE=BOLD,
$
-*  This stylesheet code doesn't work -- please replace it with the correct syntax.
TYPE=SUBFOOT, HEADALIGN=BODY,$
TYPE=SUBFOOT, BY=2, LINE=1, OBJECT=FIELD, ITEM=1, POSITION='DATE1', $
TYPE=SUBFOOT, BY=2, LINE=1, OBJECT=FIELD, ITEM=2, POSITION='DATE2', $
TYPE=SUBFOOT, BY=2, LINE=1, OBJECT=FIELD, ITEM=3, POSITION='DATE5', $
TYPE=SUBFOOT, BY=2, LINE=2, OBJECT=TEXT,  ITEM=1, COLSPAN=3, $
ENDSTYLE
END
 


FYI... this is related to the topic: Proper alignment SUBFOOT for PDF and EXCEL


Thank you,

John

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


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
You can use spot markers to move the columns to the right:

"<AREA <+0> <+0> <+0> <+0> <+0> <+0> <+0> <BONUS1<BONUS2<BONUS3"


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
You're asking for a lot! I'll let you figure out what the modified code does. Position does not work for HTML or Excel, you need spot-markers to separate the elements of the subfoot so that they line up with the related data column. Position works for PDF.

Read up on Creating Reports With WebFOCUS Language > Using Headings, Footings, Titles, and Labels > Positioning Headings, Footings, or Items Within Them

-DEFAULT &WFFMT = 'HTML';

DEFINE FILE EMPDATA
    DATE1/MDY = HIREDATE + 100;
    DATE2/MDY = HIREDATE + 200;
    DATE3/MDY = HIREDATE + 300;
    BONUS1/D12.2 = SALARY *.05;
    BONUS2/D12.2 = SALARY *.15;
    BONUS3/D12.2 = SALARY *.25;
END
-RUN

TABLE FILE EMPDATA
PRINT
PIN
FIRSTNAME
MIDINITIAL
LASTNAME
TITLE
SALARY
HIREDATE

DATE1
DATE2
DATE3

BY DIV
BY DEPT

ON DEPT SKIP-LINE
ON DEPT SUBFOOT WITHIN
"<AREA<+0> <+0> <+0> <+0> <+0> <+0> <+0> <+0> <BONUS1<BONUS2<BONUS3"
"line 2 of subfoot"
" "

HEADING
"This is a test"
" "

FOOTING
" "
"this is the footing"

ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
PAGESIZE=LEGAL, ORIENTATION=LANDSCAPE,
LEFTGAP=0.05, RIGHTGAP=0.05,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=8,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=10,
     BACKCOLOR=RGB(255 176 176),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     COLOR='NAVY',
$
TYPE=FOOTING, SIZE=10, STYLE=BOLD,
$

TYPE=REPORT, COLUMN=DATE1, JUSTIFY=RIGHT, $
TYPE=REPORT, COLUMN=DATE2, JUSTIFY=RIGHT, $
TYPE=REPORT, COLUMN=DATE3, JUSTIFY=RIGHT, $

TYPE=SUBFOOT, HEADALIGN=BODY, $
TYPE=SUBFOOT, LINE=1, ITEM=10, POSITION=DATE1, JUSTIFY=RIGHT, COLOR=RED, $
TYPE=SUBFOOT, LINE=1, ITEM=11, POSITION=DATE2, JUSTIFY=RIGHT, COLOR=BLUE, $
TYPE=SUBFOOT, LINE=1, ITEM=12, POSITION=DATE3, JUSTIFY=RIGHT, COLOR=GREEN, $
TYPE=SUBFOOT, LINE=2, OBJECT=TEXT, ITEM=1, COLSPAN=3, $
ENDSTYLE
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Francis,

That documentation link is what I had looked for many times over the years and failed to find. Thank you!

Regarding the stylesheet code, I knew that it was incorrect; I had put it there in place of what the correct code would be. I've been able to position real fields and text, for HTML, PDF, and Excel, but have not been able to get defined fields to align correctly.

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
Expert
posted Hide Post
I don't think styling behaves differently for real or defined fields - I can't recall ever coming across that issue - styling occurs on the report columns/fields/headings - on the output, not on the input (defined/real fields).

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
Platinum Member
posted Hide Post
Problem solved!

Please note the difference in the 2 subfoot lines. Evidently, when there are spaces adjacent to the spot markers, the spaces count as additional item.

Regards,

John


 
DEFINE FILE EMPDATA
    DATE1/MDY = HIREDATE + 100;
    DATE2/MDY = HIREDATE + 200;
    DATE3/MDY = HIREDATE + 300;
    BONUS1/D12.2 = SALARY *.05;
    BONUS2/D12.2 = SALARY *.15;
    BONUS3/D12.2 = SALARY *.25;
END

-SET &NOPRINT = IF &LINES EQ 0 THEN ' ' ELSE 'NOPRINT';

TABLE FILE EMPDATA
    PRINT
         PIN
         FIRSTNAME
         MIDINITIAL
         LASTNAME
         TITLE
         SALARY
         HIREDATE
         DATE1
         DATE2
         DATE3
    BY DIV
    BY DEPT

ON DEPT SKIP-LINE
ON DEPT SUBFOOT WITHIN
"<AREA <BONUS1<+0><BONUS2<+0><BONUS3"
"<AREA <BONUS1 <+0> <BONUS2 <+0><BONUS3"
" "

HEADING
"This is a test"
" "

FOOTING
" "

ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     STYLE=BOLD,
     LINE=1,
     COLOR='NAVY',
	 JUSTIFY=CENTER,
$
TYPE=FOOTING, SIZE=12, STYLE=BOLD,
$
TYPE=SUBFOOT, HEADALIGN=BODY,$
TYPE=SUBFOOT, LINE=1, ITEM=1, OBJECT=TEXT,  JUSTIFY=LEFT,                    COLOR=RED,   COLSPAN=8, $
TYPE=SUBFOOT, LINE=1, ITEM=2, OBJECT=FIELD, JUSTIFY=LEFT,  BACKCOLOR=BLUE,   COLOR=WHITE, COLSPAN=1, $
TYPE=SUBFOOT, LINE=1, ITEM=3, OBJECT=FIELD, JUSTIFY=RIGHT, BACKCOLOR=PURPLE, COLOR=WHITE, COLSPAN=1, $
TYPE=SUBFOOT, LINE=1, ITEM=4, OBJECT=FIELD, JUSTIFY=RIGHT, BACKCOLOR=GREEN,  COLOR=WHITE, COLSPAN=1, $
TYPE=SUBFOOT, LINE=1, ITEM=5,               JUSTIFY=RIGHT, BACKCOLOR=ORANGE, COLOR=WHITE, $
-*
TYPE=SUBFOOT, LINE=2, ITEM=1, OBJECT=TEXT,  JUSTIFY=LEFT,                    COLOR=RED,   COLSPAN=8, $
TYPE=SUBFOOT, LINE=2, ITEM=2, OBJECT=FIELD, JUSTIFY=LEFT,  BACKCOLOR=BLUE,   COLOR=WHITE, COLSPAN=1, $
TYPE=SUBFOOT, LINE=2, ITEM=3, OBJECT=FIELD, JUSTIFY=RIGHT, BACKCOLOR=PURPLE, COLOR=WHITE, COLSPAN=1, $
TYPE=SUBFOOT, LINE=2, ITEM=4, OBJECT=FIELD, JUSTIFY=RIGHT, BACKCOLOR=GREEN,  COLOR=WHITE, COLSPAN=1, $
TYPE=SUBFOOT, LINE=2, ITEM=5,               JUSTIFY=RIGHT, BACKCOLOR=ORANGE, COLOR=WHITE, $
ENDSTYLE
END


 


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
quote:
when there are spaces adjacent to the spot markers, the spaces count as additional item
Yes they do!

Happy to see the problem solved.


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
Guru
posted Hide Post
Choosing PDF, we got this:

0 NUMBER OF RECORDS IN TABLE= 41 LINES= 41
(FOC3218) NOTE: REPORT WILL BE PANELED; TOTAL WIDTH IS: 12.22 INCHES
(FOC3316) Multiple panels are not supported with HEADALIGN=BODY.

This message has been edited. Last edited by: Ricardo Augusto,


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 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     [SOLVED] Aligning defined fields in a subfoot for HTML, PDF, and Excel

Copyright © 1996-2020 Information Builders