I have a report in which I have to display columns in multiple lines.
I have fields like Address1..Address4 and contact details and name of the customer like this I have around 30 columns which i want to display for each User =xxxx in 5 to 6 lines.
You CAN get that type of report from SAS, however, you will have to use program code (in a code node in Enterprise Guide).
Basically, you'll have to use a DATA step program. The newest syntax for FILE and PUT statements within the DATA step program works with ODS and produces ODS destination report output in LISTING, ODS HTML, ODS RTF and ODS PDF. These documentation topics will be the most useful to you:
"Dictionary of ODS Language Statements"
"FILE Statement for ODS"
"PUT Statement for ODS"
"Output Delivery System and the DATA Step"
There is also some older ("classic") syntax for FILE and PUT statements within the DATA step program for LISTING destination output ONLY:
"Understanding and Customizing SAS Output: The Basics"
"Controlling the Appearance of Pages"
"Writing Lines to the SAS Log or to an Output File"
"Writing to an Output File"
No matter which of these methods you choose, you will still have to use an EG code node to write and submit your report program.
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.
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:
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.
ods html file='c:\temp\multi_line.html' style=egdefault;
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;
** NEWVAR will format well in LISTING dest, depending on WIDTH and FLOW;
compute newvar / character length=200;
slash = '/';
newvar = cats(name,slash,sex,slash,
** 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,
break after name /skip;
compute after name;
line ' ';
ods html close;