At a customer's site there has been recently an upgrade from v9.1 to v9.2 and during testing we ran across an issue with PDF reports that have been created using ODS Layout and PROC REPORT.
I have search the forums, the usage notes and the various papers already posted on the differences but until now have not been able to find a solution.
Basically the report is created using 4 datasets and a modified template. The template used is generated using the following code:
/* Create the template for the pdf output */
ODS path sashelp.tmplmst (read) work.template (update);
proc template;
define style mystyles.mypdf;
parent=styles.Printer;
/* Style for the entire page */
STYLE Body /
FONT_FACE = "Verdana, Tahoma, Times Roman"
FONT_SIZE = 10pt
FONT_WEIGHT = medium
FONT_STYLE = roman
FOREGROUND = cx660099
BACKGROUND = CXFFFFFF
;
/* Style for a data cell */
STYLE Data /
FONT_FACE = "Verdana, Tahoma, Times Roman"
FONT_SIZE = 9pt
FONT_WEIGHT = medium
FOREGROUND = CX000000
BACKGROUND = CXFFFFFF
;
/* Style for the page title */
STYLE SystemTitle /
FONT_FACE = "Verdana, Tahoma, Times Roman"
FONT_SIZE = 20pt
FONT_WEIGHT = bold
FOREGROUND = CXFFFFFF
BACKGROUND = CX000099
CELLPADDING = 3
CELLSPACING = 0
;
/* Style for the table title */
STYLE Header /
VJUST = C
FONT_FACE = "Verdana, Tahoma, Times Roman"
FONT_SIZE = 10pt
FONT_WEIGHT = bold
FOREGROUND = CX000000
BACKGROUND = CXFF6600
;
/* Style for page numbering */
STYLE PageNO FROM HeadersAndFooters /
JUST=C
VJUST=B
FONT_FACE = "Verdana, Tahoma, Times Roman"
FONT_SIZE = 8pt
FONT_STYLE = roman
PRETEXT='Pagina '
POSTTEXT=" van ^{lastpage}"
;
/* Styles that can be used for ODS Layout */
/* STYLE LayoutContainer /*/
/* BORDERWIDTH = 1mm*/
/* BORDERSTYLE = Solid*/
/* BORDERCOLOR = Blue (_undef_)*/
/* ;*/
/* STYLE LayoutRegion /*/
/* ;*/
end ;
run;
In order to enable recreation of the issue, find below the code that creates 4 datasets based on SASHELP.PRDSALE. Please note that this just serves as an example.
PROC SQL ;
CREATE TABLE HEADER_LEFT AS
SELECT DISTINCT COUNTRY AS DESCRIPTION LENGTH=64 FORMAT=$64.
FROM SASHELP.PRDSALE
WHERE YEAR = 1994
ORDER BY COUNTRY ;
CREATE TABLE REPORT_DATA AS
SELECT COUNTRY
, REGION
, PRODTYPE
, PRODUCT
, SUM(ACTUAL) AS ACTUAL FORMAT=COMMAX16.2
, SUM(PREDICT) AS PREDICT FORMAT=COMMAX16.2
FROM SASHELP.PRDSALE
WHERE YEAR=1994
GROUP BY COUNTRY
, REGION
, PRODTYPE
, PRODUCT
ORDER BY COUNTRY
, REGION
, PRODTYPE
, PRODUCT ;
QUIT ;
DATA HEADER_RIGHT ;
ATTRIB CODE LENGTH=$32 FORMAT=$32. ;
ATTRIB DESCRIPTION LENGTH=$64 FORMAT=$64. ;
CODE = 'Actual' ;
DESCRIPTION = "Actual sales data as of &sysdate9." ;
OUTPUT ;
CODE = 'Predict' ;
DESCRIPTION = 'Estimated sales for '||put(year(today()),z4.) ;
OUTPUT ;
RUN ;
DATA HEADER_EXTRA ;
ATTRIB DESCRIPTION LENGTH=$128 FORMAT=$128. ;
DESCRIPTION = 'A dynamically generated line with additional report information' ;
RUN ;
The report is generated using the following code (which has already been slightly modified compared to the code used in v9.1)
OPTIONS NODATE NUMBER PAPERTYPE=ISOA4 ORIENTATION=LANDSCAPE ;
GOPTIONS DEVICE=ACTXIMG ;
TITLE ; FOOTNOTE ;
TITLE j=l height=4 '^S={vjust=center cellpadding=5pt font_size=20pt}'
"Subtitle"
j=c height=4 '^S={vjust=center cellpadding=5pt font_size=20pt}'
"Main Title"
j=r height=4 '^S={vjust=center postimage="