BookmarkSubscribeRSS Feed
KNN
Fluorite | Level 6 KNN
Fluorite | Level 6

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

3 REPLIES 3
Shmuel
Garnet | Level 18

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 

Cynthia_sas
SAS Super FREQ

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

 

KNN
Fluorite | Level 6 KNN
Fluorite | Level 6

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

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2098 views
  • 2 likes
  • 3 in conversation