Help using Base SAS procedures

Proc Report - Extra Space

Reply
Contributor
Posts: 32

Proc Report - Extra Space

Hi All,

I am having trouble in deleting extra 2 spaces in my Proc Report.

First thing I did is to check for duplicates in my category list and I did not find any.

Please help me to figure out the reason behind these spaces after the fourth category.

untitled.bmp

Thank you,

Ravi.

SAS Super FREQ
Posts: 8,868

Re: Proc Report - Extra Space

hi:

  The extra space that you're seeing depends on several factors:

1) your PROC REPORT code -- you do not show your PROC REPORT code -- breaks and "skips" come from COMPUTE blocks and/or BREAK statements. Without seeing your code, it is impossible to "guess" what is happening.

2) your data -- again -- the BREAKS and COMPUTE blocks and possible line statements happen because of your code and your data

3) your destination. -- You say you are using PROC REPORT -- but are you also using ODS? Is this somethign that you are running as a stored process using Web Report Studio or is this something that you are running in Enterprise Guide or in SAS Display Manager??? It is impossible to see, from the tiny screen shot (with all missing values) what your destination of usage is -- SASReport, HTML, RTF, PDF?? Something else????

  If you are unable to post some sample data and your code, then I would suggest that you open a track with Tech Support so they can look at everything and help you find a solution.

cynthia

Contributor
Posts: 32

Re: Proc Report - Extra Space

Posted in reply to Cynthia_sas

Cynthia,

Sorry, I could not share my code and sample data for you to understand my problem.

Let me explain you what I am doing and how I got rid of this issue.

Below are my answers to your questions:

2)I have used COMPUTE blocks to skip a row in the report.

3)I have used ODS to get my output in PDF.

Description:

Similar SAS dataset is constructed to make standard template

Data test;

infile cards DSD DLM=",";

input Catg $20. Rank Order;

cards;

Blue, 1, 1,

Red,1, 2,

Tiger,2,1

Lion,2,2

;

run;

I will then LEFT JOIN my real time data with TEST dataset with catg as my Key.

I got the right results with all categories in right format except one category where I see 2 more extra rows inserted. In first look, I though it might be some extra row blank data. But I did not find any duplicate errors.

Next thing I want to test is rearranging the categories.

I did rearrange the categories in my TEST dataset  and this issue was resolved. I still dont understand why.

Data test;

infile cards DSD DLM=",";

input Catg $20. Rank Order;

cards;

Tiger,1,1

Lion,1,2

Blue,2, 1,

Red,2, 2,

;

run;

Thanks for your valuable inputs.

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