Vidhu
Vidhu

Reputation: 1

Title and footnotes alignment by ods pdf text option

while creating sgpanel report using SAS I have used ods pdf text for setting up the titles and footnotes but the titles and footnotes are getting splitting up when multiple pages occur.

tried to setup using startpage options[here the highlighted titles should be populated in the next page (https://i.sstatic.net/5KhX8.jpg)

title1 h=1.5 'Sales by Country';
ods graphics / noscale reset outputfmt=png height=400px width=600px border;
ods rtf file= "E:\Working Folder\Vidhya\TFL\Figures\sample.rtf" startpage=no gtitle;

%macro count;
  %do i=1 %to 3;
    ods text= "title1";
    ods text ="title2";
    ods text= "title3";
    ods text ="titl4";
    proc sgpanel data=prdsale1;
      where ct=&i.;
      styleattrs datacolors=(tan cxbdbdbd)datacontrastcolors=(black black);
      panelby country / novarname columns=3 headerattrs=(size=12)headerbackcolor=grayf5;
     vbox actual / category=prodtype group=prodtype capshape=line dataskin=pressed
      meanattrs=(symbol=diamondfilled);
      colaxis display=(nolabel noticks novalues);
      rowaxis valueattrs=(size=10) labelattrs=(size=12);
      format min max dollar12.;
      colaxistable num / label='Num' position=bottom separator 
                      valueattrs=(size=10) labelattrs=(size=10);
      colaxistable min / label='Min' position=bottom separator 
                      valueattrs=(size=10) labelattrs=(size=10);
      colaxistable max / label='Max' position=bottom separator 
                      valueattrs=(size=10) labelattrs=(size=10);
      keylegend / title='' valueattrs=(size=12) autoitemsize;
    run;

    ods text= "foortnote";
    ods text= "foot note 2";
    ods text ="foot note 4";
  %end;

  ODS _all_ close;
%mend;

%count;

enter image description here

Upvotes: 0

Views: 409

Answers (1)

Richard
Richard

Reputation: 27508

The ODS TEXT does not know if the subsequent Proc output will require a new page, your best situation is to find the graphic output height that gives you 2 Proc outputs per page. You would also want some text or hrule acting as a 2-in-1 page separator.

ods graphics / noscale reset outputfmt=png HEIGHT=3.4in width=600px border;
...

If you can't do that, then force a new page before the title ODS TEXT.

...
    ODS RTF STARTPAGE=NOW;
    ods text= "title1";
...

Upvotes: 0

Related Questions