I need on more time your help. tis time is for stylesheet management.
I got the following code TABLE FILE NODDY PRINT NODDYFIELD AS '' NOPRINT BY NODDYFIELD NOPRINT ON NODDYFIELD SUBHEAD "E01<+0>E01" E01 are preced by greater than sign ON TABLE SET PAGE-NUM NOLEAD ON TABLE PCHOLD FORAMT PDF ON TABLE SET STYLE * TYPE=SUBHEAD, ITEM=1,POSITION=1,$ TYPE=SUBHEAD, ITEM=2,POSITION=12,$ ENDSTYLE END
I got two problems with it the first is that between each subhead i got a blank line and i would like to suppress it. The second one is that each item following each others so the two items don't respect the stylesheet I defined. The result output is :
NODDYNODDY -- Itm1Item2 -- blank line NODDYNODDY -- Item1Item2
Coul d you help me to solve theses two issues
Thx a lot Ludo
November 13, 2007, 10:11 AM
Francis Mariani
1) If you put your code between
[code]
[/code]
tags, you can place WebFOCUS code without fear of it getting transformed.
2) For PDF reports, POSITION=2, puts the heading item two inches from the left margin. You need to specify the column name you want to align the heading item to:
TABLE FILE CAR
SUM
SALES
RETAIL
BY COUNTRY NOPRINT
BY CAR NOPRINT
ON CAR SUBHEAD
"<COUNTRY<+0><CAR"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=SUBHEAD, ITEM=1,POSITION=SALES, COLOR=RED,$
TYPE=SUBHEAD, ITEM=2,POSITION=RETAIL,COLOR=BLUE,$
ENDSTYLE
END
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
November 13, 2007, 10:15 AM
Francis Mariani
And, in my old-fashioned 5.3.4 environment, I do not get a blank line after the SUBHEADing:
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
November 13, 2007, 10:17 AM
<ludo>
Thx for the tips for putting [code]
For my probleme of positionning i forgot to put the line settings in the style sheet so with this code TYPE=SUBHEAD,LINE=1,ITEM=1,POSITION=1,$ TYPE=SUBHEAD,LINE=1, ITEM=2,POSITION=12,$ I got the expected result.
But i still have a blank line between each value of subhead.
November 13, 2007, 10:31 AM
GamP
Ludo,
The empty line you see is NOT from the subhead, as Francis already showed. The blank line is the line that normally would contain printed or summed fields, for all of which you have specified NOPRINT. Hence this line will be empty and will remain empty. I'd advise you to create a report with print fields that will look very much like the same report using subheads. For example:
SET BYDISPLAY = ON
TABLE FILE CAR
PRINT CAR AS '' IN 45
BY COUNTRY AS '' IN 10
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=COUNTRY, COLOR=RED, $
TYPE=DATA, COLUMN=CAR, COLOR=BLUE, $
ENDSTYLE
END
Hope this helps....
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 13, 2007, 12:17 PM
mgrackin
If your output format is PDF, you can add a statement ot the stylesheet to reduce the font size of the DATA lines even though there is no data showing due to the NOPRINTs.
TYPE=DATA, SIZE=1,$
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
November 13, 2007, 12:24 PM
mgrackin
In order for this technique to work, you must have at least one field showing. I the example below I added a COMPUTE field that is blank.
SET BYDISPLAY = ON TABLE FILE CAR PRINT CAR NOPRINT COMPUTE BLANK/A1=''; AS '' BY COUNTRY NOPRINT BY CAR NOPRINT ON CAR SUBHEAD "This <CAR is from <COUNTRY" ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=DATA, SIZE=1,$ ENDSTYLE END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
November 14, 2007, 03:56 AM
<ludo>
Hi all,
After tying the differents solutions you gave me the one i achieve to make working is GamP's one...
The solution of mgrackin doesn't work i made the compute fields
COMPUTE BLANK/A1=''; AS ''
with the given style sheet but I still have a empty line between each subhead ...
I have another question for the IN Parameters
TABLE FILE TOTO
PRINT
LIB1 AS '' IN 1
LIB2 AS '' IN 44
LIB3 AS '' IN 57
END
My question is : How can I manage dynamically the position to place my fields. Indeed the Lib2 is a varchar ans i want the lib3 following the lib2 in output. If the lib2 is too big I will erase it by the lib3
I apology for my english and hope you understand me
Regards Ludo
November 14, 2007, 09:11 AM
mgrackin
Ludo,
The suggestioon I posted technically does not eliminate the blank lines. It just reduces the size of them to look like they are not there. This only works with PDF output format.
When you ran the code did it reduce the size of the lines between the SUBHEADs at all?
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
November 14, 2007, 09:18 AM
Francis Mariani
If you want LIB3 to follow LIB2, don't use "IN 99" at all.
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
November 14, 2007, 12:07 PM
<ludo>
For Mickey : No I got the same space size between the subeheads and I'm looking for a solution to supress these blank lines so i did it by using Gamp solution.
For Francis: I'm so stupid I haven't thought a so simple solution. It works !
Thx all
November 14, 2007, 01:06 PM
Francis Mariani
How many WebFOCUS developers are there in Luxembourg? If there's a shortage, I'd like to volunteer!
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
November 15, 2007, 03:04 AM
<ludo>
Not so much WF developers in Luxwembourg. I think that only 2 or 3 bank use it. But the problem is that IBI is not very well none here. People use BO Oracle solutions or inhouse solutions so it's difficult to take advantage of a WF know-how
But if you'r ready to come in Europe i'll make a switch with you and come in Canada ... to increase my skill in WF , english and use my mother tongue french This message has been edited. Last edited by: <ludo>,