12-18-2012 09:45 AM
I am trying to have one footnote (in this case it should span over 2 columns), but I found out that de ODS BODYTITLE option prevents having only one footnote and title. Any suggestions?
12-18-2012 09:59 AM
Have you tried ODS TEXT? With the ESCAPECHAR option a you can use ODS RTF TEXT to have a lot of control over text appearance. The text would have to be after each output and wouldn't appear following tables that split across pages but may do what you need.
12-18-2012 12:59 PM
Insofar I tested it, the TEXT statements gets limited by the columns (when I write some text after the first table, it will be wrapped in the first column - it will not be extended into the second column).
I want to achieve one title and footnote like in the old days when I used ODS listing when I had one or more columns on a page.
I recently read something about gridded layout using the region statement to define different parts of a static paper (I try to do that but it does not work yet), but for one page it might be useful but when having more you should all create them by hand.
12-18-2012 01:53 PM
I don't know what you mean when you say that the TEXT statements are "limited by the columns that it will be wrapped in the first column". The code below created the output in the screenshot (shown in Word Print Preview mode). This is the default behavior. The text written by ODS text spans from margin to margin.
%let l1 = %str(Twas brillig and the slithy toves did gyre and gimble in the wabe.);
%let l2 = %str(All mimsy were the borogroves and the momeraths outgrabe.);
%let l3 = %str(Beware the Jabberwock my son! The jaws that bite, the claws that snatch!);
%let l4 = %str(Beware the Jubjub bird and shun the frumious Bandersnatch!);
options nodate nonumber;
title 'My Report';
footnote 'My Footnote';
ods rtf file='c:\temp\foot_text.rtf' startpage=no;
proc print data=sashelp.class noobs;
where age = 11;
ods text="&l1 &l2 &l3 &l4";
proc print data=sashelp.class noobs;
where age = 14;
ods rtf close;
12-18-2012 02:56 PM
Maybe my use of the columns is a little bit confusing. I want to get panels on a page in RTF (because the other half of the page is blank). I am using "ODS RTF ... COLUMNS=2" (ODS's multipanel equivalent of the PANELS= option for non-listing destinations according to Burlew's book).
When I use COLUMNS=2 the title1 and footnote1 is repeated in each panel (both have word wrap within a panel, also happens for normal ODS TEXTs between two PROC REPORTs which I tried to fit in each panel separately). This happens when I use the BODYTITLE tag in the ODS statement, I think. When the BODYTITLE is not there, both title and footnote appear in the right places (i.e., in their respective margins). In that case, using footnote and title will result in having one of each (from left to right on the page). However, I do not want them in the margins, but as a normal text. Therefore, I use the BODYTITLE ODS tag. But then the weird behaviour I described occurs. I want the footnote text (long, but fits landscape orientation) of the first panel run over/into the second panel (or in a separate region under both panels - which has the full page width to its disposal - if that is possible). In short, I need some room at the bottom of the page (not in the margin) which is taken into account by the panels statement so it will not write into this area, and which gets filled after all data is presented, for each physical page (containing panels). A trick to start writing text in one panel which runs into the next panel will also suffice.
I think the problem is that SAS thinks that each panel is a page (which is correct in a matter of speaking), and since BODYTITLE instructed it to lift the title and footnote out of the margins and handle these as normal text, these are reappering for each panel (after PROC REPORT). In ODS listing there was only one way for footnotes (like in the margins for RTF) so there was no problem with panels (maybe there was if one would use the LINE command in the COMPUTE AFTER statement when trying to fit two PROC REPORTs in two panels on one physical page, I haven't tested it, besides it is not that relevant now).
12-20-2012 12:51 PM
Did you try putting an ODS RTF columns=1; before the ODS Text? You need the equivalent of a Word end section instruction, which if you look in your RTF output using a plain text editor you should find a section start associated with the columns=2.
12-21-2012 05:25 AM
Thanks for your suggestion. I tried it, but somehow all statements are locked in the panel (i.e., it is seen has a normal page, and each panel does not know if it makes part of a bigger physical page). I tried to add a section between ods text and reports to see if the section behaviour (the separation in two panels) gets eliminated, but then it still does not give me the full page width. I also tried add text after the last column (maybe it would then go back to a normal width, like the effect of a carriage return), and put all things after the second panel on a new page by a page break, but then it still wraps text in the first column.
01-03-2013 12:03 PM
it is not that special, but i made one quickly:
do i = 1 to 100;
if i<=36 then pagenr=1;
else if i<=72 then pagenr=2;
ods tagsets.rtf file="temp.rtf" COLUMNS=2;
title 'listing - i want both title and footer one time only, just as if they were in the margin spaces';
footnote 'this footer will be wrapped in its own column unfortunately';
proc report NOWD DATA=temp HEADSKIP HEADLINE MISSING SPLIT='~';
COLUMN (pagenr i text);
DEFINE pagenr / ORDER ORDER=INTERNAL NOPRINT;
DEFINE i / ORDER 'number';
DEFINE text / ORDER CENTER WIDTH=7 'text';
BREAK AFTER pagenr / PAGE;
ods tagsets.rtf close;
i do want the text in the normal body (not in the margins), just like the bodytitle option in normal RTF. they should behave like they were in the margins (untouched by the columns/panels option).