BookmarkSubscribeRSS Feed
Miracle
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.;  
  endcomp;

  compute before VIS;
    length text1 $110.;
    text1=put(VIS,vis_.);
  endcomp;

run;

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

2020-10-24_13-31-42.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Below is my desire report layout in rtf. I used Excel to illustrate my desired rtf layout as it is easier.
2020-10-24_14-03-48.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

But my rtf is showing the following layout. I can't get the vis to display properly like the previous screenshot.
2020-10-24_14-07-59.png

 

3 REPLIES 3
ballardw
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.

Miracle
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.

Miracle
Barite | Level 11

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

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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