I’m just learning ODS and Report Writing Interface. I'm trying to duplicate the attached report.
From what I’ve read I don’t think I can use containers because the containers will not go from one page to the next page.
You can see from the attached sample report that the report is basically a header/detail. There can be multiple contacts
and the text for the note could be long and need to go from one page to the next.
I started coding it with just a table with 4 columns – 2 cols for the labels and 2 cols for the data. I’m still working
on trying to get rid of the borders on the cells and size the columns. I need to keep the border around the entire form.
But I’m wondering if maybe there is a different, better way to go about the report rather than using tables. Will using a
template give me the border around the report? Also I need to get rid of the first page that only has the title on it and start the table on the first page.
I haven't been able to size the columns. What I try has no effect. Here is the code I have so far.
%let destn =&csg_basepath./users/;
ods listing close;
options nodate nonumber;
ods escapechar="^";
options papersize=(7in 7in);
ods pdf notoc startpage=no file="&destn./RWITest4.pdf";
title "^{style [ just=center font_size=8pt backgroundcolor=cxccffff
font_weight=bold font_face=arial] Summary Report for CCS, DWH and HSR}";
data _null_;
set sashelp.class end=eof;
if _n_ = 1 then do;
dcl odsout adj();
adj.table_start(overrides: "width=7in");
end;
adj.row_start();
adj.format_cell(data: "Member Name: ", style_attr: "color=red just=left",
height: '1cm');
adj.format_cell(data: name, style_attr: "color=blue just=left ",
height: '1cm');
adj.format_cell(data: "Sex: ", style_attr: "color=red just=left ",
height: '1cm');
adj.format_cell(data: sex, style_attr: "color=blue just=left ",
height: '1cm');
adj.row_end();
adj.row_start();
adj.format_cell(data: "Age: ", style_attr: "color=red just=left ");
adj.format_cell(data: age, style_attr: "color=blue just=left ");
adj.row_end();
adj.row_start();
adj.format_cell(data: "Height: ", style_attr: "color=red just=left ");
adj.format_cell(data: height, style_attr: "color=blue just=left ");
adj.row_end();
adj.row_start();
adj.format_cell(data: "Weight: ", style_attr: "color=red just=left ");
adj.format_cell(data: weight, style_attr: "color=blue just=left ");
adj.row_end();
if eof then do;
adj.table_end();
end;
run;
ods pdf close;
Thank you,
... View more