BookmarkSubscribeRSS Feed
EdParsadanyan
Calcite | Level 5

I am using ODS RTF output.

I have a couple of columns with parameters (VISIT, PARAM name) and multiple columns with counts.

In order to separate columns I use PAGE option in define statement.

   proc report data=DATASET nowindows contents="" split='|' missing;
      by page1;
      columns page1 AVISITN AVISIT COMP blank STAT c1 c2 c3 c4 c5 c6 c7;

      define page1     /  id order noprint;
      define AVISITN /  id group order=data noprint;
      define AVISIT  /  id group order=data "Visit"  style={just=l cellwidth=9% asis=on };
      define COMP/  id order=data "Parameter"   style={just=l cellwidth=40% asis=on };
      define blank  /  id order=data " " style={just=l cellwidth=1% asis=on };
      define STAT  /  id order=data "Statistic"   style={just=l cellwidth=9% asis=on };

      define c1      / "100 mg|(N=&var_patnum1.)"    style={just=l cellwidth=8% asis=on };

      define c2      / "200 mg|(N=&var_patnum2.)"    style={just=l cellwidth=8% asis=on };

      define c3      / "300 mg|(N=&var_patnum3.)"    style={just=l cellwidth=8% asis=on };

      define c4      / "400 mg|(N=&var_patnum4.)"    style={just=l cellwidth=8% asis=on };

      define c5      /page "800 mg|(N=&var_patnum5.)"    style={just=l cellwidth=8% asis=on };

      define c6      / "Placebo|(N=&var_patnum6.)"    style={just=l cellwidth=8% asis=on };

      define c7      / "Total|(N=&var_patnum7.)"    style={just=l cellwidth=8% asis=on };

      compute before PARAMCD;
      line " ";
      endcomp;

   run; 

In resulting RTF file the first page with c1-c4 columns is OK and the second page with c5-c7 columns has only 12 rows and crops everything further that was on the first page.

Am I missing some relevant option or something? Option pagesize made no difference for me.

Thanks a lot for your help.

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  I don't see PARAMCD in your COLUMN statement. You should be seeing an error message like this in the SAS log:

ERROR: The BREAK variable PARAMCD is not one of the GROUP or

       ORDER variables.

   

  This is the kind of question that really needs to be worked with Tech Support. They can look at ALL your data and ALL your code (including ODS statements) and help you come to a good resolution. Without working code, however, it will be impossible for Tech Support to help you.

cynthia

Vish33
Lapis Lazuli | Level 10

Hi,

Pls post the complete code including ODS . As Cynthia said there is no where PARAMCD column defined or computed.

Regards,

Vish

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
  • 2 replies
  • 1762 views
  • 0 likes
  • 3 in conversation