BookmarkSubscribeRSS Feed
Jima
Calcite | Level 5

I am getting the overlay of lines in PROC TABULATE (see output 'example.pdf'). I am producing 57 PDF files with each generating 21 PROC TABULATE tables. Some PDF reports can run to over 270 pages. I had this issue with one set of tables, but corrected it by changing the number of footnotes. The example below occurs on the last page of a table. There is plenty of room for the table. Any ideas of how to correct this?

 

Here is the SAS code:

ods listing close;

options orientation = landscape nodate;

ods pdf file = "&drive\&dir\program output\20&yr5.-&yr6.\&currnum._fall&yr6.progprofilex.pdf"

        STYLE=festival pdftoc=1 uniform;

ods escapechar='~';

options nonumber printerpath=pdf;

 

footnote1 j=l height=3 'CONFIDENTIALITY NOTICE: Data presented in this table are for the sole use of the ---- department responsible for the above curriculum and may';

footnote2 j=l height=3 'contain confidential and privileged information. Any access, use, disclosure, or distribution of these data for purposes other than program';

footnote3 j=l height=3 'review and analysis is unauthorized and prohibited.';

footnote4;

footnote5;

footnote6 j=left bold "Curriculum &currnum / Page ~{thispage} of ~{lastpage}"

          j=center bold "Office of ---------------------------"

          j=right  bold "&sysdate";.

.

.

.

 

ods proclabel="Table 16: First-Time-In-College (FTIC) Cohort Disaggregated Demographics";

proc tabulate data = zfive_yr_ftic missing style=[font_size=4];

    where curr = "&currnum";

        class year fp_code home_campus gender new_race acadplan;

    classlev year / style=[font_size=4];

        classlev fp_code / style=[font_size=4];

        classlev home_campus / style=[font_size=4];

        classlev gender / style=[font_size=4];

        classlev new_race / style=[font_size=4];

        classlev acadplan / style=[font_size=4];

        var count1 / style=[font_size=4];

        var wgt / style=[font_size=4];

        format gender $gender. new_race $racex. home_campus $home_campus. fp_code $fp_code. acadplan $acadplandeg.;

        table acadplan='' *(fp_code='FP' home_campus='CAMPUS' gender='GENDER' new_race='RACE')

          all='Total'*(fp_code='FP' home_campus='CAMPUS' gender='GENDER' new_race='RACE'),

          year=''*(wgt=''*(sum='N'*f=comma8.0 pctsum<fp_code home_campus gender new_race >='%'*f = 5.1))

                          / box=[label='Academic Plan'

                     style=[background=beige

                            foreground=black

                            font_size=4]]

                     style=[cellspacing=5]

             printmiss misstext='0';

    title3 'Table 16: First-Time-In-College (FTIC) Cohort Disaggregated Demographics';

run;

 

 

9 REPLIES 9
Ksharp
Super User
I am not sure. But could try style outputwidth=100%

table ............./ style=[cellspacing=5 outputwidth=100% ] .....
Jima
Calcite | Level 5

Ksharp, thanks for the reply. I tried your suggestion, but it didn't do the trick.

Ksharp
Super User
I am not sure. But could try style outputwidth=100%

table ............./ style=[cellspacing=5 outputwidth=100% ] .....
Ksharp
Super User

Can you post some data to replicate your problem. so we can test it .

Or @Cynthia_sas know the solution .

Jima
Calcite | Level 5

I am running 9.4M6. This might be a pagenation issue with ODS. If I output 'rtf' instead of 'pdf', the pagenation is different and everything looks ok. 

 

I had this issue with another table in this job stream. There was an overlay on ever other page. I eliminated this by changing the the number of lines of footnotes so row elements would not span over a page.

 

The 'Total' category for 'Race' begins on the previous page with rows for a heading and the first value of 'Race'. The page I showed is a continuation of the 'Total' section.

 

Also, if I make changes to the PROC TABULATE statement - for example, remove the FORMAT line - the pagenation is different and the PDF output looks ok.

 

I have attached a sample dataset.

Cynthia_sas
Diamond | Level 26
Hi:
Without data, the only thing I see is that the Header for RACE is being overlaid on top of the first level of that class variable. Things like this typically happen because the destination is getting some kind of conflicting instructions for how to render the output . Since there is nesting in the row dimension, and since all font sizes are relative numbers, that will force ODS PDF to convert all the fonts to PT sizes before the output is written. Cellspacing is also relative, and might be contributing to the conflicting instructions, too. My recommendation for debugging would be to break the output up and run some tests to see where the sweet spot was for having RACE as a rowheader in the nested row title area.
Cynthia
Jima
Calcite | Level 5

Cynthia_sas, thanks for your reply. I have decided to take a different approach to a solution by using a 'by' statement and some pre-report manipulation of the dataset.

 

Thanks for you help...

 

Jim

Ksharp
Super User

I didn't see any problem with your sample data.

Or could try other style ?  

STYLE=journal

 

libname x v9 'c:\temp';


ods listing close;

options orientation = landscape nodate;

ods pdf file = "c:\temp\progprofilex.pdf"

        STYLE=festival pdftoc=1 uniform;

ods escapechar='~';

/*options nonumber printerpath=pdf;*/

 

footnote1 j=l height=3 'CONFIDENTIALITY NOTICE: Data presented in this table are for the sole use of the ---- department responsible for the above curriculum and may';

footnote2 j=l height=3 'contain confidential and privileged information. Any access, use, disclosure, or distribution of these data for purposes other than program';

footnote3 j=l height=3 'review and analysis is unauthorized and prohibited.';

footnote4;

footnote5;

footnote6 j=left bold "Curriculum currnum / Page ~{thispage} of ~{lastpage}"

          j=center bold "Office of ---------------------------"

          j=right  bold "&sysdate";
 

ods proclabel="Table 16: First-Time-In-College (FTIC) Cohort Disaggregated Demographics";

proc tabulate data = x.test missing style=[font_size=4];

    where curr = "699";

        class year fp_code home_campus gender new_race acadplan;

    classlev year / style=[font_size=4];

        classlev fp_code / style=[font_size=4];

        classlev home_campus / style=[font_size=4];

        classlev gender / style=[font_size=4];

        classlev new_race / style=[font_size=4];

        classlev acadplan / style=[font_size=4];

        var count1 / style=[font_size=4];

        var wgt / style=[font_size=4];

/*        format gender $gender. new_race $racex. home_campus $home_campus. fp_code $fp_code. acadplan $acadplandeg.;*/

        table acadplan='' *(fp_code='FP' home_campus='CAMPUS' gender='GENDER' new_race='RACE')

          all='Total'*(fp_code='FP' home_campus='CAMPUS' gender='GENDER' new_race='RACE'),

          year=''*(wgt=''*(sum='N'*f=comma8.0 pctsum<fp_code home_campus gender new_race >='%'*f = 5.1))

                          / box=[label='Academic Plan'

                     style=[background=beige

                            foreground=black

                            font_size=4]]

                     style=[cellspacing=5]

             printmiss misstext='0';

    title3 'Table 16: First-Time-In-College (FTIC) Cohort Disaggregated Demographics';

run;
ods pdf close;

Ksharp_0-1636549271776.png

 

Jima
Calcite | Level 5

Zsharp, thanks for your reply. I have decided to take a different approach to a solution by using a 'by' statement and some pre-report manipulation of the dataset.

 

Thanks for you help...

 

Jim

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 2199 views
  • 0 likes
  • 3 in conversation