Hi:
Yes, you CAN use PROC REPORT. However, if you want to display both character and numeric data values in ONE column, then you have to turn any numeric variable values into character strings with the PUT statement. You are better off if ALL your data are character variables, because then you can just concatenate them together without worrying about converting numeric variables to character strings.
Next, you have the issue of how to break the line.
In the LISTING destination with SAS and PROC REPORT, you can use the FLOW option on the DEFINE statement to cause text within data cell to wrap. However, even if you use FLOW and the / (the default line break character) in PROC REPORT, you may find that information is not lined up the way you want or that the line still breaks awkwardly, depending on the WIDTH you use.
Examples of using FLOW (and CELLWIDTH) can be found in these previous forum postings:
http://support.sas.com/forums/thread.jspa?messageID=7470ᴮ
http://support.sas.com/forums/thread.jspa?messageID=6397
http://support.sas.com/forums/thread.jspa?messageID=7505ᵑ (#2)
http://support.sas.com/forums/thread.jspa?messageID=7468ᴬ
http://support.sas.com/forums/thread.jspa?messageID=7403ᳫ
For ODS destinations, like HTML, RTF and PDF, you can use the ODS ESCAPECHAR + n to insert a line break/line feed that is respected in these destinations. So, by this I mean:
[pre]
ODS ESCAPECHAR='~';
[/pre]
If the ESCAPECHAR is set to tilde (~) then ~n is the string that will cause a line break in RTF, PDF and HTML (but NOT in the LISTING destination).
This example uses SASHELP.CLASS and shows the use of WRAP and FLOW with the / for the LISTING destination and also shows the use of ODS ESCAPECHAR for other ODS destinations.
cynthia
[pre]
ods listing;
ods html file='c:\temp\multi_line.html' style=egdefault;
ods escapechar='~';
proc report data=sashelp.class nowd ls=256 nocenter split='/';
title 'Multi_Line with PROC REPORT -- FLOW option ignored for ODS';
title2 'So use ESCCHAR + n for ODS destinations other than LISTING';
column name sex age height weight newvar odsvar;
** These variables are all NOPRINT because they are only going;
** to be used to build the NEWVAR and ODSVAR report items.;
define name/ order noprint;
define sex /display noprint;
define age /display noprint;
define height /display noprint;
define weight /display noprint;
define newvar /computed flow width=20 'FLOW/Works in/LISTING';
define odsvar /computed f=$200. 'Esc+n/Works in/ODS';
** NEWVAR will format well in LISTING dest, depending on WIDTH and FLOW;
compute newvar / character length=200;
slash = '/';
newvar = cats(name,slash,sex,slash,
put(age,3.0),slash,
put(height,6.2),slash,
put(weight,6.2));
endcomp;
** ODSVAR will format well in RTF, PDF and HTML, since it uses ODS ESCAPECHAR string for line feed;
compute odsvar / character length=200;
linefeed = '~n';
odsvar = cats(name,linefeed,sex,linefeed,
put(age,3.0),linefeed,
put(height,6.2),linefeed,
put(weight,6.2));
endcomp;
break after name /skip;
compute after name;
line ' ';
endcomp;
run;
ods html close;
[/pre]