The SAS Output Delivery System and reporting techniques

Gap in line in report in ods pdf

Reply
New Contributor
Posts: 3

Gap in line in report in ods pdf

Hi,

I am creating a report and using ods to print to PDF. I have 8 columns. Three pairs of which have a commun colum header. There is a gap inthe line above the column headers that spans from part way through the first column to the third column, which is the first set of columns to share a column header.
Below is my COLUMN statement and partial output. I am using some style formating in my DEFINE statements as well as a general styles template.

COLUMN STD_DAY STAT_ORDER STAT ('Male Subjects' MALE1 MALE2) ('Female Subjects' FEMALE1 FEMALE2) ('All Subjects' TOT1 TOT2);

______******************____________________________________
Study Day Statistic MaleSubjects Female Subject All Subjects


I am using the '*' to illustrate the gap.

Any help would be appreciatted.
Brian Message was edited by: Brian Tucker
SAS Super FREQ
Posts: 8,864

Re: Gap in line in report in ods pdf

Posted in reply to Brian_Tucker
Hi:
When you print the PDF file, is the gap still there? When you zoom the view of the PDF file, is the gap still there?

Frequently, when I see odd lines in PDF output on the screen, it is a "small resolution line drawing" issue -- and if I zoom the view to 100% or 125% or print the output, I discover that there is no gap or missing line.

The only other thing that might be causing issues is if you are trying to overcontrol the cellwidth -- usually PDF does spanning headers quite nicely calculating the cell widths on its own.

When I run your column statement with some test data, I do not see any gap in the lines (using either the default Printer style or with the Journal style). Therefore, I wonder what is happening in your style template and DEFINE STYLE= overrides that might be altering the final results.

You might wish to work with Tech Support on this issue, as they can open a track, they can review your template code and ALL your PROC REPORT code and your PDF output file and they can work with you on possible style corrections until the issue is resolved.

cynthia
[pre]

data class (keep= std_day stat_order stat male1 male2 female1 female2 tot1 tot2);
set sashelp.class;
length std_day $9;
std_day = 'Monday';
if sex = 'M' then stat_order = 111;
else stat_order = 222;
stat = 'xxx';
male1 = height;
male2 = weight;
female1 = height +5;
female2 = weight + 5;
tot1 = sum(male1, female1);
tot2 = sum(male2, female2);
output;
std_day = 'Wednesday';
if sex = 'M' then stat_order = 111;
else stat_order = 222;
stat = 'yyy';
male1 = height +2;
male2 = weight +2;
female1 = height +3;
female2 = weight + 3;
tot1 = sum(male1, female1);
tot2 = sum(male2, female2);
output;
run;

ods pdf(1) file='c:\temp\spanhdr_def.pdf';
ods pdf(2) file='c:\temp\spanhdr_jour.pdf' style=journal;

proc report data=class nowd;
COLUMN STD_DAY STAT_ORDER STAT ('Male Subjects' MALE1 MALE2) ('Female Subjects' FEMALE1 FEMALE2)
('All Subjects' TOT1 TOT2);
title 'Spanning Headers -- Fake Data';
define std_day / group 'Study Day';
define stat_order / group 'Order';
define stat / group 'Statistic';
define male1 /sum;
define male2 / sum;
define female1 /sum;
define female2/sum;
define tot1 / sum;
define tot2 / sum;
rbreak after /summarize;
run;
ods _all_ close;

[/pre]
New Contributor
Posts: 3

Re: Gap in line in report in ods pdf

Posted in reply to Cynthia_sas
Thanks,

I did a little more investigating on the style={cellwidth=} options. I was forcing my columns to fit a specified width. I removed those style options and included a global STYLE(REPORT)={OUTPUTWIDTH=100%}. That fixed it. Thanks for the tip on the overcontrol on the cell width!

Brian
Ask a Question
Discussion stats
  • 2 replies
  • 150 views
  • 0 likes
  • 2 in conversation