Hi @SivaKV,
Let me first say that I'm not very familiar with ODS PDF. Such paging issue seem to be well known and I'm not aware of a general solution. In simple cases such as your example where page breaks occur after a constant number of lines (36 on my computer), you could create an auxiliary variable whose value indicates the start of a new page and then copy the group (actually: order) variable values to those lines as shown below:
data pricedata;
set sashelp.pricedata;
top=(mod(_n_-1,36)=0);
run;
proc report data=pricedata;
column top regionname regname productline prodline productname prodname date price1 price2;
define top / display noprint;
define regionname / order noprint;
define productline / order noprint;
define productname / order noprint;
define regname / computed 'Sales Region';
define prodline / computed 'Name of product line';
define prodname / computed 'Product Name';
define date / display;
compute before regionname;
rn=regionname;
endcomp;
compute before productline;
pl=productline;
endcomp;
compute before productname;
pn=productname;
endcomp;
compute regname / char length=7;
if top then regname=rn;
endcomp;
compute prodline / char length=5;
if top then prodline=pl;
endcomp;
compute prodname / char length=9;
if top then prodname=pn;
endcomp;
run;
While the original variables regionname, productline and productname are still used as order variables, only their computed copies regname, prodline and prodname are actually printed. They receive their values from temporary variables rn, pl and pn, which are populated while the corresponding values are available.
I have omitted the BREAK statement because "/ol" doesn't have an effect in ODS destinations other than LISTING. A different case would be, e.g.
break after productline / page;
In this case a page break would occur when the value of productline changes so that the definition of variable top would need to be adapted:
data pricedata;
set sashelp.pricedata;
by regionname productline;
if first.productline then ctr=1;
else ctr+1;
top=(mod(ctr-1,36)=0);
run;
What I've seen in industrial settings is that people don't use ODS PDF, but other ODS destinations (e.g. LISTING or RTF) and eventually convert their reports to PDF documents by means of third-party software tools.