BookmarkSubscribeRSS Feed
Barite | Level 11

Dear All,
I am having difficult displaying the vis as the top layer of reporting.

Can I please seek you help on this?
Thanking you in advance.

Following is my proc report code.

proc report data=foo headline headskip spacing=1 split='|' formchar(2)='—' center missing nowindows;
  column vis grp ord _LABEL_ colx coly corr pval;

  define vis   / order order=internal;
  define grp       / order order=internal noprint;
  define ord       / order order=internal noprint;
  define _LABEL_   / display width=55 left "Visit| Variable|   Statistics";
  define colx      / width=15 display center "   Change in x";
  define coly     / width=15 display center "Change in y";
  define corr    / width=15 display center "Pearson coefficient" flow;
  define pval      / width=15 display center "p-value";

  break after grp / skip;

  compute before grp;   
    length text1 $110.;
    if (grp=1) then do; text1="var A"; end;
    if (grp=2) then do; text1="var B"; end;
    if (grp=3) then do; text1="var C"; end;
    if (grp=4) then do; text1="var D"; end;
    line @1 text1 $110.;  

  compute before VIS;
    length text1 $110.;


The structure of my input data(partial) to proc report is as following.















Below is my desire report layout in rtf. I used Excel to illustrate my desired rtf layout as it is easier.


















But my rtf is showing the following layout. I can't get the vis to display properly like the previous screenshot.


Super User

I am very confused as to why you show what is very obviously the image of a spreadsheet and call it "rtf" output.


Please pick a way of showing desired output that you can indicate what you want and then indicate where it isn't appearing in the output you have. I'm not sure what you expect where.


I doubt that it helps to have "text1" assigned twice.

Barite | Level 11

Hi @ballardw 

Thanks for quick reply.
I just used the Excel to illustrate my desired rtf layout as it's easier.
I am not able to get Month 1, ..., Month n to be displayed.

For every month, I need to present statistics of every variable.

Barite | Level 11

I managed to get the desired output after rearranging the input data for proc report.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2 in conversation