BookmarkSubscribeRSS Feed
mpajoh
Fluorite | Level 6

Hi All:

I am trying to learn the gridded layout and the follwoing is the first attempt:

dm 'odsresults; clear';

data a;

    do a= 1 to 10; output; end;

run;

dm 'clear log';

filename test "testing.pdf";

ods listing close;

ods pdf file=test notoc;

data _null_;

    set a end=eof;

    if _n_=1 then do;

        declare odsout obj();

        obj.layout_gridded( width:            "7in",

                            height:            "10in",

                            columns:         5,

                            column_widths:     "1in",

                            column_widths:     "1in",

                            column_widths:     "1in",

                            column_widths:     "1in",

                            column_widths:     "1in",

                            column_gutter:    "0.1in",

                            row_gutter:        "0.1in" );

    end;

    if _n_=1 then do;

        obj.region(column: 1);

        obj.table_start( );

    end;

    obj.row_start();

        obj.format_cell( data: a);

    obj.row_end();

    if eof then obj.table_end();

run;   

ods _all_ close;

ods listing;

no matter what I try I cannot get variable a printed!

I use SAS v9.1.3 SP4 on XP.

Thanks for any pointer.

Masoud

1 REPLY 1
ScottH_SAS
SAS Employee

Sorry SAS v9.1.3 SP4 is too early,  Object oriented layout with DATA _NULL_ was just a prototype at this point.  I tried your code at V920 and it works much better.

Scott

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 817 views
  • 0 likes
  • 2 in conversation