BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DmytroYermak
Lapis Lazuli | Level 10

Hi all,

 

Could you please help with the line of values dropping. I have the following output:

 

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
DmytroYermak
Lapis Lazuli | Level 10

Hi all, It seems that I mislead a little by my screenshots. The task was just to move the line down.

I did it putting "~n" before values in the corresponding lines. Sorry for the misleading.

View solution in original post

8 REPLIES 8
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sorry really can't follow that.  Show some code and some test data (form of a datastep).  I mean does your dataset look like the output or are you doing across variables and such like.  Best practice from my point of view is to get the dataset to look exactly like the output should and avoid doing anything complicated in proc report.

DmytroYermak
Lapis Lazuli | Level 10

I bring my apologies for my English. I mean 'to make every line with 'no Severity' closer to the lines below in the group'. To receive the view of the template - second picture.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

No need to apologise, your English is fine, its just the lack of code example to see how its being generated, as its not possible to say without seeing how your generating that.  As above, i always get my dataset looking exactly as I want the output to look, that way I don't need to do any across information, or summing, or much in the way of compute blocks to get the output as required.  

DmytroYermak
Lapis Lazuli | Level 10

Here below is the code. It seemed to me that one options existed like 'vjust' for proc report. But the question is how can it be applied just for every 5th line.



proc report data=T05_14_R nowd style(column)={asis=on} style(header)={asis=on font_weight=medium} split="*" ; by pgn PARAM; column pgn PARAMN var2 d SeverityN var3 - var12; define pgn / order order=internal noprint; define var2 / group "Visit/Timepoints" style(header)=[just=l cellwidth=14%] left; define PARAMN / order order=internal noprint; define SeverityN / order order=internal noprint; define var3 / "Severity" style(header)=[just=l cellwidth=8.5%] left; define var4 / " *Cohort 1/**(N=&N1)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var5 / " *Cohort 2/**(N=&N2)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var6 / " *Cohort 3/*(N=&N3)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var7 / " *Cohort 4/*(N=&N4)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var8 / " *Cohort 5/*(N=&N5)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var9 / " *Cohort 7/**(N=&N6)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var10 / " *Cohort 8/(N=&N7)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var11 / " *Cohort 9/*(N=&N8)*n (%)" style(header)=[just=c cellwidth=8.5%] left; define var12 / " *Cohort 10/(N=&N8)*n (%)" style(header)=[just=c cellwidth=8.5%] left; compute before PARAMN; line " "; endcomp; compute after pgn; line " "; endcomp; define d / ' ' style=[cellwidth=0.5%]; run;
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Mmm, some oddities there.  I would suggest dropping a lot of it, and then adding bits back in one at a time.  For instance you have by pgn, param - but pgn is on the column row as well, and param never gets used?  Also, as pgn and paramn and severityn ar not printed I can't tell whats in those, so I would start from a blank simple report, then add these lines in one by one:

by pgn PARAM;

column   pgn PARAMN var2 d SeverityN var3 - var12;

define pgn / order order=internal noprint;
define var2 / group "Visit/Timepoints" style(header)=[just=l cellwidth=14%] left;
define PARAMN / order order=internal noprint;
define SeverityN / order order=internal noprint;
Cynthia_sas
SAS Super FREQ

Hi:

  I would recommend you do this:

compute before PARAMN; 
   line "before PARAMN "; 
endcomp;

compute after pgn; 
   line "after PGN"; 
endcomp;

and then run your code to see which one of those LINE statements is causing the blank line. If that doesn't show you which COMPUTE block is responsible, then without data to test with, it is hard to make any other suggestions.

 

Cynthia

DmytroYermak
Lapis Lazuli | Level 10

 i always get my dataset looking exactly as I want the output to look

 

Do you mean that you divide one observation on several when a syllabification is needed?

DmytroYermak
Lapis Lazuli | Level 10

Hi all, It seems that I mislead a little by my screenshots. The task was just to move the line down.

I did it putting "~n" before values in the corresponding lines. Sorry for the misleading.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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