Focal Point
[SOLVED] Freeform PDF Spacing Issues

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

February 15, 2012, 08:46 AM
RichardA
[SOLVED] Freeform PDF Spacing Issues
This report:

-SET &ECHO=ALL;



DEFINE FILE REFERTCM
	PIR_CITY       / A20 = 'Philadelphia';
	PIR_STATE      / A2 = 'PA';
	PIR_ZIP        / A5 = '19123';
END



TABLE FILE REFERTCM
PRINT MCID NOPRINT
WHERE RECORDLIMIT EQ 1
HEADING
"<PIR_CITY>, <PIR_STATE <PIR_ZIP"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
$
TYPE=REPORT,
	TOPMARGIN=1,
	BOTTOMMARGIN=1,
$
TYPE=HEADING,
	WRAP=7,
$
ENDSTYLE
END

-EXIT


Give me some weird spacing issues. What is going on? I want the city-state-zip on the same line like normal but it gives me lots of extra spaces.

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


Sandbox Version: 8.1.04
Sandbox Platform: Windows 2008 R2
Testing Version: 7.7.02M
Testing Platform: Windows Server 2008 R2
WF Production Version: 7.7.02M
Production Platform: Windows Server 2008
February 15, 2012, 10:15 AM
njsden
RicharA, HTML is getting in the way and we cannot see your code. Please post your sample code using
[code]
tags.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
February 15, 2012, 10:32 AM
RichardA
I changed it with the code tags.


Sandbox Version: 8.1.04
Sandbox Platform: Windows 2008 R2
Testing Version: 7.7.02M
Testing Platform: Windows Server 2008 R2
WF Production Version: 7.7.02M
Production Platform: Windows Server 2008
February 15, 2012, 10:42 AM
njsden
quote:

TYPE=HEADING,
WRAP=7,
$


You're making every element in your HEADING wrap to 7 inches, which may explain the spacing you're seeing.


Try using WRAP or WIDTH on an element-by-element basis instead of a "global" HEADING setting as it will give you more control.

...
TYPE=HEADING, OBJECT=FIELD, ITEM=1, WRAP=1.5, $
...




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
February 15, 2012, 01:14 PM
RichardA
That works but how can I get the trailing spaces after the city and before the comma? The trim command only works if you know the resulting length. I get something that looks like this right now:

Philadelphia          , PA 19123


And if I use the strong concatenation operator (||) to put it in a variable of length 30, it ends up looking like this:

Philadelphia,      PA 19123



Sandbox Version: 8.1.04
Sandbox Platform: Windows 2008 R2
Testing Version: 7.7.02M
Testing Platform: Windows Server 2008 R2
WF Production Version: 7.7.02M
Production Platform: Windows Server 2008
February 15, 2012, 01:42 PM
RSquared
Try the Squeez function


PIR_CITY / A20 = 'Philadelphia'
SQCNAME/A20 = SQUEEZ(20, PIR_CITY, 'A20');


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
February 15, 2012, 01:51 PM
RichardA
I think that will work. Thanks!


Sandbox Version: 8.1.04
Sandbox Platform: Windows 2008 R2
Testing Version: 7.7.02M
Testing Platform: Windows Server 2008 R2
WF Production Version: 7.7.02M
Production Platform: Windows Server 2008