BookmarkSubscribeRSS Feed
draroda
Fluorite | Level 6

Hi All,

 

I am facing issue while i am using spanned header and the values are not being displayed properly in Row.

 

I need to manually increase the height of spanned header row.

 

Here is the sample code.

 

ods Tagsets.ExcelXP style=sasweb
options(orientation='landscape' sheet_name="Table_2b" embedded_titles='yes' embedded_footnotes='yes' autofit_height='yes' ); 
proc report data=Out.Table_2b split='*' headskip spanrows spacing=0 nowd style(header)=[fontweight=bold ];
column sr_no param ("Cohort 1 - 0.3 mg/kg *  N=%trim(&_C103)" C103 C103_DY) ;
define sr_no/noprint order=data;
define param /Display width=60 center "End of Study Reason* (include Other and specify)"
	              style(header)=[just=center] style(column)=[cellwidth=200 just=center];
define C103 /Display width=60 center "Number of Subjects* n (%)"
	              style(header)=[just=center] style(column)=[cellwidth=100 just=center];
define C103_DY /Display width=60 center "End of Study Day* Median (Range)"
	              style(header)=[just=center] style(column)=[cellwidth=100 just=center];
run;

 I am attaching the screenshot of issue.

 

Please guide .

 

 

 

5 REPLIES 5
draroda
Fluorite | Level 6

Thanks.

 

But didnt solve the issue.

 

For me it is only with spanned header where i used split option * and values not being visible fully by default.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, it could just be an Excel render issue.  Excel is really pretty bad for any purpose, I have it in my grids where it resizes incorrectly, or runs things off the page when too many characters etc.  Hence why I wouldn't use it for anything.  What does it show if you remove the split?  Can you just add some more spaces to get it wrap correctly?

Cynthia_sas
SAS Super FREQ

Hi:

 

  I don't understand how your code produced the screen shot you sent. Your screen shot shows the last line with a yellow background and that's not part of SASWEB style.

 

And I think you are trying to over-control the widths. WIDTH=60 is a LISTING only specification and then you confuse it with a CELLWIDTH for ODS. Also, your use of STYLE overrides is inconsistent with your use of SPACING= and HEADSKIP, which are LISTING only options.

conflict.png

 

You didn't send ALL your code -- there's no FILE= in your ODS statement and no ODS TAGSETS.EXCELXP CLOSE; I'm not sure you need the autofit for the row heights if you fix every thing else. Since you didn't provide any data or all your code (for the macro variables, etc), I just made some variables and set a value for the macro variable.

First, simplifying your code, I got this:

ae1.png
And the width seems a bit off, but otherwise, the autofit for row heights doesn't seem to be needed.


Then, adding cellwidth back in but using a unit of measure, I got this:

ae2.png

In your original screen shot you showed the headers wrapping at a place other than the * and I think that happened because you had conflicting widths that were ultimately too small for the string that needed to fit in the width.

Cynthia

draroda
Fluorite | Level 6

Hi Cynthia,

 

This works perfect.

 

Thanks to point out issues in code.

 

I will enhance the code for rest of the tables i am including in my report.

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