LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 26 Sep 2002 12:34:25 +1000
Reply-To:     Philip_Crane@WORKCOVER.VIC.GOV.AU
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Philip_Crane@WORKCOVER.VIC.GOV.AU
Subject:      Report summary variables
Content-type: text/plain; charset=us-ascii

Report experts

I am developing a report using proc report and have run into trouble. The report needs a custom break line. In the break line I need to put the total of an across variable (2 instances) and another summary variable which is not the sum of the detail lines so the break after / summarise syntax is not appropriate. This bit is not coded yet.

The actual question is how do I reference in the line statement the total of the across variables. Line 72 prints the text but not the totals I expected.

Thanks Philip

43 44 proc report data=det_rpt missing; 45 column div_lvl division sd_lvl sub_div pay_cd=pay_lvl 46 desc pay_cd yymm,sch_am; 47 define div_lvl / group noprint; 48 define division / group noprint; 49 define sd_lvl / group noprint; 50 define sub_div / group noprint; 51 define pay_lvl / group noprint; 52 define desc / group 'Payment type'; 53 define pay_cd / group 'Paycode'; 54 define yymm / across ' '; 55 define sch_am / sum format=comma12. ' '; 56 57 compute before division; 58 line ' '; 59 line @3 div_lvl $1. ' -' division $25.; 60 endcomp; 61 62 compute before sub_div; 63 line ' '; 64 line @3 sub_div $25.; 65 endcomp; 66 67 compute after sub_div; 68 length tot_ln $ 35; 69 if sub_div = ' ' 70 then tot_ln = trim(division) || ' (Total)'; 71 else tot_ln = trim(sub_div) || ' (Total)'; 72 line tot_ln $35. _c8_.sum comma12. _c9_.sum comma12. ; 73 endcomp; 74 run; ************************************************************************ IMPORTANT -

(1) The contents of this email and its attachments may be confidential and privileged. Any unauthorised use of the contents is expressly prohibited. If you receive this email in error, please contact us, and then delete the email.

(2) Before opening or using attachments, check them for viruses and defects. The contents of this email and its attachments may become scrambled, truncated or altered in transmission. Please notify us of any anomalies.

(3) Our liability is limited to resupplying the email and attached files or the cost of having them resupplied.

(4) The VWA collects personal information to enable it to perform its functions. For more information about the use, access and disclosure of this information, refer to our privacy policy at www.workcover.vic.gov.au

************************************************************************


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