The SAS Output Delivery System and reporting techniques

Issues with BODYTITLE_AUX

Reply
Occasional Contributor
Posts: 9

Issues with BODYTITLE_AUX

[ Edited ]

Hi everyone, I need help with ODS rtf and the BODYTITLE_AUX option.  

 

Client wants a condensed report so we try to fit two or more tables on one page, thus needing to use BODYTITLE_AUX so the titles are not embeded within the header of the RTF file.  I can't use ODS text for titles, because we generate many tables by class, and I use "title2 '#byval1'" and #byval2, which I don't believe can be achieved using ODS text.

 

However I ran into some issues with bodytitle_aux:

 

1) Page numbers are no longer working.  It just shows "Page   of     " , with no numbers. =(

2) The logo and footer are being displayed multiple times, which looks really strange.  We just want it once per page.

 

I have included a sample of my code below (with a dummy dataset). Perhaps someone can point out what I am missing in my code since I'm new to proc tabulate.  Thanks so much for your help!

 

ODS RESULTS OFF;
options orientation=portrait NODATE NOSTIMER NONUMBER NOBYLINE;
ods rtf file="&root.\Output\test_&SYSDATE9..rtf" startpage=no BODYTITLE_AUX cssstyle="&root.\style.css";
ods escapechar='^';
title1 j=center '^S={preimage="&root.\logo.jpg"}';
footnote j=left 'Name' j=center 'Page ^{pageof}' j=right "Last Revised: &SYSDATE9.";
proc tabulate data=sashelp.shoes;
  title1 '#byval1';
  where region in ('Asia', 'Canada','Pacific') and
        product in ('Boot', 'Slipper' );
  class product region;
  var sales;
  table region * (product all),
        sales*(n);
run;
proc tabulate data=sashelp.shoes;
  title1 '#byval1';
  where region in ('Asia', 'Canada','Pacific') and
        product in ('Boot', 'Slipper' );
  class product region;
  var sales;
  table region * (product all),
        sales*(n);
run;
ods rtf close;

 

SAS Super FREQ
Posts: 8,645

Re: Issues with BODYTITLE_AUX

[ Edited ]

I'm confused. You can't use #byval1 like you do without having a BY statement. What/where is the BY statement in your Tabulate???

Next, the TITLE1 with the logo instruction would be replaced by the TITLE1 inside the TABULATE step. Should the TABULATE title be  TITLE2???

cynthia

Occasional Contributor
Posts: 9

Re: Issues with BODYTITLE_AUX

[ Edited ]

Thanks so much, Cynthia.  Sorry, I used a dummy SAS code due to confidentially issues.  The real SAS code does have a by class statement in the Proc Tabulate so no worries.

 

I tried embedding Title1 within the Tabulate step but this does not solve my problem.  My problem is the Logo is now printed multiple times per page.  I would like it to be printed once per page.

 

My other issue is with the footer not displaying the page number when bodytitle_aux option is used.  It just prints, "Page  of    ".  What should I do?

 

Thanks so much again. Cat Happy

 

 

Post a Question
Discussion Stats
  • 2 replies
  • 226 views
  • 1 like
  • 2 in conversation