LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2012, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 21 Feb 2012 11:26:43 -0500
Reply-To:   Ya Huang <ya.huang@AMYLIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ya Huang <ya.huang@AMYLIN.COM>
Subject:   Re: How to add gride lines at summary break using proc report
Comments:   To: SAS Analyst <analystprasad@YAHOO.CO.IN>

Not quite sure what do you mean by "grid" line. Since you did not specify style in the ods pdf statement, the default style, I beliwve, will be printer style, which alreayd has all grid line turned on. "Subtotal 1700" is in one long cell with grid line. Do you want them to be separated in two cells, so that "Subtotal" will be in the first column, and 1700 will be in the second column?

Or do you want no grid line anywhere except the Subtotal line?

On Tue, 21 Feb 2012 10:49:36 -0500, SAS Analyst <analystprasad@YAHOO.CO.IN> wrote:

>I am using below code to generate report,My requirement is when column >values are unique then there should >be no subtotal,if column values are different then there should be a sub >total. I am even able to bring that , >but i have a problem like the group value should be in side grid. > > >data x; >input id tr; >cards >; >10 500 >6 200 >6 800 >4 900 >3 900 >2 800 >3 800 >6 800 >run; >ods pdf file='c\onerecord.pdf'; >proc >report data=x nowd >style (header)={background=white}; >column id tr; >define id/'CustID' order; >define tr/analysis; >compute before id; >idct=-1; >endcomp; >compute id; >idct=sum(idct,1); >endcomp; >break >after id/skip; >compute after id; > length text $ 35; > l = 35; > if idct > 1 then text=catx(' ','Subtotal',tr.sum); > else do; text=' '; l=0; end; > line text $varying35. l; >endcomp; >run; >ods pdf close; > > >Output from Code: > >CustID tr >2 800 >3 900 > 800 >Subtotal 1700 >4 900 >6 200 > 800 > 800 >Subtotal 1800 >10 500 > >Expected output should be this way: >CustID tr >2 800 >3 900 > 800 >Subtotal 1700(subtotal should be within the grid) >4 900 >6 200 > 800 > 800 >Subtotal 1800(subtotal should be within the grid) >10 500 > > >Please help out.


Back to: Top of message | Previous page | Main SAS-L page