Desktop productivity for business analysts and programmers

how to put report title through list data task?

Reply
N/A
Posts: 0

how to put report title through list data task?

how can i put report title in my text output through list data task in EG.
My report title will be coming only in the first page.
I have tried putting in list data report titles but that title is displayed all the pages
as a page header but i want in first page only
SAS Super FREQ
Posts: 8,721

Re: how to put report title through list data task?

Hi:
You did not mention what your destination of interest was. There are not any page numbers or page breaks in ODS HTML, but your SAS title would go before any group break (such as for grouped data) in a List Data task. With ODS RTF your SAS titles go into the header area of the output file, so those titles would appear on every page. With ODS PDF, your SAS titles go onto the top of each page, so that wouldn't work either.

The LIST DATA task is a discreet task, whose purpose is to list your data and the SAS titles for the task will work as described above. What I do when I need a title page is make a separate file or data set with the lines that go on the title page and then within one code block or ODS "sandwich", I have my list data task (or PROC PRINT) preceded by the code that produces the title page.

For example, in the code shown below, the DATA step program creates a table with one variable, TLINE. Every output statement writes one row to the output file, which is WORK.FIRSTPAGE.

The PROC REPORT step, then writes the data set using the NOHEADER option and some special style attributes to turn off the normal table lines that you would otherwise see. You can cut and paste this code into an EG code node and run it. The code will create 3 files for you -- HTML, RTF and PDF.

The PDF and RTF files should print the title lines on the first page at the front of the Proc Print output. The HTML may or may not print the title lines on the first page when you print, depending on the browser/printer that you use.

cynthia

[pre]
ods listing close;
options nodate nonumber;
title; footnote;

ods html file='c:\temp\titlepage.html' style=egdefault;
ods rtf file='c:\temp\titlepage.rtf';
ods pdf file='c:\temp\titlepage.pdf';
data firstpage;
length tline $90;
** write some blank lines at the top;
tline = " ";
output; output; output; output; output;

** then write the "title page lines";
tline ="Jabberwocky";
output;
tline ="by";
output;
tline = "Lewis Carroll";
output;
run;

proc report data=firstpage nowd noheader
style(report)={rules=none frame=void cellspacing=0}
style(column)={just=c font_size=18pt background=white};
column tline;
run;

options number pageno=2;
proc print data=sashelp.class;
run;

ods rtf close;
ods pdf close;
ods html close;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 122 views
  • 0 likes
  • 2 in conversation