Hi, Grasshopper:
Here's part 2. Your PROC REPORT specific questions (my answers are in bold underneath your numbered questions):
Using PROC REPORT for a text file, can you
1. Give report headers and footers
yes depending on your destination and your technique (whether you were using BY group processing or not), you could either use compute before and compute after or compute before _page_ and compute after _page_ to get what some people consider to be REPORT headers and REPORT footers (where the text is -inside- the boundary of the table area).
2. Wrap column text
Yes -- in LISTING destination, ASCII text file using FLOW and WIDTH options
Yes -- in RTF, PDF and HTML destinations using CELLWIDTH example
See the table at the end of this posting:
http://support.sas.com/forums/thread.jspa?messageID=7442ᴒ
and this one
http://support.sas.com/forums/thread.jspa?messageID=7408ᳰ (Example 1 program)
3. Give customised total and sub total labels
yes, using COMPUTE blocks. See this prior forum posting, when the word 'SubTotal' or some customized text was changed at the break:
http://support.sas.com/forums/thread.jspa?threadID=1796&tstart=0
and this one
http://support.sas.com/forums/thread.jspa?threadID=1827&tstart=0
and
Example 2 program in this prior posting:
http://support.sas.com/forums/thread.jspa?messageID=7408ᳰ
4. How to give report headers and report footers (NOT page headers and page footers)
I do not understand how this question for #4 is different from what you asked in #1. In either case, the Example 2 program at this post,
http://support.sas.com/forums/thread.jspa?messageID=7408ᳰ
showed customizing breaks (Asia SubTotal), showed how to use COMPUTE BEFORE breakvar and COMPUTE BEFORE _PAGE_. As I said in #1 depending on your destination and whether you were using BY group processing, EITHER of these COMPUTE blocks might produce something that can be considered a REPORT HEADER (not the kind of PAGE header that comes from the SAS title. If you run the program and create the output file of your choice -- ASCII text, vs HTML, vs RTF, vs PDF -- then you will see by comparing the output how the different syntax produces different results in different destinations.
[pre]
compute before _page_;
line "Before Report Table";
endcomp;
compute before region;
line "Before Region";
endcomp;
[/pre]
At this point, in order to understand how PROC REPORT works, the only thing for you to do is to work with PROC REPORT or take a class or read the documentation to try to figure out what it is you want to do. One place to start would be with the code samples that have been previously posted and the code samples in the SAS help topics and the code samples in various user-group papers and to use them and study them and experiment with them until you get the end results you want -- or close to the end results you want.
Good PROC REPORT help topics are entitled:
Creating Detail and Summary Reports with the REPORT Procedure
Overview: REPORT Procedure
Concepts: REPORT Procedure
How PROC REPORT Builds a Report
A good SUGI/User-group paper on the subject of PROC REPORT is:
http://www.lexjansen.com/pharmasug/2005/handsonworkshops/hw07.pdf (Art Carpenter tutorial)
Another good source of help is the Tech Support FAQ. If you search the Tech Support FAQ for "PROC REPORT", there are 700+ hits on frequently asked questions about PROC REPORT.
If you have an immediate need, then your only other choice is to contact Tech Support for further help. If you are having problems with code that's been posted, then Tech Support can help you figure out how to modify these code examples for your particular need.
cynthia