01-19-2012 06:19 PM
i have tables which is able to support mulitiple languages for product:
create unique index t1_product(t1_seq)
t1_lang varchar2(2), -- should be en, ch,
create unique index t1_product_desc(t1_seq, t1_lang);
user request to create a report but the column in the report doesn't show t1_product_desc.t1_attr1_desc (because
different product have different number of attribute. The column name is meaningless to users, even changing column
name in information map cannot satisfy the requirement).
I have a question that whether sas report (or used stored process) is able to show the "value" of
t1_product_desc.t1_attr1_desc as a column. therefore, we can use the "value" of t1_product_desc.t1_attr1_desc as
report section (or group)
For PC, the attribute 1,2,3
CPU, RAM, Harddisk
For notebook, the attribute 1,2
The report should be:
PC (section or group level)
Notebook (section or group level)
01-20-2012 01:38 PM
The kind of "recode" you describe where numbers will be translated to a character string is certainly possible with PROC FORMAT.
The code below doesn't use formatting, but otherwise, shows a report similar to the one you described.
ods html file='c:\temp\dogroups.html' style=sasweb;
proc report data=sashelp.shoes nowd;
title 'Ordered by Region';
column region product inventory;
define region / group;
define product / group;
define inventory / sum;
break after region / page summarize;
ods html close;
02-01-2012 08:03 AM
Does it mean that simple "drag and drop" in Web report studio is not able to achieve my task?
Also, would you mind to tell me your table strucutre (column) and sample data?
02-01-2012 07:18 PM
To see the structure of SASHELP.SHOES, run a PROC CONTENTS, optionally followed by a PROC PRINT. The PROC CONTENTS will show you the variable names and labels and the PROC PRINT will show you the unsummarized data. You probably only need to show Africa and Asia regions to get an idea of what the original data looks like:
ods html file='c:\temp\shoesinfo.html';
proc contents data=sashelp.shoes;
title 'proc contents';
proc print data=sashelp.shoes;
where region in ('Africa', 'Asia');
var region product inventory sales returns subsidiary;
title 'Print of Selected Obs';
ods html close;
As for your other question about drag and drop in Web Report Studio, I'm not sure I understand your task or data well enough to say. If a user-defined format is associated with a variable or column, then Web Report Studio can display that formatted value and you should be able to display the formatted values on the report. But, the formats would have to be defined in the metadata and the formats would have to be associated with te variable before WRS would be able to use the formats.
I don't have a clear picture of what your data looks like from your description. I don't understand how your t1_product_desc.t1_attr1_desc column is used on the report. When I posted PROC REPORT code, I was thinking stored process, not Web Report Studio. When I think stored process, I think code, not drag and drop in the WRS report designer.
You might want to work with Tech Support on this, if, in fact, your question is how to do what you want within the confines of WRS, but not with a stored process. There IS a lot you can do with code, but without understanding what your data actually looks like, it's hard to come up with an equivalent example. Tech Support can look at your REAL data and help you come up with either an info map/WRS solution or a stored process solution.