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 (March 2009, 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 Mar 2009 00:13:54 -0700
Reply-To:     Richard <rdevenezia@WILDBLUE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Richard <rdevenezia@WILDBLUE.NET>
Organization: http://groups.google.com
Subject:      Re: PRC Report URL Help
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On Mar 25, 2:28 pm, Anthony.McC...@Sun.COM (Tony McCray) wrote: > I've put together the proc report code shown below. As you will see I'm > attempting to make several values listed in the report into links via > compute blocks. The urls include two values from the data set being used > in the report: site and logop. This works great in the first row of the > report. In subsequent rows the links get set up but the logop value is > missing from the url every time! Both the site and logop variables > appear in every row of the data set being used. Any ideas how to fix this?

Tony:

Since you are using the GROUP directive, output for lines within the group, after the first line, will be blank -- so as to highlight hierarchical nature. This is problematic in the compute blocks, because the data in those lines in a missing value. You need to use additional compute blocks where you store a groups current value for later use in computer the url.

I noticed the SRC variable in no way contributes to the URL. This doesn't seem reasonable even if the report is showing only one SRC value (src = &src)

data foo; do level1 = 1 to 3; * your src; do level2 = 1 to 3; * your logo; do level3 = 1 to 3; * your platform; do level4 = 1 to 3; * your site; do day=1 to 7; tested_count = 4+ceil(10*ranuni(1234)); failed_count = ceil(tested_count*ranuni(1234)); output; end;end;end;end;end; run;

ods listing close; ods html file="%sysfunc(pathname(WORK))\report.html" style=journal;

proc report nowd data=foo; column level1-level4 day,(tested_count failed_count); define level1 / '' group; define level2 / '' group; define level3 / '' group; define level4 / '' group; define day / across; define tested_count / 'T'; define failed_count / 'F';

compute before level2; current_level2 = level2; endcomp;

compute before level3; current_level3 = level3; endcomp;

compute before level4; current_level4 = level4; endcomp;

compute tested_count; url = cats ( 'http://data_server/' , current_level4 , '_' , current_level2 , '_yield.html#' , current_level3 ); call define(_col_,'url',url); endcomp; run;

ods html close;

-- Richard A. DeVenezia http://www.devenezia.com


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