Hello, Using SGPANEL in SAS 9.4, I have produced RTF output of boxplots which goes over multiple pages, and I would like to put the page numbers on the output. I have tried using the {pageof} function to add the page numbers onto the output, however this does not seem to work with SGPANEL. It works fine with Proc Report though. I think this may be because with SGPANEL, the titles go into the body of the document. Below is the code I used, which is similar to my real life example. proc sort data = sashelp.pricedata out = pricedata;
by date;
run;
ods graphics / reset = all border = off width = 256mm height = 168mm;
goptions reset = all;
ods escapechar = "~";
%let ls = 100;
%let title1 = Boxplot of Sale by Quarter;
%let titt1 = %nrbquote(&title1 %sysfunc(repeat(%str( ),%eval(&ls - %length(&title1) -10))) ~{pageof});
title1 justify = left "&titt1";
ods rtf file = "C:\boxplot.rtf" style = styles.rtfplot image_dpi = 300 startpage=yes;
data pricedata2;
set pricedata;
quarter = qtr(date);
year = year(date);
quarter_year = cats("Q", quarter, "-", year);
run;
proc sgpanel data = pricedata2;
panelby year / columns = 4 uniscale = row noheader;
block x = quarter_year block = year / filltype=alternate novalues;
vbox sale / category = quarter_year group = region grouporder = ascending;
rowaxis type = log;
run;
ods rtf close;
goptions reset = all; Any help will be much appreciated. If I was using a by statement then I would have used the byval variables to add the page numbers. Thank you. Kriss
... View more