Focal Point
[SOLVED] Goofy heading text in PDF Report

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9601093492

August 05, 2008, 01:20 PM
Tomsweb
[SOLVED] Goofy heading text in PDF Report
I have created a report in PDF format and the text below appears in the report header.

Provider:Cooper, Joseph

Here is the current code:
TABLE FILE PFRGRID
PRINT
MEASURE/A35 AS 'PERFORMANCE DATA'
IALTDESC2/A8 AS 'Indicator,Type'
. . . . .
COMPUTE HEADER3/A200 = IF TABPAGENO EQ 1 THEN 'Provider: ' || PHYSICIAN ELSE ' '; NOPRINT
. . . . .
ON TABLE PCHOLD FORMAT PDF
END

I have tried to put the string 'Provider:' into a dialogue manager variable and use DEFINE to manipulate the names and get a result such as:
Provider: Cooper, Joseph

I am very new to using style sheets. Is it possible that PDF is a bad guy here?

Any ideas? Roll Eyes

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
August 05, 2008, 01:22 PM
Tomsweb
Correction to my previous post:
Actually the text displays like this:

Provider:Cooper, Joseph


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
August 05, 2008, 01:24 PM
Tomsweb
Correction to my previous post:
Actually the text displays like this:

Provider:Cooper, Joseph

Anyway, there are about six (6) spaces after
the comma, and preceding the first name.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
August 05, 2008, 01:32 PM
Prarie
If you just print it out in the report does it have the same effect?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
If I change the output format to EXL2K the entire line shifts to the left


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
Tom,

How is your PHYSICIAN field being compiled, a concatenation of other fields? If so then your concatenation is at fault and not your style sheet.

A single pipe '|' character is a soft concatentation and will concatenate fields without compressing white space to nothing, whereas a double pipe '||' is a hard concatenation that will compress white space to nothing.

If your PHYSICIAN field is made up of PHYSICIAN_LAST/A12 and PHYSICIAN_FIRST/A12 then you could concatenate them as you wish by -

PHYSICIAN/A26 = PHYSICIAN_LAST || (', ' | PHYSICIAN_FIRST);

However, if that is not how your field is compiled then please provide more info.

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 
Tom

if you put your code example or output examples between
 [CODE]  
[/CODE] it would be better readable.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

SQUEEZE=ON
go have a read of the 2 excellent articles by Mickey Grackin on PDF
part 1
and
part 2




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Tom,

  
-* File tomsweb4.fex
TABLE FILE CAR
PRINT
     SALES
     COMPUTE HEADER/A100 = IF TABPAGENO EQ 1 THEN 'First: '|COUNTRY || ( ', '|CAR ) || ( ', '|MODEL ) ELSE ' '; NOPRINT
BY COUNTRY
BY CAR
BY MODEL
ON COUNTRY PAGE-BREAK
HEADING
"Page <TABPAGENO "
" "
"<HEADER "
" "
ON TABLE SET PAGE-NUM ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END


Notice:
SQUEEZE=ON
Strong concatenation
When you invoke TABPAGENO WF will not display page numbers, so, if you want them you have to code it in the HEADING.
Be sure to have the HEADING placed after the COMPUTE statement.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

danny, i have no problems with the tabpageno in the footer, with squeeze on.
what i do have is a problem with the total page count
My point, to danny below, is that the

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Susannah,

Of course you can place TABPAGENO in the FOOTING.
As for the total number of pages, I added this to my example and it worked fine:
  
FOOTING BOTTOM
"Page <TABPAGENO of <TABLASTPAGE "



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

Danny,
I have added your suggestion to my fex and I still see that there is no space between Provider: and Drname.

Code captioned in []:
[COMPUTE HEADER3/A200 = IF TABPAGENO EQ 1 THEN 'Provider: ' |(' ') || PHYSICIAN ELSE ' '; NOPRINT]

It displays like this:
Provider:Cooper,[about 6 spaces]Joseph
Provider:Smith,[about 6 spaces]Greg
Provider:Hasselkus,[about 6 spaces]Herman

I would like to see it display like this:
Provider:[1 or 2 spaces] Hasselkus,[1 space]Herman

Thanks Sweating


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
I also coded this:
[
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.152778,
RIGHTMARGIN=0.152778,
TOPMARGIN=0.138889,
BOTTOMMARGIN=0.138889,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
$
]
Confused


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
Tom,

If you see 6 spaces between physician's last name and first name it shows that that is how it is stored in the field PHYSICIAN... So I would take a look at that first. Maybe you should use the function SQUEEZ.

So, your code could be:
IF TABPAGENO EQ 1 THEN 'Provider: ' | SQUEEZ(n, PHYSICIAN, 'An') ELSE ' ';

Where n is the length of PHYSICIAN.

To check the spaces, do a dry run with font Courier New.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

Danny,

I tried the IF TABPAGENO EQ 1 THEN 'Provider: ' | SQUEEZ(n, PHYSICIAN, 'An') ELSE ' '; code and
I have gotten the header display that I want. However, I am using the stylesheet settings below, I am getting a second page (i.e. page 1.2) with this display:

HEADER3

Provider: Cooper, Joseph
Provider: Cooper, Joseph

So, as I have coded, 'ON PHYSICIAN PAGE-BREAK REPAGE', this happens for every doctor in the report. Ergo, my report has grown from 13 pages to 26 pages.

Could this be an issue with my stylesheet?

[
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.152778,
RIGHTMARGIN=0.152778,
TOPMARGIN=0.138889,
BOTTOMMARGIN=0.138889,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
$
]
??? Red Face


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
Tom,

When you get pages numbers such as 1.2 that means your information does not fit on one page wide and therefore WebFOCUS created a second page to the RIGHT to place the rest of the information on and numbered it 1.2. It will do this for every page therefore doubling your pages.

You may want to look at adjusting your report so it fits on one page width. This might be as easy as shrinking the font, reducing the margins or changing the ORIENTATION to LANDSCAPE.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
I solved this problem by realizing that I forgot to end the line with NOPRINT!

COMPUTE HEADER3/A40 = IF TABPAGENO EQ 1 THEN 'Provider: ' | SQUEEZ(30, PHYSICIAN, 'A30') ELSE ' '; NOPRINT

Sometimes the eyes just glaze over Cool


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
Good to hear it worked out to be that simple.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011