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     Alingment changes when adding color to my data line.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Alingment changes when adding color to my data line.
 Login/Join
 
Platinum Member
posted
My requirement is to have alternating colors for each row (grey, white)for this report...however this requirement throws off my report's alingment. When I remove the grey & white rows...everything alings up as expected...I've created an example using the car file. I'm looking for suggestions...any help would be appreciated.

TABLE FILE CAR
SUM SALES BY COUNTRY
ON COUNTRY SUBFOOT
"Total Type 10:<CNT.COUNTRY”
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE HOLD AS HOLDNAME5 FORMAT PDF
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=RGB(255 255 255),WHEN=SEQ EQ 1,JUSTIFY=LEFT,$
TYPE=DATA, BACKCOLOR=RGB(231 227 231),WHEN=SEQ EQ 0,JUSTIFY=LEFT,$
TYPE=REPORT,SIZE=9,FONT='ARIAL',ORIENTATION=LANDSCAPE,SQUEEZE=ON,GRID=OFF,$
TYPE=FOOTING, JUSTIFY=CENTER,$
-*TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,ITEM=2,POSITION=rsp0disacqid,JUSTIFY=LEFT,$
-*TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,ITEM=5,JUSTIFY=LEFT,$
TYPE=TITLE,STYLE=BOLD,$
ENDSTYLE
END
  


Thanks

Timothy




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Expert
posted Hide Post
Timothy,

Just use the alternate colour syntax -

TYPE=DATA, BACKCOLOR=(RGB(255 255 255) RGB(231 227 231)), JUSTIFY=LEFT, $

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, 2004Report This Post
Expert
posted Hide Post
Tim,

I'm confused. What happens when you replace your two BACKCOLOR lines with:

TYPE=DATA, BACKCOLOR=(WHITE GREY),JUSTIFY=LEFT,$

You can use RGB as well. I just got lazy.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
this is my actual code...the report needs to alternate colors between grey & white. When I have no backcolor syntax report is aligned with the rest of the report...however if I do include the backcolor...the first column data (report type) starts two characters to the right of the grey...ie with color:

record type
      10
    Total type 10:2 


without color
record type
       10
       total type 10:2   




TABLE FILE TEMPFIL0
PRINT
-*rsp0errorct      AS 'Nbr of Errors' NOPRINT
FRAUD0DESC       AS 'ERROR Code - Desc'
AND COMPUTE SEQ/I1 = IF LAST SEQ EQ 1 THEN 0 ELSE 1; NOPRINT

BY rsp0rectype   IN 1 AS 'Record Type' 
BY rsp0disacqid  AS 'Acquirer ID'
BY rsp0dismchnum AS 'Discover Acct Nbr'
BY rsp0dbaname   AS 'Merchant DBA'
BY rsp0errorct   AS 'Nbr OF Errors'
-*
ON rsp0rectype SUBFOOT
" "
"Total Type 10:<ERRORCT10"


ON rsp0disacqid SKIP-LINE
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE HOLD AS HOLDNAME5 FORMAT PDF
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=DATA, WHEN=SEQ EQ 1,JUSTIFY=LEFT,BACKCOLOR=WHITE,$
TYPE=DATA, WHEN=SEQ EQ 0,JUSTIFY=LEFT,BACKCOLOR=GREY,$
-*TYPE=DATA, BACKCOLOR=RGB(255 255 255),WHEN=SEQ EQ 1,JUSTIFY=LEFT,$
-*TYPE=DATA, BACKCOLOR=RGB(231 227 231),WHEN=SEQ EQ 0,JUSTIFY=LEFT,$
TYPE=REPORT,SIZE=9,FONT='ARIAL',ORIENTATION=LANDSCAPE,SQUEEZE=ON,GRID=OFF,$
TYPE=FOOTING, JUSTIFY=CENTER,$
-*TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,ITEM=2,POSITION=rsp0disacqid,JUSTIFY=LEFT,$
-*TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,ITEM=5,JUSTIFY=LEFT,$
TYPE=TITLE,STYLE=BOLD,$
ENDSTYLE
END 




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Platinum Member
posted Hide Post
My example did not come out corredt....

with color: two blank spaces are displayed before record type - thus throwing dlignment

without color: two blanks are not displayed in front of record type - thus the alignment is correct




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Expert
posted Hide Post
Tony, Great minds think alike.

Tim, this is another good technique:

TYPE=DATA, BACKCOLOR=(BY=COUNTRY WHITE GREY), $


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
quote:
TYPE=DATA, WHEN=SEQ EQ 1,JUSTIFY=LEFT,BACKCOLOR=WHITE,$
TYPE=DATA, WHEN=SEQ EQ 0,JUSTIFY=LEFT,BACKCOLOR=GREY,$


This syntax doesn't work. You need to combine the backcolor on a single stylesheet command.

Look at the syntax that Tony and I gave you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Tony,

This won't work as the lines need to alternate colors one color when ln = 1 and the other color when ln = 0. Adding the Backcolor syntax adds to spaces in front of my 1st column data
(report type) thus trowing off the alignment.




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Expert
posted Hide Post
Ginny, as always?

Tim,

Using the methods that Ginny and I have suggested, you no longer require the SEQ compute.

However, another method of doing this that I use is -
COMPUTE SEQ/I1 = ABS(LAST SEQ - 1); NOPRINT

Always gives 1 and 0.

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, 2004Report This Post
Expert
posted Hide Post
Tim,

I see what you mean, but that is normal FOCUS behaviour, 2 char column spacing. There was a setting to change this but I think it only applied to HTML? In PDF the "IN 1" doesn't do much?

If Mickey has the Forum open and is checking, he may be able to give you some assistance.

You can use this code to demonstrate exactly what Tim means - just comment the multi colour line and compare the two runs of the report -

APP PREPENDPATH IBISAMP
TABLE FILE GGSALES
SUM DOLLARS       AS 'ERROR Code - Desc'
 BY REGION IN 1   AS 'Record Type' 
 BY ST            AS 'Acquirer ID'
 BY CITY          AS 'Discover Acct Nbr'
 BY STCD          AS 'Merchant DBA'
 BY PRODUCT       AS 'Nbr OF Errors'
ON REGION SUBFOOT
" "
"Total Type 10:<TOT.DOLLARS"
ON ST SKIP-LINE
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
-* Comment and uncomment the following line to see the effect
TYPE=DATA, BACKCOLOR=(GREY WHITE), JUSTIFY=LEFT, $
TYPE=REPORT,SIZE=9,FONT='ARIAL',ORIENTATION=LANDSCAPE,SQUEEZE=ON,GRID=OFF,$
TYPE=FOOTING, JUSTIFY=CENTER,$
TYPE=TITLE,STYLE=BOLD,$
ENDSTYLE
END

T

This message has been edited. Last edited by: Tony A,



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, 2004Report This Post
Platinum Member
posted Hide Post
Tony,

Your suggestion is basically how I am doing this now..in my code I compute "seq" and print the backcolor based on seq....the issue is this throws off my alignment. (puts 2 spaces before the record type)



TABLE FILE TEMPFIL0
PRINT
-*rsp0errorct      AS 'Nbr of Errors' NOPRINT
FRAUD0DESC       AS 'ERROR Code - Desc'
AND COMPUTE SEQ/I1 = IF LAST SEQ EQ 1 THEN 0 ELSE 1; NOPRINT

BY rsp0rectype   IN 1 AS 'Record Type' 
BY rsp0disacqid  AS 'Acquirer ID'
BY rsp0dismchnum AS 'Discover Acct Nbr'
BY rsp0dbaname   AS 'Merchant DBA'
BY rsp0errorct   AS 'Nbr OF Errors'
-*
ON rsp0rectype SUBFOOT
" "
"Total Type 10:<ERRORCT10"


ON rsp0disacqid SKIP-LINE
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE HOLD AS HOLDNAME5 FORMAT PDF
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=DATA, WHEN=SEQ EQ 1,JUSTIFY=LEFT,BACKCOLOR=WHITE,$
TYPE=DATA, WHEN=SEQ EQ 0,JUSTIFY=LEFT,BACKCOLOR=GREY,$
-*TYPE=DATA, BACKCOLOR=RGB(255 255 255),WHEN=SEQ EQ 1,JUSTIFY=LEFT,$
-*TYPE=DATA, BACKCOLOR=RGB(231 227 231),WHEN=SEQ EQ 0,JUSTIFY=LEFT,$
TYPE=REPORT,SIZE=9,FONT='ARIAL',ORIENTATION=LANDSCAPE,SQUEEZE=ON,GRID=OFF,$
-*TYPE=FOOTING, JUSTIFY=CENTER,$
-*TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,ITEM=2,POSITION=rsp0disacqid,JUSTIFY=LEFT,$
-*TYPE=SUBFOOT,LINE=1,OBJECT=FIELD,ITEM=5,JUSTIFY=LEFT,$
-*TYPE=TITLE,STYLE=BOLD,$
ENDSTYLE
END  




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Expert
posted Hide Post
Tim,

Try taking the IN 1 off of the rectype and see what happens.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
I had already removed this....this was an attempt to force this column to appear in the first column....The report is still off by 2...




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Expert
posted Hide Post
Sorry Tim, I was editing the previous post because I understood what you meant Smiler The downside is that I am not sure that you can alter that behaviour in PDF?

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, 2004Report This Post
Platinum Member
posted Hide Post
Tony, Ginny

Thanks for your time....

Notice this....this helps explain my problem.
When you run the following as is...everything is aligned.

then un-comment the pchold and you'll see my problem...

TABLE FILE CAR
PRINT RCOST DCOST
BY COUNTRY
BY CAR
-*ON TABLE PCHOLD FORMAT PDF
-*ON TABLE SET BYDISPLAY ON
ON TABLE SET STYLE *
TYPE=REPORT, COLOR=NAVY, STYLE=BOLD,$
TYPE=DATA, BACKCOLOR=(BY=COUNTRY TEAL YELLOW GOLD),$
ENDSTYLE
END  




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Virtuoso
posted Hide Post
Sorry for the late response.

You are experienceing the addition of GAPs between the columns. I talk about this in my first article I wrote about HTML and PDF formatted reports. I will also be discussing this in my presentation at Summit 2008.

Basically, for PDF output reports, there are GAPs between columns, not spaces. Each column has a RIGHTGAP and a LEFTGAP. The code below shows you how to change these so the spacing looks correct.

If you would like more information read my article: http://www.informationbuilders.com/support/developers/htmlpdf.html


Here's the fixed code:

TABLE FILE CAR
PRINT RCOST DCOST
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET BYDISPLAY ON
ON TABLE SET STYLE *
TYPE=REPORT, COLOR=NAVY, STYLE=BOLD,$
TYPE=REPORT, COLUMN=COUNTRY, LEFTGAP=0.00,$
TYPE=REPORT, COLUMN=DCOST, RIGHTGAP=0.00,$
TYPE=DATA, BACKCOLOR=(BY=COUNTRY TEAL YELLOW GOLD),$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Mickey looks like those articles need to be mandatory reading for all. If anyone is going to Summit..go check out Mickey's presentation on this subject.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
Thanks Mickey...
Much Thanks to Tony and Ginny...

Mickey, what date's are your sessions on.

Thanks,
Timothy




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Virtuoso
posted Hide Post
My presentation is scheduled for 1:30pm on Tuesday, June 3rd. It is called "WebFOCUS Report Design: PDF vs. HTML"


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report 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     Alingment changes when adding color to my data line.

Copyright © 1996-2020 Information Builders