Focal Point
Data Alignment in PDF

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

April 04, 2007, 11:03 AM
Kamesh
Data Alignment in PDF
When I run the report in PDF with ACROSS value, Justify option is not working.

Try the following code,

HTML - gives me the desired output
PDF - not aligned proper

TABLE FILE CAR
SUM DEALER_COST/D12.1 AS ''
BY COUNTRY AS ''
ACROSS CAR AS ''
WHERE RECORDLIMIT EQ 10
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,SQUEEZE=ON,SIZE=7,$
TYPE=ACROSSVALUE,COLOR=GREEN,JUSTIFY=RIGHT,$
TYPE=REPORT,ACROSSCOLUMN=DEALER_COST,JUSTIFY=RIGHT,COLOR=RED,$
ENDSTYLE
END
-EXIT

I'm not sure where I'm missing, Please let me know your thoughts.

Thanks


WFConsultant

WF 8105M on Win7/Tomcat
April 04, 2007, 11:32 AM
Prarie
Check Mickey's article for some insight.

http://www.informationbuilders.com/support/developers/htmlpdf_part2.html


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Kamesh,

Add WRAP=#.## settings to your request.

1) Make sure the WRAP is set for both the ACROSSVALUE and the ACROSSCOLUMN.
2) Make sure the WRAP value is wide enough for both the across values and the across column values.
3) Make sure the WRAP value is EXACTLY THE SAME in both statements.

For Example:

TABLE FILE CAR
SUM DEALER_COST/D12.1 AS ''
BY COUNTRY AS ''
ACROSS CAR AS ''
WHERE RECORDLIMIT EQ 10
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,SQUEEZE=ON,SIZE=7,WRAP=0.60,$
TYPE=ACROSSVALUE,COLOR=GREEN,JUSTIFY=RIGHT,WRAP=0.60,$
TYPE=REPORT,ACROSSCOLUMN=DEALER_COST,JUSTIFY=RIGHT,COLOR=RED,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
Thanks Mickey, it works like a charm.

I didn't understand how the WRAP makes the difference.


WFConsultant

WF 8105M on Win7/Tomcat
Oddly, if you change the format of DEALER_COST to, say, D12.3, it aligns correctly.


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
Kamesh,

Here is a link to the PART 1 article I wrote which talks about SQUEEZE and WIDTH.

http://www.informationbuilders.com/support/developers/htmlpdf.html

In regards to your experience with your request, I suggest opening a case with IBI Tech Support. This looks like it may be an issue/bug.

Francis,

Here's my guess why it didn't work as expected:

The engine that creates the PDF probably applied the SQUEEZE to the ACROSSVALUES seperately from the ACROSSCOLUMN values. Therefore it came up with a different column width for the ACROSSVALUES for CAR than it did for the ACROSSCOLUMN values for DEALER_COST. Applying the WRAP setting forces the same column width for both. Judging from the way the results appear, this looks like it may be what is happening. Changing the format for DEALER_COST makes it longer so the calculated column width for DEALER_COST is wider. Ironically if you make the format D12.6 everything still works because the column width for the ACROSSVALUES adjusts to match the column width for DEALER_COST values.

Very interesting.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011