Alingment changes when adding color to my data line.
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
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
May 20, 2008, 11:28 AM
tlbrydie2
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
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
May 20, 2008, 11:51 AM
Tony A
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
May 20, 2008, 11:57 AM
Tony A
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
TThis 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
May 20, 2008, 11:58 AM
tlbrydie2
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
May 20, 2008, 12:08 PM
GinnyJakes
Tim,
Try taking the IN 1 off of the rectype and see what happens.
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
May 20, 2008, 12:20 PM
Tony A
Sorry Tim, I was editing the previous post because I understood what you meant 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
May 20, 2008, 12:33 PM
tlbrydie2
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
May 20, 2008, 01:46 PM
mgrackin
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.
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
May 20, 2008, 02:39 PM
Prarie
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
May 20, 2008, 02:44 PM
tlbrydie2
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
May 20, 2008, 02:54 PM
mgrackin
My presentation is scheduled for 1:30pm on Tuesday, June 3rd. It is called "WebFOCUS Report Design: PDF vs. HTML"