Help using Base SAS procedures

Blank first page in proc report output

Reply
New Contributor KNN
New Contributor
Posts: 4

Blank first page in proc report output

Hi,

 

We have trouble finding out why we get a first blank page in the output from a proc report.

I hope somebody has come across the same problem.

 

Here are the relevant codesnippets:

 


%macro dan_report_styles;

%global
 vejl_link
 style_title1
 style_title2
 style_report
 style_column
 style_column_PDF
 style_header
 style_break
 style_rbreak
 style_status
 style_total
 ;


* styling report statement ;
 %let style_report={cellpadding=0 cellspacing=0 leftmargin=0.1in
             rightmargin=0.1in};

* styling column statement ;
 %let style_column={fontfamily=Verdana fontsize=8pt verticalalign=middle };

* styling column statement - PDF output ; 
 %let style_column_PDF={fontfamily=Verdana fontsize=6pt font_weight=bold cellwidth=0.7in};

* styling header statement ;
 %let style_header={fontfamily=Verdana font_size=8pt background=CX48656D foreground=white just=center};

* styling break lines ;
 %let style_break=[fontfamily=Verdana background=CXDBD9C0 foreground=black font_size=8pt];

* styling rbreak lines ;
 %let style_rbreak=[fontfamily=Verdana background=CX48656D foreground=white font_size=8pt font_weight=bold ];

 

 

%mend dan_report_styles;

 


proc report data=&_input nowd split='£' missing SPANROWS
 style(report)=&style_report.
 style(column)=&style_column_PDF.
 style(header)=&style_header.;

 

 

BR. Karsten

Trusted Advisor
Posts: 1,837

Re: Blank first page in proc report output

[ Edited ]

Can you regenerate your issue with option: obs=20 as a sample ?

Do you get the same issue running proc report without styles?

 

If positive please post:

- a datastep to read in your first 20 observations - the by variables with some others

- the log of this sample run 

SAS Super FREQ
Posts: 9,365

Re: Blank first page in proc report output

Hi:

  As already noted, it is hard to speculate, we need to see your FULL code, including your ODS destinations statements. You must be using PDF or RTF, but in this case, what option are you using. What does your data look like and what is happening in the rest of your macro program? You would not normally need a macro program just to use macro variables for STYLE overrides, which makes me wonder whether you have other processing done in your Macro program.

 

  There have been other postings related to getting a blank page:

https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-PDF-with-option-startpage-no-new-generates...

https://communities.sas.com/t5/General-SAS-Programming/ODS-PDF-How-to-deal-with-blank-page/td-p/1982...

https://communities.sas.com/t5/Base-SAS-Programming/Report-Blank-Page/td-p/105513

and, if RTF http://support.sas.com/techsup/notes/v8/16/976.html

 

 

  cynthia

 

New Contributor KNN
New Contributor
Posts: 4

Re: Blank first page in proc report output

Posted in reply to Cynthia_sas

Hi Cynthia and Shmuel,

 

Thank you very much for your replies - they are highly appreciated. I have not posted the complete code - I tried to extract the relevant parts in order to make it easy approachable for you. I will of course take your suggestions regarding how much code to post when I need help the next time. 

 

We have actually found a solution since I posted. We added a column to the dataset and filled this column with value=1 for the first 25 rows, value=2 for the next 25 rows and so forth. We can have 25 rows on each page. Then we group on this column. This solved the problem for us. 

 

Thanks again for your suggestions - and have a nice day.

 

Br. Karsten

 

Ask a Question
Discussion stats
  • 3 replies
  • 189 views
  • 2 likes
  • 3 in conversation